Add keycloak-bootstrap

This commit is contained in:
paul 2020-12-29 19:08:24 +00:00 committed by Linuro
parent f62c89511e
commit d0b294de75
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,5 @@
apiVersion: v2
name: keycloak-bootstrap
version: 0.1.0
type: application
description: script for adding default resources to a keycloak installation

View file

@ -0,0 +1,41 @@
apiVersion: batch/v1
kind: Job
metadata:
name: keycloak-bootstrap
spec:
template:
spec:
containers:
- name: bootstrap
image: ailox/kcbootstrap
env:
- name: KEYCLOAK_URL
value: {{ .Values.keycloakURL }}
- name: KEYCLOAK_REALM
value: {{ .Values.keycloakRealm }}
- name: KEYCLOAK_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Values.keycloakSecretName }}
key: "username"
- name: KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.keycloakSecretName }}
key: "password"
volumeMounts:
- name: realms-volume
mountPath: "/realms"
readOnly: true
resources:
limits:
memory: 100Mi
requests:
cpu: 50m
memory: 100Mi
volumes:
- name: realms-volume
secret:
secretName: {{ .Values.realmsSecretName }}
restartPolicy: Never
backoffLimit: 10

View file

@ -0,0 +1,11 @@
# Default values for keycloak-bootstrap.
keycloakURL: ""
keycloakRealm: "master"
## needs to contain a `username` and
## `password` attribute.
keycloakSecretName: ""
## contains mapping of filename to realm content
realmsSecretName: ""