Skip to content

Commit ca4a2eb

Browse files
committed
fixup! feat(preflight): Add a check for storage containers
Run check only if CSI is configured
1 parent 0cca0e8 commit ca4a2eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/webhook/preflight/nutanix/storagecontainer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ import (
2020
func (n *nutanixChecker) initStorageContainerChecks() []preflight.Check {
2121
checks := []preflight.Check{}
2222

23+
// If there is no CSI configuration, there is no need to check for storage containers.
24+
if n.nutanixClusterConfigSpec == nil ||
25+
n.nutanixClusterConfigSpec.Addons == nil ||
26+
n.nutanixClusterConfigSpec.Addons.CSI == nil {
27+
return checks
28+
}
29+
2330
if n.nutanixClusterConfigSpec != nil && n.nutanixClusterConfigSpec.ControlPlane != nil &&
2431
n.nutanixClusterConfigSpec.ControlPlane.Nutanix != nil {
2532
checks = append(checks,

0 commit comments

Comments
 (0)