diff --git a/src/internal/controller/zitadelcluster_controller.go b/src/internal/controller/zitadelcluster_controller.go index 218990c..2e4f414 100644 --- a/src/internal/controller/zitadelcluster_controller.go +++ b/src/internal/controller/zitadelcluster_controller.go @@ -512,7 +512,9 @@ func (r *ZitadelClusterReconciler) reconcileSMTPConfig(ctx context.Context, zita Domain: strings.Split(zitadel.Spec.SMTPConfig.SenderAddress, "@")[1], }) if err != nil { - return ctrl.Result{}, err + if !strings.Contains(err.Error(), "AlreadyExists") { + return ctrl.Result{}, fmt.Errorf("Could add smtp trusted domain: %v", err) + } } var smtpId string resp, err := adminClient.GetSMTPConfig(ctx, &adm.GetSMTPConfigRequest{}) @@ -600,7 +602,7 @@ func (r *ZitadelClusterReconciler) reconcileDomainPolicy(ctx context.Context, zi ValidateOrgDomains: zitadel.Spec.DomainSettings.ValidateOrgDomains, SmtpSenderAddressMatchesInstanceDomain: zitadel.Spec.DomainSettings.SMTPSenderAddressMatchesInstanceDomain, }); err != nil { - if !strings.Contains(err.Error(), "AlreadyExists") { + if !strings.Contains(err.Error(), "not been changed") { return ctrl.Result{}, fmt.Errorf("Could not update domain policy config: %v", err) } }