Skip to content

Commit

Permalink
Use strategicpatch.JSONMap to store PodOverride specs (#332)
Browse files Browse the repository at this point in the history
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
  • Loading branch information
PrasadG193 authored and SupriyaKasten committed Oct 4, 2019
1 parent 76aee05 commit 9a684c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/apis/cr/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ which also has the apache 2.0 license.
package v1alpha1

import (
v1 "k8s.io/api/core/v1"
sp "k8s.io/apimachinery/pkg/util/strategicpatch"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down Expand Up @@ -101,7 +102,7 @@ type ActionSpec struct {
Profile *ObjectReference `json:"profile"`
// PodOverride is use to specify pod specs that will override the
// default pod specs
PodOverride v1.PodSpec `json:"podOverride,omitempty"`
PodOverride sp.JSONMap `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
3 changes: 2 additions & 1 deletion pkg/param/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
sp "k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"

Expand All @@ -48,7 +49,7 @@ type TemplateParams struct {
Options map[string]string
Object map[string]interface{}
Phases map[string]*Phase
PodOverride v1.PodSpec
PodOverride sp.JSONMap
}

// StatefulSetParams are params for stateful sets.
Expand Down

0 comments on commit 9a684c7

Please sign in to comment.