@@ -48,6 +48,7 @@ type KonnectCloudGatewayDataPlaneGroupConfigurationSpec struct {
4848 // Version specifies the desired Kong Gateway version.
4949 //
5050 // +required
51+ // +kubebuilder:validation:MinLength=1
5152 Version string `json:"version"`
5253
5354 // DataplaneGroups is a list of desired data-plane groups that describe where
@@ -92,6 +93,7 @@ type KonnectConfigurationDataPlaneGroup struct {
9293 // Region for cloud provider region.
9394 //
9495 // +required
96+ // +kubebuilder:validation:MinLength=1
9597 Region string `json:"region"`
9698
9799 // NetworkRef is the reference to the network that this data-plane group will be deployed on.
@@ -198,37 +200,41 @@ type ConfigurationDataPlaneGroupAutoscaleStatic struct {
198200// KonnectCloudGatewayDataPlaneGroupConfigurationStatus defines the observed state of KonnectCloudGatewayDataPlaneGroupConfiguration.
199201// +apireference:kgo:include
200202type KonnectCloudGatewayDataPlaneGroupConfigurationStatus struct {
201- konnectv1alpha2.KonnectEntityStatusWithControlPlaneRef `json:",inline"`
202-
203- // DataPlaneGroups is a list of deployed data-plane groups.
204- //
205- // +optional
206- DataPlaneGroups []KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup `json:"dataplane_groups,omitempty"`
207-
208203 // Conditions describe the current conditions of the KonnectCloudGatewayDataPlaneGroupConfiguration.
209204 //
210205 // Known condition types are:
211206 //
212207 // * "Programmed"
213208 //
209+ // +optional
214210 // +listType=map
215211 // +listMapKey=type
212+ // +patchStrategy=merge
213+ // +patchMergeKey=type
216214 // +kubebuilder:validation:MaxItems=8
217215 // +kubebuilder:default={{type: "Programmed", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
216+ Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
217+
218+ // DataPlaneGroups is a list of deployed data-plane groups.
219+ //
218220 // +optional
219- Conditions []metav1.Condition `json:"conditions,omitempty"`
221+ DataPlaneGroups []KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup `json:"dataplane_groups,omitempty"`
222+
223+ konnectv1alpha2.KonnectEntityStatusWithControlPlaneRef `json:",inline"`
220224}
221225
222226// KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup defines the observed state of a deployed data-plane group.
223227type KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup struct {
224228 // ID is the ID of the deployed data-plane group.
225229 //
226230 // +required
231+ // +kubebuilder:validation:MinLength=1
227232 ID string `json:"id"`
228233
229234 // CloudGatewayNetworkID is the ID of the cloud gateway network.
230235 //
231236 // +required
237+ // +kubebuilder:validation:MinLength=1
232238 CloudGatewayNetworkID string `json:"cloud_gateway_network_id"`
233239
234240 // Name of cloud provider.
@@ -239,6 +245,7 @@ type KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup struct {
239245 // Region ID for cloud provider region.
240246 //
241247 // +required
248+ // +kubebuilder:validation:MinLength=1
242249 Region string `json:"region"`
243250
244251 // PrivateIPAddresses is a list of private IP addresses of the internal load balancer that proxies traffic to this data-plane group.
@@ -254,6 +261,7 @@ type KonnectCloudGatewayDataPlaneGroupConfigurationStatusGroup struct {
254261 // State is the current state of the data plane group. Can be e.g. initializing, ready, terminating.
255262 //
256263 // +required
264+ // +kubebuilder:validation:MinLength=1
257265 State string `json:"state"`
258266}
259267
0 commit comments