Avoid calls to Control Plane when the secondary resource is in cache
Closes #21109
This commit is contained in:
parent
eb5edb3a9b
commit
13a463f71e
1 changed files with 1 additions and 3 deletions
|
@ -103,9 +103,7 @@ public class KeycloakController implements Reconciler<Keycloak>, 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()) {
|
||||
|
|
Loading…
Reference in a new issue