Skip to content

Commit

Permalink
More precise logs to understand failure
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Adil Ghaffar <[email protected]>
  • Loading branch information
adilGhaffarDev committed Jan 24, 2025
1 parent 7aaf7b8 commit bdeeef6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/v1beta1/metal3cluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (c *Metal3Cluster) validate(oldM3C *Metal3Cluster) error {
field.Invalid(
field.NewPath("spec", "cloudProviderEnabled"),
c.Spec.CloudProviderEnabled,
"cloudProviderEnabled conflicts the value of noCloudProvider",
"ValidateUpdate failed, cloudProviderEnabled conflicts the value of noCloudProvider",
),
)
}
Expand All @@ -110,7 +110,7 @@ func (c *Metal3Cluster) validate(oldM3C *Metal3Cluster) error {
field.Invalid(
field.NewPath("spec", "noCloudProvider"),
c.Spec.NoCloudProvider,
"noCloudProvider conflicts the value of cloudProviderEnabled",
"ValidateUpdate failed, noCloudProvider conflicts the value of cloudProviderEnabled",
),
)
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/metal3cluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestMetal3ClusterValidation(t *testing.T) {
Host: "abc.com",
Port: 443,
},
NoCloudProvider: ptr.To(false),
NoCloudProvider: ptr.To(true),
},
},
oldCluster: valid,
Expand Down

0 comments on commit bdeeef6

Please sign in to comment.