From ef528c5a1940687428de75d2a70bffcb40159608 Mon Sep 17 00:00:00 2001 From: robogatikov Date: Tue, 5 Aug 2025 11:18:10 -0400 Subject: [PATCH 1/2] feat: add AppGatewaySubnetID field to OverlayExtensionConfig CRD --- .../api/v1alpha1/overlayextensionconfig_types.go | 5 +++++ .../manifests/acn.azure.com_overlayextensionconfigs.yaml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go b/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go index 9d5d220d59..09a59e9df1 100644 --- a/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go +++ b/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go @@ -39,6 +39,11 @@ type OverlayExtensionConfigSpec struct { // +kubebuilder:validation:MaxLength=43 // 43 is max length of IPv6 CIDR string ExtensionIPRange string `json:"extensionIPRange,omitempty"` + + // AppGatewaySubnetID field defines a subnet delegated to Application Gateway that should be able to reach routing domain ip addresses. + // +kubebuilder:validation:Optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" + AppGatewaySubnetID string `json:"appGatewaySubnetID,omitempty"` } type OECState string diff --git a/crd/overlayextensionconfig/manifests/acn.azure.com_overlayextensionconfigs.yaml b/crd/overlayextensionconfig/manifests/acn.azure.com_overlayextensionconfigs.yaml index 418691c2af..a5e24be101 100644 --- a/crd/overlayextensionconfig/manifests/acn.azure.com_overlayextensionconfigs.yaml +++ b/crd/overlayextensionconfig/manifests/acn.azure.com_overlayextensionconfigs.yaml @@ -47,6 +47,14 @@ spec: spec: description: OverlayExtensionConfigSpec defines the desired state of OverlayExtensionConfig. properties: + appGatewaySubnetID: + description: AppGatewaySubnetID field defines a subnet delegated to + Application Gateway that should be able to reach routing domain + ip addresses. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf extensionIPRange: description: |- ExtensionIPRange field defines a CIDR that should be able to reach routing domain ip addresses. From 7c760d71b472fad01bb279210d1eee11a7940f2e Mon Sep 17 00:00:00 2001 From: robogatikov Date: Tue, 5 Aug 2025 11:38:18 -0400 Subject: [PATCH 2/2] chore: remove redundant kubebuilder annotations +kubebuilder:validation:Optional --- .../api/v1alpha1/overlayextensionconfig_types.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go b/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go index 09a59e9df1..38afcfc6bf 100644 --- a/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go +++ b/crd/overlayextensionconfig/api/v1alpha1/overlayextensionconfig_types.go @@ -34,14 +34,12 @@ type OverlayExtensionConfigList struct { // +kubebuilder:validation:XValidation:rule="!has(oldSelf.extensionIPRange) || has(self.extensionIPRange)", message="ExtensionIPRange is required once set" type OverlayExtensionConfigSpec struct { // ExtensionIPRange field defines a CIDR that should be able to reach routing domain ip addresses. - // +kubebuilder:validation:Optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" // +kubebuilder:validation:MaxLength=43 // 43 is max length of IPv6 CIDR string ExtensionIPRange string `json:"extensionIPRange,omitempty"` // AppGatewaySubnetID field defines a subnet delegated to Application Gateway that should be able to reach routing domain ip addresses. - // +kubebuilder:validation:Optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable" AppGatewaySubnetID string `json:"appGatewaySubnetID,omitempty"` }