|
32 | 32 | awsClusterConfigCRDDefinition []byte
|
33 | 33 | //go:embed crds/caren.nutanix.com_nutanixclusterconfigs.yaml
|
34 | 34 | nutanixClusterConfigCRDDefinition []byte
|
| 35 | + //go:embed crds/caren.nutanix.com_genericclusterconfigs.yaml |
| 36 | + genericClusterConfigCRDDefinition []byte |
35 | 37 |
|
36 | 38 | dockerClusterConfigVariableSchema = variables.MustSchemaFromCRDYAML(
|
37 | 39 | dockerClusterConfigCRDDefinition,
|
|
42 | 44 | nutanixClusterConfigVariableSchema = variables.MustSchemaFromCRDYAML(
|
43 | 45 | nutanixClusterConfigCRDDefinition,
|
44 | 46 | )
|
| 47 | + genericClusterConfigVariableSchema = variables.MustSchemaFromCRDYAML( |
| 48 | + genericClusterConfigCRDDefinition, |
| 49 | + ) |
45 | 50 | )
|
46 | 51 |
|
47 | 52 | // +kubebuilder:object:root=true
|
@@ -103,7 +108,7 @@ type DockerClusterConfigSpec struct {
|
103 | 108 | ControlPlane *DockerNodeConfigSpec `json:"controlPlane,omitempty"`
|
104 | 109 |
|
105 | 110 | // Extra Subject Alternative Names for the API Server signing cert.
|
106 |
| - // For the Nutanix provider, the following default SANs will always be added: |
| 111 | + // For the Docker provider, the following default SANs will always be added: |
107 | 112 | // - localhost
|
108 | 113 | // - 127.0.0.1
|
109 | 114 | // - 0.0.0.0
|
@@ -150,6 +155,27 @@ type NutanixClusterConfigSpec struct {
|
150 | 155 | ExtraAPIServerCertSANs []string `json:"extraAPIServerCertSANs,omitempty"`
|
151 | 156 | }
|
152 | 157 |
|
| 158 | +// +kubebuilder:object:root=true |
| 159 | + |
| 160 | +// GenericClusterConfig is the Schema for the genericclusterconfigs API. |
| 161 | +type GenericClusterConfig struct { |
| 162 | + metav1.TypeMeta `json:",inline"` |
| 163 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 164 | + |
| 165 | + // +optional |
| 166 | + Spec GenericClusterConfigSpec `json:"spec,omitempty"` |
| 167 | + |
| 168 | + // Extra Subject Alternative Names for the API Server signing cert. |
| 169 | + // +kubebuilder:validation:UniqueItems=true |
| 170 | + // +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` |
| 171 | + // +optional |
| 172 | + ExtraAPIServerCertSANs []string `json:"extraAPIServerCertSANs,omitempty"` |
| 173 | +} |
| 174 | + |
| 175 | +func (s GenericClusterConfig) VariableSchema() clusterv1.VariableSchema { //nolint:gocritic,lll // Passed by value for no potential side-effect. |
| 176 | + return genericClusterConfigVariableSchema |
| 177 | +} |
| 178 | + |
153 | 179 | // GenericClusterConfigSpec defines the desired state of GenericClusterConfig.
|
154 | 180 | type GenericClusterConfigSpec struct {
|
155 | 181 | // Sets the Kubernetes image repository used for the KubeadmControlPlane.
|
|
0 commit comments