diff --git a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakController.java b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakController.java index d8ef61c895..94d308bb65 100644 --- a/operator/src/main/java/org/keycloak/operator/controllers/KeycloakController.java +++ b/operator/src/main/java/org/keycloak/operator/controllers/KeycloakController.java @@ -103,9 +103,7 @@ public class KeycloakController implements Reconciler, EventSourceInit var kcAdminSecret = new KeycloakAdminSecret(client, kc); kcAdminSecret.createOrUpdateReconciled(); - // TODO use caches in secondary resources; this is a workaround for https://github.com/java-operator-sdk/java-operator-sdk/issues/830 - // KeycloakDeployment deployment = new KeycloakDeployment(client, config, kc, context.getSecondaryResource(Deployment.class).orElse(null)); - var kcDeployment = new KeycloakDeployment(client, config, kc, null, kcAdminSecret.getName()); + var kcDeployment = new KeycloakDeployment(client, config, kc, context.getSecondaryResource(StatefulSet.class).orElse(null), kcAdminSecret.getName()); var watchedSecrets = new WatchedSecretsStore(kcDeployment.getConfigSecretsNames(), client, kc); kcDeployment.createOrUpdateReconciled(); if (watchedSecrets.changesDetected()) {