Skip to content

Commit dc1ca85

Browse files
committed
fix: Fix incorrect fields
1 parent 32649d9 commit dc1ca85

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/webhook/preflight/nutanix/storagecontainer.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
4747
result.Allowed = false
4848
result.Causes = append(result.Causes, preflight.Cause{
4949
Message: "Nutanix CSI Provider configuration is missing storage class configurations. Review the Cluster.", //nolint:lll // Message is long.
50-
Field: c.field,
50+
Field: "$.spec.topology.variables[[email protected]==\"clusterConfig\"].value.addons.csi.providers.nutanix", //nolint:lll // The field is long.
5151
})
5252

5353
return result
@@ -120,7 +120,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
120120
clusterIdentifier,
121121
err,
122122
),
123-
Field: c.field,
123+
Field: c.field + ".cluster",
124124
})
125125
continue
126126
}
@@ -133,7 +133,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
133133
len(clusters),
134134
clusterIdentifier,
135135
),
136-
Field: c.field,
136+
Field: c.field + ".cluster",
137137
})
138138
continue
139139
}
@@ -152,7 +152,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
152152
clusterIdentifier,
153153
err,
154154
),
155-
Field: c.field,
155+
Field: c.field + ".cluster",
156156
})
157157
continue
158158
}
@@ -169,7 +169,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
169169
clusterIdentifier,
170170
clusterIdentifier,
171171
),
172-
Field: c.field,
172+
Field: "$.spec.topology.variables[[email protected]==\"clusterConfig\"].value.addons.csi.providers.nutanix.storageClassConfigs.volume.parameters.storageContainer", //nolint:lll // The field is long.
173173
})
174174
case 1:
175175
continue
@@ -186,7 +186,7 @@ func (c *storageContainerCheck) Run(ctx context.Context) preflight.CheckResult {
186186
storageContainerName,
187187
clusterIdentifier,
188188
),
189-
Field: c.field,
189+
Field: "$.spec.topology.variables[[email protected]==\"clusterConfig\"].value.addons.csi.providers.nutanix.storageClassConfigs.volume.parameters.storageContainer", //nolint:lll // The field is long.
190190
})
191191
}
192192
}

0 commit comments

Comments
 (0)