You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(preflight): check storage containers on all failure domains (#1215)
If control plane or a machine deployment uses failure domains, use the
cluster from the failure domain instead of machine details.
**How has this been tested?**
1. Misconfigured storage container (doesn't actually exist) on cluster
in machine details or on cluster in failure domain (e.g.
`ncn-dev-sandbox-gpu` doesn't have `k8s` storage container)
2. Create failure domain
```
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: NutanixFailureDomain
metadata:
name: fd-2
namespace: default
spec:
prismElementCluster:
type: name
name: ncn-dev-sandbox-gpu
subnets:
- type: name
name: subnet-2
```
3. Create a cluster
```
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
...
spec:
...
topology:
class: nutanix-quick-start
controlPlane:
metadata: {}
replicas: 3
variables:
...
- name: workerConfig
value:
nutanix:
machineDetails:
bootType: uefi
cluster:
name: ncn-dev-sandbox-gpu
type: name
imageLookup:
baseOS: rocky-9.6
format: nkp-{{.BaseOS}}-release-{{.K8sVersion}}-*
memorySize: 4Gi
subnets:
- name: vlan173
type: name
systemDiskSize: 40Gi
vcpuSockets: 2
vcpusPerSocket: 1
version: 1.33.1
workers:
machineDeployments:
- class: default-worker
name: md-variable-override
variables:
overrides:
- name: workerConfig
value:
nutanix:
machineDetails:
...
cluster:
name: ncn-dev-sandbox-gpu
type: name
- class: default-worker
failureDomain: fd-2
name: md-variable-override-failure-domain
variables:
overrides:
- name: workerConfig
value:
nutanix:
machineDetails:
...
cluster:
name: ncn-dev-sandbox-gpu
type: name
```
4. Observe pre-flight failure on 2 machine deployments
```
The request is invalid:
* $.spec.topology.workers.machineDeployments[[email protected]=="md-variable-override-failure-domain"].failureDomain: Found no Storage Containers with name "k8s" on Cluster "ncn-dev-sandbox-gpu". Create a Storage Container with this name on Cluster "ncn-dev-sandbox-gpu", and then retry.
* $.spec.topology.workers.machineDeployments[[email protected]=="md-variable-override"].variables[[email protected]=workerConfig].value.nutanix.machineDetails: Found no Storage Containers with name "k8s" on Cluster "ncn-dev-sandbox-gpu". Create a Storage Container with this name on Cluster "ncn-dev-sandbox-gpu", and then retry.
```
0 commit comments