diff --git a/pkg/apis/kudo/v1beta1/operatorversion_types.go b/pkg/apis/kudo/v1beta1/operatorversion_types.go index f0527b8c2..11b278fc7 100644 --- a/pkg/apis/kudo/v1beta1/operatorversion_types.go +++ b/pkg/apis/kudo/v1beta1/operatorversion_types.go @@ -18,7 +18,6 @@ package v1beta1 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" ) // OperatorVersionSpec defines the desired state of OperatorVersion. @@ -90,11 +89,6 @@ type Parameter struct { // Trigger identifies the plan that gets executed when this parameter changes in the Instance object. // Default is `update` if a plan with that name exists, otherwise it's `deploy` Trigger string `json:"trigger,omitempty"` - - // TODO: Add generated parameters (e.g. passwords). - // These values should be saved off in a secret instead of updating the spec - // with values that viewing the instance does not return credentials. - } // Phase specifies a list of steps that contain Kubernetes objects. @@ -108,12 +102,8 @@ type Phase struct { // Step defines a specific set of operations that occur. type Step struct { - Name string `json:"name" validate:"required"` // makes field mandatory and checks if set and non empty - Tasks []string `json:"tasks" validate:"required,gt=0,dive"` // makes field mandatory and checks if non empty - Delete bool `json:"delete,omitempty"` // no checks needed - - // Objects will be serialized for each instance as the params and defaults are provided. - Objects []runtime.Object `json:"-"` // no checks needed + Name string `json:"name" validate:"required"` // makes field mandatory and checks if set and non empty + Tasks []string `json:"tasks" validate:"required,gt=0,dive"` // makes field mandatory and checks if non empty } // Task is a global, polymorphic implementation of all publicly available tasks diff --git a/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go b/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go index 938614806..e11ff47d9 100644 --- a/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go @@ -477,6 +477,11 @@ func (in *OperatorVersionStatus) DeepCopy() *OperatorVersionStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Parameter) DeepCopyInto(out *Parameter) { *out = *in + if in.Required != nil { + in, out := &in.Required, &out.Required + *out = new(bool) + **out = **in + } if in.Default != nil { in, out := &in.Default, &out.Default *out = new(string) @@ -615,15 +620,6 @@ func (in *Step) DeepCopyInto(out *Step) { *out = make([]string, len(*in)) copy(*out, *in) } - if in.Objects != nil { - in, out := &in.Objects, &out.Objects - *out = make([]runtime.Object, len(*in)) - for i := range *in { - if (*in)[i] != nil { - (*out)[i] = (*in)[i].DeepCopyObject() - } - } - } return } diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 87f143116..506eda930 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -57,7 +57,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) }