This is challenge from keycloak when I am declaring the external database in keycloak kubernetes custom resource based on it's crd that I got from keycloak-operator installation from https://operatorhub.io/operator/keycloak-operator
This is the Keycloak custom resource I am using for keycloak instance and binding external postgresql db :-
apiVersion: k8s.keycloak.org/v2alpha1
kind: Keycloak
metadata:
name: keycloak-prod
spec:
instances: 1
db:
vendor: postgresql
url: jdbc:postgresql://aksdev-pgdb.postgres.database.azure.com:5432/keycloakdevDB
host: aksdev-pgdb.postgres.database.azure.com
database: keycloakdevDB
port: 5432
schema: public
usernameSecret:
name: keycloak-db-secret
key: username
passwordSecret:
name: keycloak-db-secret
key: password
After applying this resource, the pod stucks in CrashLoopBackOff state and throws such logs:-
$ kubectl logs keycloak-prod-0 -n my-keycloak-operator
Changes detected in configuration.Updating the server image.
Updating the configuration and installing your custom providers, if any. Please wait.
The DelayedHandler was closed before any children handlers were configured. Messages will be written to stderr.
2023-06-07 06:18:19,820 DEBUG [org.jboss.logging] (main) Logging Provider: org.jboss.logging.JBossLogManagerProvider
2023-06-07 06:18:20,479 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement [org.keycloak:keycloak-quarkus-server / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD
2023-06-07 06:18:20,481 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.quarkus:quarkus-vertx-http / runtime=true resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD
2023-06-07 06:18:20,722 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.quarkus:quarkus-logging-json-deployment / runtime=false resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD
2023-06-07 06:18:20,722 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[io.quarkus:quarkus-logging-gelf-deployment / runtime=false resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD
2023-06-07 06:18:20,722 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[org.keycloak:keycloak-quarkus-server-deployment / runtime=false resources=null] to QuarkusClassLoader Augmentation Class Loader: PROD . . .
2023-06-07 06:18:21,203 DEBUG [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Adding elements io.quarkus.bootstrap.classloading.PathTreeClassPathElement[/ runtime=true resources=null] to QuarkusClassLoader Deployment Class Loader: PROD
2023-06-07 06:18:21,212 DEBUG [io.quarkus.deployment.QuarkusAugmentor] (main) Beginning Quarkus augmentation
2023-06-07 06:18:21,487 TRACE [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Class quarkus.properties not found in parent first load from java.net.URLClassLoader@57ac5227
2023-06-07 06:18:21,488 TRACE [io.quarkus.bootstrap.classloading.QuarkusClassLoader] (main) Class quarkus.properties not found in parent first load from java.net.URLClassLoader@57ac5227
ERROR: Failed to run 'build' command.
ERROR: No value present
What might be the reason? which value this error is talking about?