diff --git a/src/internal/controller/zitadelcluster_controller.go b/src/internal/controller/zitadelcluster_controller.go index 0267eff..a2cf64d 100644 --- a/src/internal/controller/zitadelcluster_controller.go +++ b/src/internal/controller/zitadelcluster_controller.go @@ -533,12 +533,15 @@ func (r *ZitadelClusterReconciler) reconcileDomainPolicy(ctx context.Context, zi if err != nil { return ctrl.Result{}, err } + if _, err = adminClient.UpdateDomainPolicy(ctx, &adm.UpdateDomainPolicyRequest{ UserLoginMustBeDomain: zitadel.Spec.DomainSettings.UserLoginMustBeDomain, ValidateOrgDomains: zitadel.Spec.DomainSettings.ValidateOrgDomains, SmtpSenderAddressMatchesInstanceDomain: zitadel.Spec.DomainSettings.SMTPSenderAddressMatchesInstanceDomain, }); err != nil { - return ctrl.Result{}, fmt.Errorf("Could not update domain policy config: %v", err) + if !strings.Contains(err.Error(), "not been changed") { + return ctrl.Result{}, fmt.Errorf("Could not update domain policy config: %v", err) + } } return ctrl.Result{}, nil }