Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion features.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
| 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> | <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> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| BuildCSIVolumes| <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> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| CPMSMachineNamePrefix| <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> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| ConsolePluginContentSecurityPolicy| <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> | <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> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| ExternalOIDCWithUIDAndExtraClaimMappings| <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> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down
8 changes: 0 additions & 8 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@ var (
enableIn(configv1.Default, configv1.OKD, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateCPMSMachineNamePrefix = newFeatureGate("CPMSMachineNamePrefix").
reportProblemsToJiraComponent("Cloud Compute / ControlPlaneMachineSet").
contactPerson("chiragkyal").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1714").
enableIn(configv1.Default, configv1.OKD, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateAdminNetworkPolicy = newFeatureGate("AdminNetworkPolicy").
reportProblemsToJiraComponent("Networking/ovn-kubernetes").
contactPerson("tssurya").
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,112 @@ tests:
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
- name: Should be able to create ControlPlaneMachineSet with machineNamePrefix
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
machineNamePrefix: machine-prefix
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
expected: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
machineNamePrefix: machine-prefix
replicas: 3
state: Inactive
strategy:
type: RollingUpdate
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
- name: Should reject to create ControlPlaneMachineSet with empty machineNamePrefix
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
machineNamePrefix: ""
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
expectedError: 'Invalid value: "": spec.machineNamePrefix in body should be at least 1 chars long'
- name: Should reject to create ControlPlaneMachineSet with invalid machineNamePrefix
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
machineNamePrefix: "inv@lid-"
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens (''-''), and periods (''.''). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted.'
- name: Should reject to create ControlPlaneMachineSet with invalid machineNamePrefix - Consecutive periods are not permitted
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
machineNamePrefix: "control..plane"
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens (''-''), and periods (''.''). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted.'
- name: Should reject a missing machineType
initial: |
apiVersion: machine.openshift.io/v1
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions machine/v1/types_controlplanemachineset.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ type ControlPlaneMachineSetSpec struct {
// For example, if machineNamePrefix is set to 'control-plane',
// and three machines are created, their names might be:
// control-plane-abcde-0, control-plane-fghij-1, control-plane-klmno-2
// +openshift:validation:FeatureGateAwareXValidation:featureGate=CPMSMachineNamePrefix,rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted."
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted."
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=245
// +openshift:enable:FeatureGate=CPMSMachineNamePrefix
// +optional
MachineNamePrefix string `json:"machineNamePrefix,omitempty"`

Expand Down
1 change: 0 additions & 1 deletion machine/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ controlplanemachinesets.machine.openshift.io:
Capability: MachineAPI
Category: ""
FeatureGates:
- CPMSMachineNamePrefix
- MachineAPIMigration
FilenameOperatorName: control-plane-machine-set
FilenameOperatorOrdering: "01"
Expand Down
Loading