Skip to content

Commit f3ecc7f

Browse files
Simon Emmsroboquat
Simon Emms
authored andcommitted
[installer]: change validation status if the cluster config validation fails
1 parent c989581 commit f3ecc7f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

installer/cmd/validate-cluster.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ var validateClusterCmd = &cobra.Command{
5555
return err
5656
}
5757

58+
// Update the status
59+
switch res.Status {
60+
case cluster.ValidationStatusError:
61+
// Always change the status if error
62+
result.Status = cluster.ValidationStatusError
63+
case cluster.ValidationStatusWarning:
64+
// Only put to warning if status is ok
65+
if result.Status == cluster.ValidationStatusOk {
66+
result.Status = cluster.ValidationStatusWarning
67+
}
68+
}
69+
5870
result.Items = append(result.Items, res.Items...)
5971
}
6072

0 commit comments

Comments
 (0)