From 5d782a36d9a71339f669979a33a2e158f7749eab Mon Sep 17 00:00:00 2001 From: Federico Paolinelli Date: Wed, 6 Nov 2024 16:49:22 +0100 Subject: [PATCH] ClusterNetworkOperator API: remove additionalRoutingCapabilities gate Removing the feature gate as the deployed daemonset is being used by metallb and covered by MetalLB tests. Signed-off-by: Federico Paolinelli --- features.md | 2 +- features/features.go | 2 +- operator/v1/types_network.go | 3 +- ...twork_01_networks-CustomNoUpgrade.crd.yaml | 1 + ...00_70_network_01_networks-Default.crd.yaml | 34 +++++++++++++++++++ ...k_01_networks-DevPreviewNoUpgrade.crd.yaml | 1 + ..._01_networks-TechPreviewNoUpgrade.crd.yaml | 1 + .../AdditionalRoutingCapabilities.yaml | 8 +---- .../RouteAdvertisements.yaml | 7 ++++ .../featureGate-Hypershift-Default.yaml | 6 ++-- .../featureGate-SelfManagedHA-Default.yaml | 6 ++-- 11 files changed, 55 insertions(+), 16 deletions(-) diff --git a/features.md b/features.md index 660d3bff141..93c50fe88d9 100644 --- a/features.md +++ b/features.md @@ -8,7 +8,6 @@ | MultiArchInstallAzure| | | | | | | | GatewayAPI| | | Enabled | Enabled | | | | AWSClusterHostedDNS| | | Enabled | Enabled | Enabled | Enabled | -| AdditionalRoutingCapabilities| | | Enabled | Enabled | Enabled | Enabled | | AutomatedEtcdBackup| | | Enabled | Enabled | Enabled | Enabled | | BootcNodeManagement| | | Enabled | Enabled | Enabled | Enabled | | CSIDriverSharedResource| | | Enabled | Enabled | Enabled | Enabled | @@ -55,6 +54,7 @@ | VolumeGroupSnapshot| | | Enabled | Enabled | Enabled | Enabled | | ExternalOIDC| Enabled | | Enabled | Enabled | Enabled | Enabled | | AWSEFSDriverVolumeMetrics| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| AdditionalRoutingCapabilities| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AdminNetworkPolicy| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AlibabaPlatform| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AzureWorkloadIdentity| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | diff --git a/features/features.go b/features/features.go index 0c3693ff297..9b2e1707294 100644 --- a/features/features.go +++ b/features/features.go @@ -240,7 +240,7 @@ var ( contactPerson("jcaamano"). productScope(ocpSpecific). enhancementPR(legacyFeatureGateWithoutEnhancement). - enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() FeatureGateRouteAdvertisements = newFeatureGate("RouteAdvertisements"). diff --git a/operator/v1/types_network.go b/operator/v1/types_network.go index 9b1588bc25a..0eba3a8fcfb 100644 --- a/operator/v1/types_network.go +++ b/operator/v1/types_network.go @@ -54,7 +54,7 @@ type NetworkList struct { // NetworkSpec is the top-level network configuration object. // +kubebuilder:validation:XValidation:rule="!has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding) || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == oldSelf.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Restricted' || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Global'",message="invalid value for IPForwarding, valid values are 'Restricted' or 'Global'" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=AdditionalRoutingCapabilities,rule="(has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != 'Enabled'",message="Route advertisements cannot be Enabled if 'FRR' routing capability provider is not available" +// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteAdvertisements,rule="(has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != 'Enabled'",message="Route advertisements cannot be Enabled if 'FRR' routing capability provider is not available" type NetworkSpec struct { OperatorSpec `json:",inline"` @@ -137,6 +137,7 @@ type NetworkSpec struct { // respective documentation and configuration options. // +openshift:enable:FeatureGate=AdditionalRoutingCapabilities // +optional + // +nullable AdditionalRoutingCapabilities *AdditionalRoutingCapabilities `json:"additionalRoutingCapabilities,omitempty"` } diff --git a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-CustomNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-CustomNoUpgrade.crd.yaml index 146c6840566..9ce47c60db2 100644 --- a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-CustomNoUpgrade.crd.yaml +++ b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-CustomNoUpgrade.crd.yaml @@ -189,6 +189,7 @@ spec: capabilities acquired through the enablement of these components but may require specific configuration on their side to do so; refer to their respective documentation and configuration options. + nullable: true properties: providers: description: |- diff --git a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-Default.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-Default.crd.yaml index 3f150defe73..8d386676c90 100644 --- a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-Default.crd.yaml +++ b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-Default.crd.yaml @@ -178,6 +178,40 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + additionalRoutingCapabilities: + description: |- + additionalRoutingCapabilities describes components and relevant + configuration providing additional routing capabilities. When set, it + enables such components and the usage of the routing capabilities they + provide for the machine network. Upstream operators, like MetalLB + operator, requiring these capabilities may rely on, or automatically set + this attribute. Network plugins may leverage advanced routing + capabilities acquired through the enablement of these components but may + require specific configuration on their side to do so; refer to their + respective documentation and configuration options. + nullable: true + properties: + providers: + description: |- + providers is a set of enabled components that provide additional routing + capabilities. Entries on this list must be unique. The only valid value + is currrently "FRR" which provides FRR routing capabilities through the + deployment of FRR. + items: + description: RoutingCapabilitiesProvider is a component providing + routing capabilities. + enum: + - FRR + type: string + maxItems: 1 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - rule: self.all(x, self.exists_one(y, x == y)) + required: + - providers + type: object clusterNetwork: description: |- clusterNetwork is the IP address pool to use for pod IPs. diff --git a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-DevPreviewNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-DevPreviewNoUpgrade.crd.yaml index fd067976327..64a76f12ca3 100644 --- a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-DevPreviewNoUpgrade.crd.yaml +++ b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-DevPreviewNoUpgrade.crd.yaml @@ -189,6 +189,7 @@ spec: capabilities acquired through the enablement of these components but may require specific configuration on their side to do so; refer to their respective documentation and configuration options. + nullable: true properties: providers: description: |- diff --git a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-TechPreviewNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-TechPreviewNoUpgrade.crd.yaml index e55b94afc3e..0a6eaf68648 100644 --- a/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-TechPreviewNoUpgrade.crd.yaml +++ b/operator/v1/zz_generated.crd-manifests/0000_70_network_01_networks-TechPreviewNoUpgrade.crd.yaml @@ -189,6 +189,7 @@ spec: capabilities acquired through the enablement of these components but may require specific configuration on their side to do so; refer to their respective documentation and configuration options. + nullable: true properties: providers: description: |- diff --git a/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/AdditionalRoutingCapabilities.yaml b/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/AdditionalRoutingCapabilities.yaml index 6e14ebb2eae..b3f3e9b4815 100644 --- a/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/AdditionalRoutingCapabilities.yaml +++ b/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/AdditionalRoutingCapabilities.yaml @@ -189,6 +189,7 @@ spec: capabilities acquired through the enablement of these components but may require specific configuration on their side to do so; refer to their respective documentation and configuration options. + nullable: true properties: providers: description: |- @@ -874,13 +875,6 @@ spec: type: boolean type: object x-kubernetes-validations: - - message: Route advertisements cannot be Enabled if 'FRR' routing capability - provider is not available - rule: (has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) - || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) - || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) - || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != - 'Enabled' - message: invalid value for IPForwarding, valid values are 'Restricted' or 'Global' rule: '!has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) diff --git a/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/RouteAdvertisements.yaml b/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/RouteAdvertisements.yaml index e4caccb1e07..029d513b5c7 100644 --- a/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/RouteAdvertisements.yaml +++ b/operator/v1/zz_generated.featuregated-crd-manifests/networks.operator.openshift.io/RouteAdvertisements.yaml @@ -857,6 +857,13 @@ spec: type: boolean type: object x-kubernetes-validations: + - message: Route advertisements cannot be Enabled if 'FRR' routing capability + provider is not available + rule: (has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) + || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) + || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) + || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != + 'Enabled' - message: invalid value for IPForwarding, valid values are 'Restricted' or 'Global' rule: '!has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) diff --git a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml index 1da62f43994..97ca6e8d747 100644 --- a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml +++ b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml @@ -16,9 +16,6 @@ { "name": "AWSClusterHostedDNS" }, - { - "name": "AdditionalRoutingCapabilities" - }, { "name": "AutomatedEtcdBackup" }, @@ -177,6 +174,9 @@ { "name": "AWSEFSDriverVolumeMetrics" }, + { + "name": "AdditionalRoutingCapabilities" + }, { "name": "AdminNetworkPolicy" }, diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml index ad8bff5bb92..965d34e1a4e 100644 --- a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml +++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml @@ -16,9 +16,6 @@ { "name": "AWSClusterHostedDNS" }, - { - "name": "AdditionalRoutingCapabilities" - }, { "name": "AutomatedEtcdBackup" }, @@ -180,6 +177,9 @@ { "name": "AWSEFSDriverVolumeMetrics" }, + { + "name": "AdditionalRoutingCapabilities" + }, { "name": "AdminNetworkPolicy" },