Skip to content

Commit

Permalink
ClusterNetworkOperator API: remove additionalRoutingCapabilities gate
Browse files Browse the repository at this point in the history
Removing the feature gate as the deployed daemonset is being used by
metallb and covered by MetalLB tests.

Signed-off-by: Federico Paolinelli <[email protected]>
  • Loading branch information
fedepaol committed Nov 12, 2024
1 parent dfe4d9f commit 5d782a3
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 16 deletions.
2 changes: 1 addition & 1 deletion features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
| MultiArchInstallAzure| | | | | | |
| GatewayAPI| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | | |
| AWSClusterHostedDNS| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AdditionalRoutingCapabilities| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AutomatedEtcdBackup| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| BootcNodeManagement| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| CSIDriverSharedResource| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down Expand Up @@ -55,6 +54,7 @@
| VolumeGroupSnapshot| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| ExternalOIDC| <span style="background-color: #519450">Enabled</span> | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AWSEFSDriverVolumeMetrics| <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AdditionalRoutingCapabilities| <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AdminNetworkPolicy| <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AlibabaPlatform| <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| AzureWorkloadIdentity| <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down
2 changes: 1 addition & 1 deletion features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand Down
3 changes: 2 additions & 1 deletion operator/v1/types_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down Expand Up @@ -137,6 +137,7 @@ type NetworkSpec struct {
// respective documentation and configuration options.
// +openshift:enable:FeatureGate=AdditionalRoutingCapabilities
// +optional
// +nullable
AdditionalRoutingCapabilities *AdditionalRoutingCapabilities `json:"additionalRoutingCapabilities,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
{
"name": "AWSClusterHostedDNS"
},
{
"name": "AdditionalRoutingCapabilities"
},
{
"name": "AutomatedEtcdBackup"
},
Expand Down Expand Up @@ -177,6 +174,9 @@
{
"name": "AWSEFSDriverVolumeMetrics"
},
{
"name": "AdditionalRoutingCapabilities"
},
{
"name": "AdminNetworkPolicy"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
{
"name": "AWSClusterHostedDNS"
},
{
"name": "AdditionalRoutingCapabilities"
},
{
"name": "AutomatedEtcdBackup"
},
Expand Down Expand Up @@ -180,6 +177,9 @@
{
"name": "AWSEFSDriverVolumeMetrics"
},
{
"name": "AdditionalRoutingCapabilities"
},
{
"name": "AdminNetworkPolicy"
},
Expand Down

0 comments on commit 5d782a3

Please sign in to comment.