Skip to content

Commit

Permalink
Upgrade Keycloak
Browse files Browse the repository at this point in the history
Keycloak has been upgraded elsewhere and we need to respond
* Updates the default Keycloak image
* Changes the database environment variable to be dev-mem based
* Changes the env var for initial admin credentials
* Changes the mount path for the initial realm import
  • Loading branch information
psav committed Nov 28, 2023
1 parent c1d5cc2 commit 1036927
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controllers/cloud.redhat.com/providers/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var DefaultImageCaddySideCar = "quay.io/cloudservices/crc-caddy-plugin:a988cd2"
var DefaultImageCaddyGateway = DefaultImageCaddySideCar
var DefaultImageMBOP = "quay.io/cloudservices/mbop:959d00d"
var DefaultImageMocktitlements = "quay.io/cloudservices/mocktitlements:e24820c"
var DefaultKeyCloakVersion = "15.0.2"
var DefaultKeyCloakVersion = "23.0.0"
var DefaultImageKeyCloak = fmt.Sprintf("quay.io/keycloak/keycloak:%s", DefaultKeyCloakVersion)

// MakeLocalDB populates the given deployment object with the local DB struct.
Expand Down
10 changes: 5 additions & 5 deletions controllers/cloud.redhat.com/providers/web/resources_keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ func makeKeycloak(o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodePor

envVars := []core.EnvVar{
{
Name: "DB_VENDOR",
Value: "h2",
Name: "KC_DB",
Value: "dev-mem",
},
{
Name: "PROXY_ADDRESS_FORWARDING",
Value: "true",
},
{
Name: "KEYCLOAK_USER",
Name: "KEYCLOAK_ADMIN",
ValueFrom: &core.EnvVarSource{
SecretKeyRef: &core.SecretKeySelector{
LocalObjectReference: core.LocalObjectReference{
Expand All @@ -159,7 +159,7 @@ func makeKeycloak(o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodePor
},
},
{
Name: "KEYCLOAK_PASSWORD",
Name: "KEYCLOAK_ADMIN_PASSWORD",
ValueFrom: &core.EnvVarSource{
SecretKeyRef: &core.SecretKeySelector{
LocalObjectReference: core.LocalObjectReference{
Expand Down Expand Up @@ -235,7 +235,7 @@ func makeKeycloak(o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodePor
VolumeMounts: []core.VolumeMount{
{
Name: "realm-import",
MountPath: "/json",
MountPath: "/opt/keycloak/data/import/",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/test-ephemeral-gateway/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
template:
spec:
containers:
- image: quay.io/keycloak/keycloak:15.0.2
- image: quay.io/keycloak/keycloak:23.0.0
---
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit 1036927

Please sign in to comment.