We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577a02f commit e1a6babCopy full SHA for e1a6bab
internal/controller/keycloakrealmuser/terminator.go
@@ -7,6 +7,7 @@ import (
7
ctrl "sigs.k8s.io/controller-runtime"
8
9
"github.com/epam/edp-keycloak-operator/pkg/client/keycloak"
10
+ keycloakadapter "github.com/epam/edp-keycloak-operator/pkg/client/keycloak/adapter"
11
)
12
13
type terminator struct {
@@ -25,6 +26,12 @@ func (t *terminator) DeleteResource(ctx context.Context) error {
25
26
log.Info("Start deleting keycloak realm user")
27
28
if err := t.kClient.DeleteRealmUser(ctx, t.realmName, t.userName); err != nil {
29
+ if keycloakadapter.IsErrNotFound(err) {
30
+ log.Info("Realm user not found, skipping deletion.")
31
+
32
+ return nil
33
+ }
34
35
return fmt.Errorf("unable to delete realm user %w", err)
36
}
37
0 commit comments