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"`
@@ -105,7 +110,7 @@ type DockerClusterConfigSpec struct {
105110 // +kubebuilder:validation:Optional
106111 Docker * DockerSpec `json:"docker,omitempty"`
107112
108- GenericClusterConfigSpec `json:",inline"`
113+ GenericClusterConfigResource `json:",inline"`
109114
110115 // +kubebuilder:validation:Optional
111116 Addons * DockerAddons `json:"addons,omitempty"`
@@ -145,7 +150,7 @@ type NutanixClusterConfigSpec struct {
145150 // +kubebuilder:validation:Optional
146151 Nutanix * NutanixSpec `json:"nutanix,omitempty"`
147152
148- GenericClusterConfigSpec `json:",inline"`
153+ GenericClusterConfigResource `json:",inline"`
149154
150155 // +kubebuilder:validation:Optional
151156 Addons * NutanixAddons `json:"addons,omitempty"`
@@ -187,6 +192,13 @@ func (s GenericClusterConfig) VariableSchema() clusterv1.VariableSchema { //noli
187192
188193// GenericClusterConfigSpec defines the desired state of GenericClusterConfig.
189194type GenericClusterConfigSpec struct {
195+ GenericClusterConfigResource `json:",inline"`
196+
197+ // +kubebuilder:validation:Optional
198+ Addons * GenericAddons `json:"addons,omitempty"`
199+ }
200+
201+ type GenericClusterConfigResource struct {
190202 // Sets the Kubernetes image repository used for the KubeadmControlPlane.
191203 // +kubebuilder:validation:Optional
192204 // +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]+)*)*$`
@@ -222,6 +234,31 @@ type GenericClusterConfigSpec struct {
222234 NTP * NTP `json:"ntp,omitempty"`
223235}
224236
237+ // +kubebuilder:object:root=true
238+
239+ // EKSClusterConfig is the Schema for the eksclusterconfigs API.
240+ type EKSClusterConfig struct {
241+ metav1.TypeMeta `json:",inline"`
242+ metav1.ObjectMeta `json:"metadata,omitempty"`
243+
244+ // +kubebuilder:validation:Optional
245+ Spec EKSClusterConfigSpec `json:"spec,omitempty"`
246+ }
247+
248+ func (s EKSClusterConfig ) VariableSchema () clusterv1.VariableSchema { //nolint:gocritic,lll // Passed by value for no potential side-effect.
249+ return eksClusterConfigVariableSchema
250+ }
251+
252+ // EKSClusterConfigSpec defines the desired state of ClusterConfig.
253+ type EKSClusterConfigSpec struct {
254+ // EKS cluster configuration.
255+ // +kubebuilder:validation:Optional
256+ EKS * EKSSpec `json:"eks,omitempty"`
257+
258+ // +kubebuilder:validation:Optional
259+ Addons * AWSAddons `json:"addons,omitempty"`
260+ }
261+
225262type Image struct {
226263 // Repository is used to override the image repository to pull from.
227264 // +kubebuilder:validation:Optional
0 commit comments