Skip to content

Commit

Permalink
OPNET-466: PlatformLoadBalancer becomes GA for On-Prem
Browse files Browse the repository at this point in the history
This PR promotes the PlatformLoadBalancer to GA for bare-metal and
vSphere platforms. The feature has been in TP for long enough so that we
are ready to promote it.
  • Loading branch information
mkowalski committed Mar 12, 2024
1 parent fcf3734 commit 2cdac33
Show file tree
Hide file tree
Showing 11 changed files with 527 additions and 122 deletions.
112 changes: 112 additions & 0 deletions config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,34 @@ spec:
maxItems: 2
type: array
x-kubernetes-list-type: set
loadBalancer:
default:
type: OpenShiftManagedDefault
description: loadBalancer defines how the load balancer used
by the cluster is configured.
properties:
type:
default: OpenShiftManagedDefault
description: type defines the type of load balancer used
by the cluster on BareMetal platform which can be a
user-managed or openshift-managed load balancer that
is to be used for the OpenShift API and Ingress endpoints.
When set to OpenShiftManagedDefault the static pods
in charge of API and Ingress traffic load-balancing
defined in the machine config operator will be deployed.
When set to UserManaged these static pods will not be
deployed and it is expected that the load balancer is
configured out of band by the deployer. When omitted,
this means no opinion and the platform is left to choose
a reasonable default. The default value is OpenShiftManagedDefault.
enum:
- OpenShiftManagedDefault
- UserManaged
type: string
x-kubernetes-validations:
- message: type is immutable once set
rule: oldSelf == '' || self == oldSelf
type: object
machineNetworks:
description: machineNetworks are IP networks used to connect
all the OpenShift cluster nodes.
Expand Down Expand Up @@ -1431,6 +1459,34 @@ spec:
maxItems: 2
type: array
x-kubernetes-list-type: set
loadBalancer:
default:
type: OpenShiftManagedDefault
description: loadBalancer defines how the load balancer used
by the cluster is configured.
properties:
type:
default: OpenShiftManagedDefault
description: type defines the type of load balancer used
by the cluster on Nutanix platform which can be a user-managed
or openshift-managed load balancer that is to be used
for the OpenShift API and Ingress endpoints. When set
to OpenShiftManagedDefault the static pods in charge
of API and Ingress traffic load-balancing defined in
the machine config operator will be deployed. When set
to UserManaged these static pods will not be deployed
and it is expected that the load balancer is configured
out of band by the deployer. When omitted, this means
no opinion and the platform is left to choose a reasonable
default. The default value is OpenShiftManagedDefault.
enum:
- OpenShiftManagedDefault
- UserManaged
type: string
x-kubernetes-validations:
- message: type is immutable once set
rule: oldSelf == '' || self == oldSelf
type: object
type: object
openstack:
description: OpenStack contains settings specific to the OpenStack
Expand Down Expand Up @@ -1575,6 +1631,34 @@ spec:
maxItems: 2
type: array
x-kubernetes-list-type: set
loadBalancer:
default:
type: OpenShiftManagedDefault
description: loadBalancer defines how the load balancer used
by the cluster is configured.
properties:
type:
default: OpenShiftManagedDefault
description: type defines the type of load balancer used
by the cluster on Ovirt platform which can be a user-managed
or openshift-managed load balancer that is to be used
for the OpenShift API and Ingress endpoints. When set
to OpenShiftManagedDefault the static pods in charge
of API and Ingress traffic load-balancing defined in
the machine config operator will be deployed. When set
to UserManaged these static pods will not be deployed
and it is expected that the load balancer is configured
out of band by the deployer. When omitted, this means
no opinion and the platform is left to choose a reasonable
default. The default value is OpenShiftManagedDefault.
enum:
- OpenShiftManagedDefault
- UserManaged
type: string
x-kubernetes-validations:
- message: type is immutable once set
rule: oldSelf == '' || self == oldSelf
type: object
nodeDNSIP:
description: 'deprecated: as of 4.6, this field is no longer
set or honored. It will be removed in a future release.'
Expand Down Expand Up @@ -1730,6 +1814,34 @@ spec:
maxItems: 2
type: array
x-kubernetes-list-type: set
loadBalancer:
default:
type: OpenShiftManagedDefault
description: loadBalancer defines how the load balancer used
by the cluster is configured.
properties:
type:
default: OpenShiftManagedDefault
description: type defines the type of load balancer used
by the cluster on VSphere platform which can be a user-managed
or openshift-managed load balancer that is to be used
for the OpenShift API and Ingress endpoints. When set
to OpenShiftManagedDefault the static pods in charge
of API and Ingress traffic load-balancing defined in
the machine config operator will be deployed. When set
to UserManaged these static pods will not be deployed
and it is expected that the load balancer is configured
out of band by the deployer. When omitted, this means
no opinion and the platform is left to choose a reasonable
default. The default value is OpenShiftManagedDefault.
enum:
- OpenShiftManagedDefault
- UserManaged
type: string
x-kubernetes-validations:
- message: type is immutable once set
rule: oldSelf == '' || self == oldSelf
type: object
machineNetworks:
description: machineNetworks are IP networks used to connect
all the OpenShift cluster nodes.
Expand Down
2 changes: 1 addition & 1 deletion config/v1/feature_gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,6 @@ var (
reportProblemsToJiraComponent("metal").
contactPerson("EmilienM").
productScope(ocpSpecific).
enableIn(TechPreviewNoUpgrade).
enableIn(Default, TechPreviewNoUpgrade).
mustRegister()
)
111 changes: 108 additions & 3 deletions config/v1/stable.infrastructure.testsuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,46 @@ tests:
loadBalancer:
type: OpenShiftManagedDefault
type: OpenStack
- name: Should be able to override the default load balancer with a valid value
- name: Should be able to override the default BareMetal load balancer with a valid value
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
loadBalancer:
type: UserManaged
type: BareMetal
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
controlPlaneTopology: HighlyAvailable
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
platform: BareMetal
platformStatus:
baremetal:
loadBalancer:
type: UserManaged
type: BareMetal
- name: Should be able to override the default OpenStack load balancer with a valid value
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
Expand Down Expand Up @@ -558,7 +597,41 @@ tests:
loadBalancer:
type: UserManaged
type: OpenStack
- name: Should not allow changing the immutable load balancer type field
- name: Should not allow changing the immutable BareMetal load balancer type field
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: BareMetal
platformStatus:
baremetal:
loadBalancer:
type: OpenShiftManagedDefault
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: BareMetal
baremetal: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: BareMetal
platformStatus:
baremetal:
loadBalancer:
type: UserManaged
type: BareMetal
expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
- name: Should not allow changing the immutable OpenStack load balancer type field
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
Expand Down Expand Up @@ -592,7 +665,7 @@ tests:
type: UserManaged
type: OpenStack
expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
- name: Should not allow removing the immutable load balancer type field that was initially set
- name: Should not allow removing the immutable OpenStack load balancer type field that was initially set
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
Expand Down Expand Up @@ -624,6 +697,38 @@ tests:
openstack: {}
type: OpenStack
expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
- name: Should not allow removing the immutable BareMetal load balancer type field that was initially set
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: BareMetal
platformStatus:
baremetal:
loadBalancer:
type: UserManaged
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: BareMetal
baremetal: {}
status:
controlPlaneTopology: HighlyAvailable
infrastructureTopology: HighlyAvailable
platform: BareMetal
platformStatus:
baremetal: {}
type: BareMetal
expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
- name: Should not allow setting the load balancer type to a wrong value
initial: |
apiVersion: config.openshift.io/v1
Expand Down

0 comments on commit 2cdac33

Please sign in to comment.