diff --git a/api/v1alpha1/oapserver_types.go b/api/v1alpha1/oapserver_types.go index 67731113b139530880a475f3dd50f0e0f80df192..513ace272d477b750d783bc357276ab6bb07a71e 100644 --- a/api/v1alpha1/oapserver_types.go +++ b/api/v1alpha1/oapserver_types.go @@ -32,22 +32,9 @@ type OAPServerSpec struct { Instances int `json:"instances,imitempty"` // Config holds the OAP server configuration. Config map[string]string `json:"config,omitempty"` - - // NodeSelector is a selector which must be true for the pod to fit on a node. - // Selector which must match a node's labels for the pod to be scheduled on that node. - // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - // +kubebuilder:validation:Optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // If specified, affinity will define the pod's scheduling constraints - // +kubebuilder:validation:Optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - // Tolerations allows specifying a list of tolerations for controlling which - // set of Nodes a Pod can be scheduled on - // +kubebuilder:validation:Optional - Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"` - // Resources holds ResourceRequirements for the OAP server containers + // PodTemplate provides customisation options (labels, annotations, affinity rules, resource requests, and so on) for the Pods belonging to this OAP server. // +kubebuilder:validation:Optional - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` + PodTemplate corev1.PodTemplateSpec `json:"podTemplate,omitempty"` } // OAPServerPhase is the phase OAP server is in from the controller point of view. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 80f4197f197cfa257a6967601d79ea2de80646cd..fb755c9502863a6a54edf437cf2de0dffeb076dd 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,6 @@ package v1alpha1 import ( - "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -95,34 +94,7 @@ func (in *OAPServerSpec) DeepCopyInto(out *OAPServerSpec) { (*out)[key] = val } } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = new([]v1.Toleration) - if **in != nil { - in, out := *in, *out - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(v1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } + in.PodTemplate.DeepCopyInto(&out.PodTemplate) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAPServerSpec.