@@ -98,17 +98,10 @@ type ClusterClassSpec struct {
98
98
// +kubebuilder:validation:MaxItems=32
99
99
AvailabilityGates []ClusterAvailabilityGate `json:"availabilityGates,omitempty"`
100
100
101
- // infrastructure is a reference to a provider-specific template that holds
102
- // the details for provisioning infrastructure specific cluster
103
- // for the underlying provider.
104
- // The underlying provider is responsible for the implementation
105
- // of the template to an infrastructure cluster.
101
+ // infrastructure is a reference to a local struct that holds the details
102
+ // for provisioning the infrastructure cluster for the Cluster.
106
103
// +optional
107
- Infrastructure LocalObjectTemplate `json:"infrastructure,omitempty"`
108
-
109
- // infrastructureNamingStrategy allows changing the naming pattern used when creating the infrastructure object.
110
- // +optional
111
- InfrastructureNamingStrategy * InfrastructureNamingStrategy `json:"infrastructureNamingStrategy,omitempty"`
104
+ Infrastructure InfrastructureClass `json:"infrastructure,omitempty"`
112
105
113
106
// controlPlane is a reference to a local struct that holds the details
114
107
// for provisioning the Control Plane for the Cluster.
@@ -135,6 +128,16 @@ type ClusterClassSpec struct {
135
128
Patches []ClusterClassPatch `json:"patches,omitempty"`
136
129
}
137
130
131
+ // InfrastructureClass defines the class for the infrastructure cluster.
132
+ type InfrastructureClass struct {
133
+ // LocalObjectTemplate contains the reference to a provider-specific infrastructure cluster template.
134
+ LocalObjectTemplate `json:",inline"`
135
+
136
+ // namingStrategy allows changing the naming pattern used when creating the infrastructure cluster object.
137
+ // +optional
138
+ NamingStrategy * InfrastructureClassNamingStrategy `json:"namingStrategy,omitempty"`
139
+ }
140
+
138
141
// ControlPlaneClass defines the class for the control plane.
139
142
type ControlPlaneClass struct {
140
143
// metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane
@@ -147,7 +150,7 @@ type ControlPlaneClass struct {
147
150
// +optional
148
151
Metadata ObjectMeta `json:"metadata,omitempty"`
149
152
150
- // LocalObjectTemplate contains the reference to the control plane provider .
153
+ // LocalObjectTemplate contains the reference to a provider-specific control plane template .
151
154
LocalObjectTemplate `json:",inline"`
152
155
153
156
// machineInfrastructure defines the metadata and infrastructure information
@@ -221,8 +224,8 @@ type ControlPlaneClassNamingStrategy struct {
221
224
Template * string `json:"template,omitempty"`
222
225
}
223
226
224
- // InfrastructureNamingStrategy defines the naming strategy for infrastructure objects.
225
- type InfrastructureNamingStrategy struct {
227
+ // InfrastructureClassNamingStrategy defines the naming strategy for infrastructure objects.
228
+ type InfrastructureClassNamingStrategy struct {
226
229
// template defines the template to use for generating the name of the Infrastructure object.
227
230
// If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`.
228
231
// If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will
0 commit comments