-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vSphere - add host and vm based zonal
New feature gate VSphereHostVMGroupZonal Add RegionType and ZoneType fields to VSpherePlatformFailureDomainSpec to specify region and zone failure domain types. Add VSphereFailureDomainAffinity type that contains three fields required for vm-host zonal: VMGroup, HostGroup and VMHostRule. Add VSphereFailureDomainAffinity to VSpherePlatformTopology Create additional unit tests to cover the introduction of vm-host zonal provisioning types. Add VMGroup in a machine(s) workspace.
- Loading branch information
1 parent
8f6ded4
commit 7642ae7
Showing
50 changed files
with
6,902 additions
and
8 deletions.
There are no files selected for viewing
216 changes: 216 additions & 0 deletions
216
config/v1/tests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this | ||
name: "Infrastructure" | ||
crdName: infrastructures.config.openshift.io | ||
featureGate: VSphereHostVMGroupZonal | ||
tests: | ||
onCreate: | ||
- name: Should not be able to have empty affinity fields if ZoneType is HostGroup | ||
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 | ||
affinity: {} | ||
zone: generated-zone | ||
zoneType: HostGroup | ||
nodeNetworking: | ||
external: {} | ||
internal: {} | ||
vcenters: | ||
- datacenters: | ||
- IBMCloud | ||
port: 443 | ||
server: server1.dev.cluster.com | ||
expectedError: "when zoneType is HostGroup, failuredomain topology affinity vmGroup, hostGroup and vmHostRule fields must be defined" | ||
- name: zoneType must be HostGroup if affinity vmGroup, hostGroup and vmHostRule fields are defined | ||
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 | ||
affinity: | ||
vmGroup: vmg1 | ||
hostGroup: hg1 | ||
vmHostRule: mhr1 | ||
zone: generated-zone | ||
nodeNetworking: | ||
external: {} | ||
internal: {} | ||
vcenters: | ||
- datacenters: | ||
- IBMCloud | ||
port: 443 | ||
server: server1.dev.cluster.com | ||
expectedError: "when failuredomain topology affinity vmGroup, hostGroup and vmHostRule fields are defined failuredomain zoneType must be HostGroup" | ||
- name: Should be able to create a vm-host zonal infrastructure 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 | ||
regionType: ComputeCluster | ||
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 | ||
affinity: | ||
vmGroup: vmg1 | ||
hostGroup: hg1 | ||
vmHostRule: mhr1 | ||
zone: generated-zone | ||
zoneType: HostGroup | ||
nodeNetworking: | ||
external: {} | ||
internal: {} | ||
vcenters: | ||
- datacenters: | ||
- IBMCloud | ||
port: 443 | ||
server: server1.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 | ||
regionType: ComputeCluster | ||
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 | ||
affinity: | ||
vmGroup: vmg1 | ||
hostGroup: hg1 | ||
vmHostRule: mhr1 | ||
zone: generated-zone | ||
zoneType: HostGroup | ||
nodeNetworking: | ||
external: {} | ||
internal: {} | ||
vcenters: | ||
- datacenters: | ||
- IBMCloud | ||
port: 443 | ||
server: server1.dev.cluster.com | ||
- name: Should be able to create a non-vm-host zonal infrastructure 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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.