Skip to content

Commit

Permalink
Merge pull request #1842 from vr4manta/SPLAT-1452
Browse files Browse the repository at this point in the history
SPLAT-1452: Changed vcenter MaxItems to be 3 for TechPreview.
  • Loading branch information
openshift-merge-bot[bot] committed May 8, 2024
2 parents 62b890e + 3a0f16f commit 95e2292
Show file tree
Hide file tree
Showing 49 changed files with 4,755 additions and 23 deletions.
@@ -1,6 +1,7 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "Infrastructure"
crdName: infrastructures.config.openshift.io
featureGate: -VSphereMultiVCenters
tests:
onCreate:
- name: Should be able to create a minimal Infrastructure
Expand Down Expand Up @@ -182,6 +183,40 @@ tests:
machineNetworks:
- 192.0.2.1
expectedError: "spec.platformSpec.baremetal.machineNetworks[0]: Invalid value: \"string\": value must be a valid CIDR network address"
- name: Should not be able to pass more than 1 entries to vcenters in the vsphere platform spec
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: VSphere
vsphere:
failureDomains:
- name: generated-failure-domain
region: generated-region
server: server1.dev.cluster.com
topology:
computeCluster: /IBMCloud/host/vcs-8e-workload
datacenter: IBMCloud
datastore: /IBMCloud/datastore/mdcnc-ds-shared
networks:
- ocp-ci-seg-13
resourcePool: /IBMCloud/host/vcs-8e-workload/Resources
template: /IBMCloud/vm/ngirard-dev-rqh5s-rhcos-generated-region-generated-zone
zone: generated-zone
nodeNetworking:
external: {}
internal: {}
vcenters:
- datacenters:
- IBMCloud
port: 443
server: server1.dev.cluster.com
- datacenters:
- IBMCloud2
port: 443
server: server2.dev.cluster.com
expectedError: "Too many: 2: must have at most 1 items"
onUpdate:
- name: Should be able to change External platformName from unknown to something else
initial: |
Expand Down
@@ -0,0 +1,141 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "Infrastructure"
crdName: infrastructures.config.openshift.io
featureGate: VSphereMultiVCenters
tests:
onCreate:
- name: Should be able to create a minimal Infrastructure
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec: {} # No spec is required for a Infrastructure
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec: {}
- name: Should be able to pass more than 1 entries to vcenters in the vsphere platform spec
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
key: config
name: cloud-provider-config
platformSpec:
type: VSphere
vsphere:
failureDomains:
- name: generated-failure-domain
region: generated-region
server: server1.dev.cluster.com
topology:
computeCluster: /IBMCloud/host/vcs-8e-workload
datacenter: IBMCloud
datastore: /IBMCloud/datastore/mdcnc-ds-shared
networks:
- ocp-ci-seg-13
resourcePool: /IBMCloud/host/vcs-8e-workload/Resources
template: /IBMCloud/vm/ngirard-dev-rqh5s-rhcos-generated-region-generated-zone
zone: generated-zone
nodeNetworking:
external: {}
internal: {}
vcenters:
- datacenters:
- IBMCloud
port: 443
server: server1.dev.cluster.com
- datacenters:
- IBMCloud2
port: 443
server: server2.dev.cluster.com
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
key: config
name: cloud-provider-config
platformSpec:
type: VSphere
vsphere:
failureDomains:
- name: generated-failure-domain
region: generated-region
server: server1.dev.cluster.com
topology:
computeCluster: /IBMCloud/host/vcs-8e-workload
datacenter: IBMCloud
datastore: /IBMCloud/datastore/mdcnc-ds-shared
networks:
- ocp-ci-seg-13
resourcePool: /IBMCloud/host/vcs-8e-workload/Resources
template: /IBMCloud/vm/ngirard-dev-rqh5s-rhcos-generated-region-generated-zone
zone: generated-zone
nodeNetworking:
external: {}
internal: {}
vcenters:
- datacenters:
- IBMCloud
port: 443
server: server1.dev.cluster.com
- datacenters:
- IBMCloud2
port: 443
server: server2.dev.cluster.com
onUpdate:
- name: Should be able to set vCenters to multiple
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
key: config
name: cloud-provider-config
platformSpec:
type: VSphere
vsphere:
vcenters:
- datacenters:
- IBMCloud
port: 443
server: vcs8e-vc.ocp2.dev.cluster.com
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
key: config
name: cloud-provider-config
platformSpec:
type: VSphere
vsphere:
vcenters:
- datacenters:
- IBMCloud
port: 443
server: vcs8e-vc.ocp2.dev.cluster.com
- datacenters:
- IBMCloud
port: 443
server: v8c-2-vcenter.ocp2.dev.cluster.com
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
key: config
name: cloud-provider-config
platformSpec:
type: VSphere
vsphere:
vcenters:
- datacenters:
- IBMCloud
port: 443
server: vcs8e-vc.ocp2.dev.cluster.com
- datacenters:
- IBMCloud
port: 443
server: v8c-2-vcenter.ocp2.dev.cluster.com
3 changes: 2 additions & 1 deletion config/v1/types_infrastructure.go
Expand Up @@ -1343,8 +1343,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 @@ -898,7 +898,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -898,7 +898,7 @@ spec:
- datacenters
- server
type: object
maxItems: 1
maxItems: 3
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -898,7 +898,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 @@ -870,7 +870,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -870,7 +870,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -870,7 +870,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down
Expand Up @@ -886,7 +886,6 @@ spec:
- datacenters
- server
type: object
maxItems: 1
minItems: 0
type: array
x-kubernetes-list-type: atomic
Expand Down

0 comments on commit 95e2292

Please sign in to comment.