diff --git a/pkg/api/v1alpha1/cluster_webhook.go b/pkg/api/v1alpha1/cluster_webhook.go index 703fbcd0ef44d..41e2ca5bad699 100644 --- a/pkg/api/v1alpha1/cluster_webhook.go +++ b/pkg/api/v1alpha1/cluster_webhook.go @@ -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)))