Skip to content

Commit

Permalink
Add PodOverride field to Actionset that will override the default pod…
Browse files Browse the repository at this point in the history
…Spec (#303)

* Add PodOverride field to actionset

* omitempty
  • Loading branch information
SupriyaKasten authored and mergify[bot] committed Sep 23, 2019
1 parent df1a364 commit 4096cad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/cr/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ which also has the apache 2.0 license.
package v1alpha1

import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down Expand Up @@ -98,6 +99,9 @@ type ActionSpec struct {
// Profile is use to specify the location where store artifacts and the
// credentials authorized to access them.
Profile *ObjectReference `json:"profile"`
// PodOverride is use to specify pod specs that will override the
// default pod specs
PodOverride v1.PodSpec `json:"podOverride,omitempty"`
// Options will be used to specify additional values
// to be used in the Blueprint.
Options map[string]string `json:"options"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/param/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type TemplateParams struct {
Options map[string]string
Object map[string]interface{}
Phases map[string]*Phase
PodOverride v1.PodSpec
}

// StatefulSetParams are params for stateful sets.
Expand Down Expand Up @@ -143,6 +144,7 @@ func New(ctx context.Context, cli kubernetes.Interface, dynCli dynamic.Interface
Profile: prof,
Time: now.Format(timeFormat),
Options: as.Options,
PodOverride: as.PodOverride,
}
var gvr schema.GroupVersionResource
namespace := as.Object.Namespace
Expand Down

0 comments on commit 4096cad

Please sign in to comment.