Skip to content

Commit

Permalink
Changed vcenter MaxItems to be 3 for TechPreview.
Browse files Browse the repository at this point in the history
  • Loading branch information
vr4manta committed Apr 29, 2024
1 parent a8b3ba9 commit cbbd567
Show file tree
Hide file tree
Showing 41 changed files with 4,290 additions and 22 deletions.
7 changes: 7 additions & 0 deletions config/v1/feature_gates.go
Expand Up @@ -338,6 +338,13 @@ var (
enableIn(Default, DevPreviewNoUpgrade, TechPreviewNoUpgrade).
mustRegister()

FeatureGateVSphereMultiVCenters = newFeatureGate("VSphereMultiVCenters").
reportProblemsToJiraComponent("splat").
contactPerson("vr4manta").
productScope(ocpSpecific).
enableIn(DevPreviewNoUpgrade, TechPreviewNoUpgrade).
mustRegister()

FeatureGateVSphereStaticIPs = newFeatureGate("VSphereStaticIPs").
reportProblemsToJiraComponent("splat").
contactPerson("rvanderp3").
Expand Down
3 changes: 2 additions & 1 deletion config/v1/types_infrastructure.go
Expand Up @@ -1333,8 +1333,9 @@ type VSpherePlatformSpec struct {
// ---
// + If VCenters is not defined use the existing cloud-config configmap defined
// + in openshift-config.
// +kubebuilder:validation:MaxItems=1
// +kubebuilder:validation:MinItems=0
// +openshift:validation:FeatureGateAwareMaxItems:featureGate="",maxItems=1
// +openshift:validation:FeatureGateAwareMaxItems:featureGate=VSphereMultiVCenters,maxItems=3
// +listType=atomic
// +optional
VCenters []VSpherePlatformVCenterSpec `json:"vcenters,omitempty"`
Expand Down
Expand Up @@ -892,7 +892,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -892,7 +892,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -892,7 +892,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
1 change: 1 addition & 0 deletions config/v1/zz_generated.featuregated-crd-manifests.yaml
Expand Up @@ -303,6 +303,7 @@ infrastructures.config.openshift.io:
- GCPClusterHostedDNS
- GCPLabelsTags
- VSphereControlPlaneMachineSet
- VSphereMultiVCenters
FilenameOperatorName: config-operator
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_10"
Expand Down
Expand Up @@ -864,7 +864,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -864,7 +864,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -864,7 +864,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -880,7 +880,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions example/v1/types_stable.go
Expand Up @@ -67,6 +67,12 @@ type StableConfigTypeSpec struct {
// celUnion demonstrates how to validate a discrminated union using CEL
// +optional
CELUnion CELUnion `json:"celUnion,omitempty"`

// EvolvingCollection demonstrates how to have a collection where the maximum number of items varies on cluster type.
// For default clusters, this will be "1" but on TechPreview clusters, this value will be "3".
// +openshift:validation:FeatureGateAwareMaxItems:featureGate="",maxItems=1
// +openshift:validation:FeatureGateAwareMaxItems:featureGate=Example,maxItems=3
EvolvingCollection []string `json:"evolvingCollection,omitempty"`
}

type EvolvingUnion struct {
Expand Down
Expand Up @@ -71,6 +71,15 @@ spec:
description: coolNewField is a field that is for tech preview only. On
normal clusters this shouldn't be present
type: string
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 3
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
Expand Up @@ -67,6 +67,15 @@ spec:
- message: optionalMember is forbidden when type is not OptionalMember
rule: 'has(self.type) && self.type == ''OptionalMember'' ? true
: !has(self.optionalMember)'
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 1
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
Expand Up @@ -71,6 +71,15 @@ spec:
description: coolNewField is a field that is for tech preview only. On
normal clusters this shouldn't be present
type: string
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 3
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
Expand Up @@ -71,6 +71,15 @@ spec:
description: coolNewField is a field that is for tech preview only. On
normal clusters this shouldn't be present
type: string
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 3
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
Expand Up @@ -67,6 +67,15 @@ spec:
- message: optionalMember is forbidden when type is not OptionalMember
rule: 'has(self.type) && self.type == ''OptionalMember'' ? true
: !has(self.optionalMember)'
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 1
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
Expand Up @@ -71,6 +71,15 @@ spec:
description: coolNewField is a field that is for tech preview only. On
normal clusters this shouldn't be present
type: string
evolvingCollection:
description: EvolvingCollection demonstrates how to have a collection
where the maximum number of items varies on cluster type. For default
clusters, this will be "1" but on TechPreview clusters, this value
will be "3".
items:
type: string
maxItems: 3
type: array
evolvingUnion:
description: evolvingUnion demonstrates how to phase in new values
into discriminated union
Expand Down
1 change: 1 addition & 0 deletions features.md
Expand Up @@ -41,6 +41,7 @@
| TranslateStreamCloseWebsocketRequests| | | <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> |
| UpgradeStatus| | | <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> |
| VSphereDriverConfiguration| | | <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> |
| VSphereMultiVCenters| | | <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> |
| ValidatingAdmissionPolicy| | | <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> |
| 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> |
Expand Down
Expand Up @@ -1185,7 +1185,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -1185,7 +1185,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -1185,7 +1185,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -32,6 +32,7 @@ controllerconfigs.machineconfiguration.openshift.io:
- GCPClusterHostedDNS
- GCPLabelsTags
- VSphereControlPlaneMachineSet
- VSphereMultiVCenters
FilenameOperatorName: machine-config
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_80"
Expand Down
Expand Up @@ -1168,7 +1168,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -1168,7 +1168,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -1168,7 +1168,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -1185,7 +1185,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down

0 comments on commit cbbd567

Please sign in to comment.