diff --git a/api/v1/master_types.go b/api/v1/master_types.go index 0525ff0..628beb4 100644 --- a/api/v1/master_types.go +++ b/api/v1/master_types.go @@ -28,14 +28,15 @@ type MasterSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file - // Foo is an example field of Master. Edit Master_types.go to remove/update - Foo string `json:"foo,omitempty"` + // +kubebuilder:validation:Minimum=0 + // Size is the size of the master deployment + Size int32 `json:"size"` } // MasterStatus defines the observed state of Master type MasterStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file + // Nodes are the names of the master pods + Nodes []string `json:"nodes"` } // +kubebuilder:object:root=true diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index c804264..e2c6eb1 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -30,7 +30,7 @@ func (in *Master) DeepCopyInto(out *Master) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Master. @@ -101,6 +101,11 @@ func (in *MasterSpec) DeepCopy() *MasterSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MasterStatus) DeepCopyInto(out *MasterStatus) { *out = *in + if in.Nodes != nil { + in, out := &in.Nodes, &out.Nodes + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterStatus.