34
34
nutanixClusterConfigCRDDefinition []byte
35
35
//go:embed crds/caren.nutanix.com_genericclusterconfigs.yaml
36
36
genericClusterConfigCRDDefinition []byte
37
+ //go:embed crds/caren.nutanix.com_eksclusterconfigs.yaml
38
+ eksClusterConfigCRDDefinition []byte
37
39
38
40
dockerClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
39
41
dockerClusterConfigCRDDefinition ,
47
49
genericClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
48
50
genericClusterConfigCRDDefinition ,
49
51
)
52
+ eksClusterConfigVariableSchema = variables .MustSchemaFromCRDYAML (
53
+ eksClusterConfigCRDDefinition ,
54
+ )
50
55
)
51
56
52
57
// +kubebuilder:object:root=true
@@ -70,7 +75,7 @@ type AWSClusterConfigSpec struct {
70
75
// +kubebuilder:validation:Optional
71
76
AWS * AWSSpec `json:"aws,omitempty"`
72
77
73
- GenericClusterConfigSpec `json:",inline"`
78
+ GenericClusterConfigResource `json:",inline"`
74
79
75
80
// +kubebuilder:validation:Optional
76
81
Addons * AWSAddons `json:"addons,omitempty"`
@@ -105,7 +110,7 @@ type DockerClusterConfigSpec struct {
105
110
// +kubebuilder:validation:Optional
106
111
Docker * DockerSpec `json:"docker,omitempty"`
107
112
108
- GenericClusterConfigSpec `json:",inline"`
113
+ GenericClusterConfigResource `json:",inline"`
109
114
110
115
// +kubebuilder:validation:Optional
111
116
Addons * DockerAddons `json:"addons,omitempty"`
@@ -145,7 +150,7 @@ type NutanixClusterConfigSpec struct {
145
150
// +kubebuilder:validation:Optional
146
151
Nutanix * NutanixSpec `json:"nutanix,omitempty"`
147
152
148
- GenericClusterConfigSpec `json:",inline"`
153
+ GenericClusterConfigResource `json:",inline"`
149
154
150
155
// +kubebuilder:validation:Optional
151
156
Addons * NutanixAddons `json:"addons,omitempty"`
@@ -187,6 +192,13 @@ func (s GenericClusterConfig) VariableSchema() clusterv1.VariableSchema { //noli
187
192
188
193
// GenericClusterConfigSpec defines the desired state of GenericClusterConfig.
189
194
type GenericClusterConfigSpec struct {
195
+ GenericClusterConfigResource `json:",inline"`
196
+
197
+ // +kubebuilder:validation:Optional
198
+ Addons * GenericAddons `json:"addons,omitempty"`
199
+ }
200
+
201
+ type GenericClusterConfigResource struct {
190
202
// Sets the Kubernetes image repository used for the KubeadmControlPlane.
191
203
// +kubebuilder:validation:Optional
192
204
// +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 {
222
234
NTP * NTP `json:"ntp,omitempty"`
223
235
}
224
236
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
+
225
262
type Image struct {
226
263
// Repository is used to override the image repository to pull from.
227
264
// +kubebuilder:validation:Optional
0 commit comments