diff --git a/pkg/apis/apps/v1alpha/types.go b/pkg/apis/apps/v1alpha/types.go index 7ac1931b1..1d2606241 100644 --- a/pkg/apis/apps/v1alpha/types.go +++ b/pkg/apis/apps/v1alpha/types.go @@ -41,16 +41,16 @@ type SelectiveDeployment struct { // SelectiveDeploymentSpec is the spec for a SelectiveDeployment resource type SelectiveDeploymentSpec struct { // The controller indicates the name and type of controller desired to configure - // Controllers: deployment, daemonset, and statefulsets + // Workloads: deployment, daemonset, and statefulsets // The type is for defining which kind of selectivedeployment it is, you could find the list of active types below. // Types of selector: city, state, country, continent, and polygon // The value represents the desired filter and it must be compatible with the type of selectivedeployment - Controllers Controllers `json:"controllers"` - Selector []Selector `json:"selector"` + Workloads Workloads `json:"workloads"` + Selector []Selector `json:"selector"` } -// Controllers indicates deployments, daemonsets or statefulsets -type Controllers struct { +// Workloads indicates deployments, daemonsets or statefulsets +type Workloads struct { Deployment []appsv1.Deployment `json:"deployment"` DaemonSet []appsv1.DaemonSet `json:"daemonset"` StatefulSet []appsv1.StatefulSet `json:"statefulset"` diff --git a/pkg/apis/apps/v1alpha/zz_generated.deepcopy.go b/pkg/apis/apps/v1alpha/zz_generated.deepcopy.go index 73dea0a4c..60a762798 100644 --- a/pkg/apis/apps/v1alpha/zz_generated.deepcopy.go +++ b/pkg/apis/apps/v1alpha/zz_generated.deepcopy.go @@ -363,43 +363,6 @@ func (in *Contact) DeepCopy() *Contact { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Controllers) DeepCopyInto(out *Controllers) { - *out = *in - if in.Deployment != nil { - in, out := &in.Deployment, &out.Deployment - *out = make([]v1.Deployment, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DaemonSet != nil { - in, out := &in.DaemonSet, &out.DaemonSet - *out = make([]v1.DaemonSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.StatefulSet != nil { - in, out := &in.StatefulSet, &out.StatefulSet - *out = make([]v1.StatefulSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Controllers. -func (in *Controllers) DeepCopy() *Controllers { - if in == nil { - return nil - } - out := new(Controllers) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EmailVerification) DeepCopyInto(out *EmailVerification) { *out = *in @@ -685,7 +648,7 @@ func (in *SelectiveDeploymentList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SelectiveDeploymentSpec) DeepCopyInto(out *SelectiveDeploymentSpec) { *out = *in - in.Controllers.DeepCopyInto(&out.Controllers) + in.Workloads.DeepCopyInto(&out.Workloads) if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = make([]Selector, len(*in)) @@ -1338,3 +1301,40 @@ func (in *UserStatus) DeepCopy() *UserStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Workloads) DeepCopyInto(out *Workloads) { + *out = *in + if in.Deployment != nil { + in, out := &in.Deployment, &out.Deployment + *out = make([]v1.Deployment, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DaemonSet != nil { + in, out := &in.DaemonSet, &out.DaemonSet + *out = make([]v1.DaemonSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StatefulSet != nil { + in, out := &in.StatefulSet, &out.StatefulSet + *out = make([]v1.StatefulSet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workloads. +func (in *Workloads) DeepCopy() *Workloads { + if in == nil { + return nil + } + out := new(Workloads) + in.DeepCopyInto(out) + return out +}