mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/keycloak] option to set realm using start param (#5950)
* option to set realm using start param * expose postStartScript * increment chart versions * don't change incubator * remove readme change to incubator * remove postStartScript and provide example for realm import * extra clarification * rename extraParams to extraArgs * Update README.md
This commit is contained in:
committed by
k8s-ci-robot
parent
4222677fc8
commit
3beb68d94c
@@ -1,5 +1,5 @@
|
||||
name: keycloak
|
||||
version: 1.1.1
|
||||
version: 1.2.0
|
||||
appVersion: 3.4.3.Final
|
||||
description: Open Source Identity and Access Management For Modern Applications and Services
|
||||
keywords:
|
||||
|
||||
@@ -62,6 +62,7 @@ Parameter | Description | Default
|
||||
`keycloak.tolerations` | Node taints to tolerate | `[]`
|
||||
`keycloak.securityContext` | Security context for the pod | `{runAsUser: 1000, fsGroup: 1000, runAsNonRoot: true}`
|
||||
`keycloak.preStartScript` | Custom script to run before Keycloak starts up | ``
|
||||
`keycloak.extraArgs` | Additional arguments to the start command | ``
|
||||
`keycloak.livenessProbe.initialDelaySeconds` | Liveness Probe `initialDelaySeconds` | `120`
|
||||
`keycloak.livenessProbe.timeoutSeconds` | Liveness Probe `timeoutSeconds` | `5`
|
||||
`keycloak.readinessProbe.initialDelaySeconds` | Readiness Probe `initialDelaySeconds` | `30`
|
||||
@@ -149,11 +150,11 @@ See also:
|
||||
keycloak:
|
||||
extraEnv:
|
||||
- name: KEYCLOAK_LOGLEVEL
|
||||
value: : DEBUG
|
||||
value: DEBUG
|
||||
- name: WILDFLY_LOGLEVEL
|
||||
value: DEBUG
|
||||
- name: CACHE_OWNERS:
|
||||
value"3"
|
||||
value: "3"
|
||||
```
|
||||
|
||||
### Providing a Custom Theme
|
||||
@@ -196,6 +197,30 @@ keycloak:
|
||||
- name: theme
|
||||
emptyDir: {}
|
||||
```
|
||||
### Setting a Custom Realm
|
||||
|
||||
A realm can be added by creating a secret or configmap for the realm json file and then supplying this into the chart.
|
||||
It could be mounted using `extraVolumeMounts` and then specified in `extraArgs` using `-Dimport`.
|
||||
First we could create a Secret from a json file using `kubectl create secret generic realm-secret --from-file=realm.json` which we need to reference in `values.yaml`:
|
||||
|
||||
```yaml
|
||||
keycloak:
|
||||
extraVolumes:
|
||||
- name: realm-secret
|
||||
secret:
|
||||
secretName: realm-secret
|
||||
|
||||
extraVolumeMounts:
|
||||
- name: realm-secret
|
||||
mountPath: "/realm/"
|
||||
readOnly: true
|
||||
|
||||
extraArgs: -Dkeycloak.import=/realm/realm.json
|
||||
```
|
||||
|
||||
Alternatively, the file could be added to a custom image (set in `keycloak.image`) and then referenced by `-Dimport`.
|
||||
|
||||
After startup the web admin console for the realm should be available on the path /auth/admin/\<realm name>/console/
|
||||
|
||||
### WildFly Configuration
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ data:
|
||||
{{ . | indent 4 }}
|
||||
{{- end }}
|
||||
|
||||
exec /opt/jboss/docker-entrypoint.sh -b 0.0.0.0 {{- if $highAvailability }} --server-config standalone-ha.xml{{ end }}
|
||||
exec /opt/jboss/docker-entrypoint.sh -b 0.0.0.0 {{ .Values.keycloak.extraArgs }}{{- if $highAvailability }} --server-config standalone-ha.xml{{ end }}
|
||||
exit "$?"
|
||||
|
||||
keycloak.cli: |
|
||||
|
||||
@@ -29,6 +29,9 @@ keycloak:
|
||||
## Custom script that is run before Keycloak is started.
|
||||
preStartScript:
|
||||
|
||||
## Additional arguments to start command e.g. -Dkeycloak.import= to load a realm
|
||||
extraArgs:
|
||||
|
||||
## Username for the initial Keycloak admin user
|
||||
username: keycloak
|
||||
|
||||
|
||||
Reference in New Issue
Block a user