Skip to content
Merged
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
2 changes: 1 addition & 1 deletion config/v1/types_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{
with(vSphereStaticIPs).
with(routeExternalCertificate).
with(automatedEtcdBackup).
with(vSphereControlPlaneMachineset).
without(machineAPIOperatorDisableMachineHealthCheckController).
with(adminNetworkPolicy).
with(dnsNameResolver).
Expand Down Expand Up @@ -214,6 +213,7 @@ var defaultFeatures = &FeatureGateEnabledDisabled{
privateHostedZoneAWS,
buildCSIVolumes,
kmsv1,
vSphereControlPlaneMachineset,
},
Disabled: []FeatureGateDescription{
disableKubeletCloudCredentialProviders, // We do not currently ship the correct config to use the external credentials provider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ spec:
name:
description: name of the failure domain in which the vSphere machine provider will create the VM. Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. When balancing machines across failure domains, the control plane machine set will inject configuration from the Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain.
type: string
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
x-kubernetes-validations:
- rule: 'has(self.platform) && self.platform == ''VSphere'' ? has(self.vsphere) : !has(self.vsphere)'
message: vsphere configuration is required when platform is VSphere, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''AWS'' ? has(self.aws) : !has(self.aws)'
message: aws configuration is required when platform is AWS, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''Azure'' ? has(self.azure) : !has(self.azure)'
Expand All @@ -346,6 +347,8 @@ spec:
message: gcp configuration is required when platform is GCP, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''OpenStack'' ? has(self.openstack) : !has(self.openstack)'
message: openstack configuration is required when platform is OpenStack, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''VSphere'' ? has(self.vsphere) : !has(self.vsphere)'
message: vsphere configuration is required when platform is VSphere, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''Nutanix'' ? has(self.nutanix) : !has(self.nutanix)'
message: nutanix configuration is required when platform is Nutanix, and forbidden otherwise
metadata:
Expand Down
17 changes: 17 additions & 0 deletions machine/v1/0000_10_controlplanemachineset-Default.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,21 @@ spec:
- AlibabaCloud
- Nutanix
- External
vsphere:
description: vsphere configures failure domain information for the VSphere platform.
type: array
items:
description: VSphereFailureDomain configures failure domain information for the vSphere platform
type: object
required:
- name
properties:
name:
description: name of the failure domain in which the vSphere machine provider will create the VM. Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. When balancing machines across failure domains, the control plane machine set will inject configuration from the Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain.
type: string
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
x-kubernetes-validations:
- rule: 'has(self.platform) && self.platform == ''AWS'' ? has(self.aws) : !has(self.aws)'
message: aws configuration is required when platform is AWS, and forbidden otherwise
Expand All @@ -332,6 +347,8 @@ spec:
message: gcp configuration is required when platform is GCP, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''OpenStack'' ? has(self.openstack) : !has(self.openstack)'
message: openstack configuration is required when platform is OpenStack, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''VSphere'' ? has(self.vsphere) : !has(self.vsphere)'
message: vsphere configuration is required when platform is VSphere, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''Nutanix'' ? has(self.nutanix) : !has(self.nutanix)'
message: nutanix configuration is required when platform is Nutanix, and forbidden otherwise
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ spec:
name:
description: name of the failure domain in which the vSphere machine provider will create the VM. Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. When balancing machines across failure domains, the control plane machine set will inject configuration from the Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain.
type: string
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
x-kubernetes-validations:
- rule: 'has(self.platform) && self.platform == ''VSphere'' ? has(self.vsphere) : !has(self.vsphere)'
message: vsphere configuration is required when platform is VSphere, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''AWS'' ? has(self.aws) : !has(self.aws)'
message: aws configuration is required when platform is AWS, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''Azure'' ? has(self.azure) : !has(self.azure)'
Expand All @@ -346,6 +347,8 @@ spec:
message: gcp configuration is required when platform is GCP, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''OpenStack'' ? has(self.openstack) : !has(self.openstack)'
message: openstack configuration is required when platform is OpenStack, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''VSphere'' ? has(self.vsphere) : !has(self.vsphere)'
message: vsphere configuration is required when platform is VSphere, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''Nutanix'' ? has(self.nutanix) : !has(self.nutanix)'
message: nutanix configuration is required when platform is Nutanix, and forbidden otherwise
metadata:
Expand Down
5 changes: 3 additions & 2 deletions machine/v1/types_controlplanemachineset.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const (
// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'Azure' ? has(self.azure) : !has(self.azure)",message="azure configuration is required when platform is Azure, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'GCP' ? has(self.gcp) : !has(self.gcp)",message="gcp configuration is required when platform is GCP, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'OpenStack' ? has(self.openstack) : !has(self.openstack)",message="openstack configuration is required when platform is OpenStack, and forbidden otherwise"
// +openshift:validation:FeatureSetAwareXValidation:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,rule="has(self.platform) && self.platform == 'VSphere' ? has(self.vsphere) : !has(self.vsphere)",message="vsphere configuration is required when platform is VSphere, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'VSphere' ? has(self.vsphere) : !has(self.vsphere)",message="vsphere configuration is required when platform is VSphere, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'Nutanix' ? has(self.nutanix) : !has(self.nutanix)",message="nutanix configuration is required when platform is Nutanix, and forbidden otherwise"
type FailureDomains struct {
// Platform identifies the platform for which the FailureDomain represents.
Expand All @@ -253,8 +253,9 @@ type FailureDomains struct {
GCP *[]GCPFailureDomain `json:"gcp,omitempty"`

// vsphere configures failure domain information for the VSphere platform.
// +listType=map
// +listMapKey=name
// +optional
// +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade
VSphere []VSphereFailureDomain `json:"vsphere,omitempty"`

// OpenStack configures failure domain information for the OpenStack platform.
Expand Down
8 changes: 8 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -18866,7 +18866,11 @@
"items": {
"default": {},
"$ref": "#/definitions/com.github.openshift.api.machine.v1.VSphereFailureDomain"
}
},
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map"
}
},
"x-kubernetes-unions": [
Expand Down
6 changes: 3 additions & 3 deletions payload-manifests/featuregates/featureGate-Default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@
{
"name": "UpgradeStatus"
},
{
"name": "VSphereControlPlaneMachineSet"
},
{
"name": "VSphereStaticIPs"
},
Expand Down Expand Up @@ -137,6 +134,9 @@
},
{
"name": "PrivateHostedZoneAWS"
},
{
"name": "VSphereControlPlaneMachineSet"
}
],
"version": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@
{
"name": "UpgradeStatus"
},
{
"name": "VSphereControlPlaneMachineSet"
},
{
"name": "VSphereStaticIPs"
},
Expand Down Expand Up @@ -139,6 +136,9 @@
},
{
"name": "PrivateHostedZoneAWS"
},
{
"name": "VSphereControlPlaneMachineSet"
}
],
"version": ""
Expand Down