cluster-api-provider-vsphere
cluster-api-provider-vsphere copied to clipboard
capv not validating failure domain is valid in cluster class deployment
/kind bug
What steps did you take and what happened:
Deployed a cluster class yaml to create a cluster. The cluster yaml manifest had incorrect values for failureDomain for each of the node pools.
What happened - kubectl apply -f cluster-class.yaml was accepted without error. The Cluster object was created. Control plane node(s) created because they do not have a failuerDomain spec. No worker nodes / node pools created. kubectl get ms/md showed node pools scaling up but nothing ever appears due to incorrect failureDomain.
kubectl get clusters - show cluster provisioned kubectl get ms / md showed scaling up
What did you expect to happen:
I expected an error similar to what occurs for a TKC based cluster informing me that the failureDomain is not valid for the node-pools.
Anything else you would like to add:
The same mistake on a TKC cluster manifest will product an error from the admission webhook stating
"Error from server (failure domain is not valid for nodepool workerpool-1: "zone1", failure domain is not valid for nodepool workerpool-2: "zone2", failure domain is not valid for nodepool workerpool-3: "zone3"): error when creating "tkc-classic-cluster.yaml": admission webhook "default.validating.tanzukubernetescluster.run.vmware.com" denied for request: failure domain is not valid for nodepool workerpool-1 "zone1", failure domain is not valid for nodepool wokerpool-2 "zone2", failure domain is not valid for nodepool workerpool-3: "zone3"
Environment:
-
Cluster-api-provider-vsphere version: - capv-controller:v1.3.1_vmware.1
-
Kubernetes version: (use
kubectl version): - SC v1.23.5+vmware.wcp2-vsc1.0-20413629 - Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5+vmware.wcp.2", GitCommit:"0f23d9e39892fef2a7e9da16d6b517d579a3164d", GitTreeState:"clean", BuildDate:"2022-05-26T18:56:08Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5+vmware.wcp.2", GitCommit:"0f23d9e39892fef2a7e9da16d6b517d579a3164d", GitTreeState:"clean", BuildDate:"2022-05-26T18:50:09Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"}- OS (e.g. from/etc/os-release):- jumpbox: Ubuntu 20.04.1 LTS - vCenter 8.0.0 build 20426518 - ESXi 8.0.0 build 20426517 - SC v1.23.5+vmware.wcp2-vsc1.0-20413629