3434 nutanixClusterConfigCRDDefinition []byte
3535 //go:embed crds/caren.nutanix.com_genericclusterconfigs.yaml
3636 genericClusterConfigCRDDefinition []byte
37+ //go:embed crds/caren.nutanix.com_eksclusterconfigs.yaml
38+ eksClusterConfigCRDDefinition []byte
3739
3840 dockerClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
3941 dockerClusterConfigCRDDefinition ,
4749 genericClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
4850 genericClusterConfigCRDDefinition ,
4951 )
52+ eksClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
53+ eksClusterConfigCRDDefinition ,
54+ )
5055)
5156
5257// +kubebuilder:object:root=true
@@ -70,7 +75,7 @@ type AWSClusterConfigSpec struct {
7075 // +kubebuilder:validation:Optional
7176 AWS * AWSSpec `json:"aws,omitempty"`
7277
73- GenericClusterConfigSpec `json:",inline"`
78+ GenericClusterConfigResource `json:",inline"`
7479
7580 // +kubebuilder:validation:Optional
7681 Addons * AWSAddons `json:"addons,omitempty"`
@@ -107,7 +112,7 @@ type DockerClusterConfigSpec struct {
107112 // +kubebuilder:validation:Optional
108113 Docker * DockerSpec `json:"docker,omitempty"`
109114
110- GenericClusterConfigSpec `json:",inline"`
115+ GenericClusterConfigResource `json:",inline"`
111116
112117 // +kubebuilder:validation:Optional
113118 Addons * DockerAddons `json:"addons,omitempty"`
@@ -149,7 +154,7 @@ type NutanixClusterConfigSpec struct {
149154 // +kubebuilder:validation:Optional
150155 Nutanix * NutanixSpec `json:"nutanix,omitempty"`
151156
152- GenericClusterConfigSpec `json:",inline"`
157+ GenericClusterConfigResource `json:",inline"`
153158
154159 // +kubebuilder:validation:Optional
155160 Addons * NutanixAddons `json:"addons,omitempty"`
@@ -195,6 +200,13 @@ func (s GenericClusterConfig) VariableSchema() clusterv1.VariableSchema { //noli
195200
196201// GenericClusterConfigSpec defines the desired state of GenericClusterConfig.
197202type GenericClusterConfigSpec struct {
203+ GenericClusterConfigResource `json:",inline"`
204+
205+ // +kubebuilder:validation:Optional
206+ Addons * GenericAddons `json:"addons,omitempty"`
207+ }
208+
209+ type GenericClusterConfigResource struct {
198210 // Sets the Kubernetes image repository used for the KubeadmControlPlane.
199211 // +kubebuilder:validation:Optional
200212 // +kubebuilder:validation:Pattern=`^((?:[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*|\[(?:[a-fA-F0-9:]+)\])(:[0-9]+)?/)?[a-z0-9]+((?:[._]|__|[-]+)[a-z0-9]+)*(/[a-z0-9]+((?:[._]|__|[-]+)[a-z0-9]+)*)*$`
@@ -234,6 +246,31 @@ type GenericClusterConfigSpec struct {
234246 NTP * NTP `json:"ntp,omitempty"`
235247}
236248
249+ // +kubebuilder:object:root=true
250+
251+ // EKSClusterConfig is the Schema for the eksclusterconfigs API.
252+ type EKSClusterConfig struct {
253+ metav1.TypeMeta `json:",inline"`
254+ metav1.ObjectMeta `json:"metadata,omitempty"`
255+
256+ // +kubebuilder:validation:Optional
257+ Spec EKSClusterConfigSpec `json:"spec,omitempty"`
258+ }
259+
260+ func (s EKSClusterConfig ) VariableSchema () clusterv1.VariableSchema { //nolint:gocritic,lll // Passed by value for no potential side-effect.
261+ return eksClusterConfigVariableSchema
262+ }
263+
264+ // EKSClusterConfigSpec defines the desired state of ClusterConfig.
265+ type EKSClusterConfigSpec struct {
266+ // EKS cluster configuration.
267+ // +kubebuilder:validation:Optional
268+ EKS * EKSSpec `json:"eks,omitempty"`
269+
270+ // +kubebuilder:validation:Optional
271+ Addons * AWSAddons `json:"addons,omitempty"`
272+ }
273+
237274type Image struct {
238275 // Repository is used to override the image repository to pull from.
239276 // +kubebuilder:validation:Optional
0 commit comments