Skip to content

Commit

Permalink
Add Kubernetes manifests for Keycloak deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Awambeng committed Dec 9, 2024
1 parent 1d3b286 commit dd94caf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
27 changes: 10 additions & 17 deletions deployment_manifest/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: keycloak
labels:
app: keycloak
namespace: datev-wallet
spec:
replicas: 1
selector:
Expand All @@ -15,45 +16,36 @@ spec:
labels:
app: keycloak
spec:
imagePullSecrets:
- name: ghcr-pull-secret
containers:
- name: keycloak
image: quay.io/keycloak/keycloak:26.0.5
image: ghcr.io/adorsys/keycloak-ssi-deployment:latest
env:
- name: KC_DB
value: postgres
- name: KC_DB_URL_HOST
- name: KC_DB_HOST
value: postgres-service
- name: KC_DB_URL_DATABASE
- name: KC_DB_NAME
value: keycloak
- name: KC_DB_URL_PORT
- name: KC_DB_EXPOSED_PORT
value: "5432"
- name: KC_DB_USERNAME
value: keycloak
- name: KC_DB_PASSWORD
value: keycloak
- name: KC_DB_OPTS
value: "-db postgres --db-url jdbc:postgresql://postgres-service:5432/keycloak --db-username keycloak--db-password keycloak"

# Admin user configurations
- name: KC_HOSTNAME
value: keycloak
- name: KC_BOOTSTRAP_ADMIN_USERNAME
value: admin
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
value: admin
- name: KEYCLOAK_HTTPS_PORT
value: "8443"
- name: KC_SERVER_CERT
value: /path/to/certificate.crt
- name: KC_SERVER_KEY
value: /path/to/private.key
ports:
- containerPort: 8443
args:
- start-dev --features=oid4vc-vci
- '--spi-db-schema-manager-updates=update'
- '--hostname-strict=false'
- '--https-port=$(KEYCLOAK_HTTPS_PORT)'
- '--https-certificate-file=$(KC_SERVER_CERT)'
- '--https-certificate-key-file=$(KC_SERVER_KEY)'
volumeMounts:
- mountPath: /opt/keycloak/data
name: keycloak-data
Expand All @@ -65,6 +57,7 @@ apiVersion: v1
kind: Service
metadata:
name: keycloak
namespace: datev-wallet
spec:
type: LoadBalancer
selector:
Expand Down
2 changes: 2 additions & 0 deletions deployment_manifest/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: datev-wallet
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -37,6 +38,7 @@ apiVersion: v1
kind: Service
metadata:
name: postgres-service
namespace: datev-wallet
spec:
ports:
- port: 5432
Expand Down

0 comments on commit dd94caf

Please sign in to comment.