diff --git a/operator/pom.xml b/operator/pom.xml index 0b795d8c43..b47c400364 100644 --- a/operator/pom.xml +++ b/operator/pom.xml @@ -32,11 +32,10 @@ 11 UTF-8 UTF-8 - 3.0.4 - 2.7.3.Final + 3.0.6 + 2.7.5.Final keycloak - eclipse-temurin:11 - Never + registry.access.redhat.com/ubi8/openjdk-11-runtime 2.22.0 diff --git a/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakController.java b/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakController.java index 5d1cdf7444..8bcd40fe68 100644 --- a/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakController.java +++ b/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakController.java @@ -48,8 +48,7 @@ import java.util.concurrent.TimeUnit; import static io.javaoperatorsdk.operator.api.reconciler.Constants.NO_FINALIZER; import static io.javaoperatorsdk.operator.api.reconciler.Constants.WATCH_CURRENT_NAMESPACE; -// TODO: remove "generationAwareEventProcessing = false" when the race condition is fixed -@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE, finalizerName = NO_FINALIZER, generationAwareEventProcessing = false) +@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE, finalizerName = NO_FINALIZER) public class KeycloakController implements Reconciler, EventSourceInitializer, ErrorStatusHandler { @Inject diff --git a/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakRealmImportController.java b/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakRealmImportController.java index f046fe9329..7ed85587e7 100644 --- a/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakRealmImportController.java +++ b/operator/src/main/java/org/keycloak/operator/v2alpha1/KeycloakRealmImportController.java @@ -48,8 +48,7 @@ import java.util.concurrent.TimeUnit; import static io.javaoperatorsdk.operator.api.reconciler.Constants.NO_FINALIZER; import static io.javaoperatorsdk.operator.api.reconciler.Constants.WATCH_CURRENT_NAMESPACE; -// TODO: remove "generationAwareEventProcessing = false" when the race condition is fixed -@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE, finalizerName = NO_FINALIZER, generationAwareEventProcessing = false) +@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE, finalizerName = NO_FINALIZER) public class KeycloakRealmImportController implements Reconciler, EventSourceInitializer, ErrorStatusHandler { @Inject diff --git a/operator/src/main/java/org/keycloak/operator/v2alpha1/WatchedSecretsStore.java b/operator/src/main/java/org/keycloak/operator/v2alpha1/WatchedSecretsStore.java index 4c65bae66a..3c45923501 100644 --- a/operator/src/main/java/org/keycloak/operator/v2alpha1/WatchedSecretsStore.java +++ b/operator/src/main/java/org/keycloak/operator/v2alpha1/WatchedSecretsStore.java @@ -118,7 +118,7 @@ public class WatchedSecretsStore extends OperatorManagedResource { .endMetadata() .build(); - client.secrets().patch(secret); + client.secrets().inNamespace(secret.getMetadata().getNamespace()).withName(secret.getMetadata().getName()).patch(secret); } } } @@ -200,7 +200,7 @@ public class WatchedSecretsStore extends OperatorManagedResource { private static void cleanObsoleteLabelFromSecret(KubernetesClient client, Secret secret) { secret.getMetadata().getLabels().remove(Constants.KEYCLOAK_COMPONENT_LABEL); - client.secrets().patch(secret); + client.secrets().inNamespace(secret.getMetadata().getNamespace()).withName(secret.getMetadata().getName()).patch(secret); } public static EventSource getWatchedSecretsEventSource(KubernetesClient client, String namespace) { diff --git a/operator/src/main/java/org/keycloak/operator/v2alpha1/crds/KeycloakSpec.java b/operator/src/main/java/org/keycloak/operator/v2alpha1/crds/KeycloakSpec.java index cf8503a0c7..d41763f615 100644 --- a/operator/src/main/java/org/keycloak/operator/v2alpha1/crds/KeycloakSpec.java +++ b/operator/src/main/java/org/keycloak/operator/v2alpha1/crds/KeycloakSpec.java @@ -16,6 +16,7 @@ */ package org.keycloak.operator.v2alpha1.crds; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonPropertyDescription; import org.keycloak.operator.Constants; @@ -53,6 +54,7 @@ public class KeycloakSpec { this.hostname = hostname; } + @JsonIgnore public boolean isHostnameDisabled() { return this.hostname.equals(Constants.INSECURE_DISABLE); } @@ -73,6 +75,7 @@ public class KeycloakSpec { this.tlsSecret = tlsSecret; } + @JsonIgnore public boolean isHttp() { return this.tlsSecret.equals(Constants.INSECURE_DISABLE); }