diff --git a/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go b/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go index d2327a65d..e62a92b3d 100644 --- a/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go +++ b/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go @@ -54,10 +54,18 @@ type CreateCRDError struct { Location string `json:"location,omitempty"` } +// ByPodStatus defines the observed state of ConstraintTemplate as seen by +// an individual controller +type ByPodStatus struct { + // a unique identifier for the pod that wrote the status + ID string `json:"id,omitempty"` + Errors []*CreateCRDError `json:"errors,omitempty"` +} + // ConstraintTemplateStatus defines the observed state of ConstraintTemplate type ConstraintTemplateStatus struct { Created bool `json:"created,omitempty"` - Errors []*CreateCRDError `json:"errors,omitempty"` + ByPod []*ByPodStatus `json:"byPod,omitempty"` // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file } diff --git a/constraint/pkg/apis/templates/v1alpha1/zz_generated.deepcopy.go b/constraint/pkg/apis/templates/v1alpha1/zz_generated.deepcopy.go index b01cc1caa..7bdf5a35b 100644 --- a/constraint/pkg/apis/templates/v1alpha1/zz_generated.deepcopy.go +++ b/constraint/pkg/apis/templates/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,33 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ByPodStatus) DeepCopyInto(out *ByPodStatus) { + *out = *in + if in.Errors != nil { + in, out := &in.Errors, &out.Errors + *out = make([]*CreateCRDError, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(CreateCRDError) + **out = **in + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ByPodStatus. +func (in *ByPodStatus) DeepCopy() *ByPodStatus { + if in == nil { + return nil + } + out := new(ByPodStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CRD) DeepCopyInto(out *CRD) { *out = *in @@ -67,7 +94,7 @@ func (in *ConstraintTemplate) DeepCopyInto(out *ConstraintTemplate) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -147,6 +174,17 @@ func (in *ConstraintTemplateSpec) DeepCopy() *ConstraintTemplateSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConstraintTemplateStatus) DeepCopyInto(out *ConstraintTemplateStatus) { *out = *in + if in.ByPod != nil { + in, out := &in.ByPod, &out.ByPod + *out = make([]*ByPodStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ByPodStatus) + (*in).DeepCopyInto(*out) + } + } + } return } @@ -160,6 +198,22 @@ func (in *ConstraintTemplateStatus) DeepCopy() *ConstraintTemplateStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CreateCRDError) DeepCopyInto(out *CreateCRDError) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreateCRDError. +func (in *CreateCRDError) DeepCopy() *CreateCRDError { + if in == nil { + return nil + } + out := new(CreateCRDError) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Target) DeepCopyInto(out *Target) { *out = *in