Skip to content

Commit

Permalink
Allow to configure gitOps during kindless management cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
panktishah26 committed Oct 6, 2023
1 parent 17d6a80 commit d180002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/v1alpha1/cluster_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func validateImmutableFieldsCluster(new, old *Cluster) field.ErrorList {
}
}

if !new.Spec.GitOpsRef.Equal(old.Spec.GitOpsRef) {
if !new.Spec.GitOpsRef.Equal(old.Spec.GitOpsRef) && !old.IsSelfManaged() {
allErrs = append(
allErrs,
field.Forbidden(specPath.Child("GitOpsRef"), fmt.Sprintf("field is immutable %v", new.Spec.GitOpsRef)))
Expand Down

0 comments on commit d180002

Please sign in to comment.