Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Add lifecycle hooks option for keycloak container (#12783)
Browse files Browse the repository at this point in the history
* Add lifecycle hooks option for keycloak container

Signed-off-by: radu mazilu <radumazi2@gmail.com>

* pr changes

Signed-off-by: radu mazilu <radumazi2@gmail.com>

* Update statefulset.yaml

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>

* Update Chart.yaml

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
  • Loading branch information
radumazi authored and k8s-ci-robot committed Apr 8, 2019
1 parent d40fc39 commit a947787
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/keycloak/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: keycloak
version: 4.9.0
version: 4.10.0
appVersion: 5.0.0
description: Open Source Identity and Access Management For Modern Applications and Services
keywords:
Expand Down
1 change: 1 addition & 0 deletions stable/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Parameter | Description | Default
`keycloak.hostAliases` | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | `[]`
`keycloak.securityContext` | Security context for the pod | `{runAsUser: 1000, fsGroup: 1000, runAsNonRoot: true}`
`keycloak.preStartScript` | Custom script to run before Keycloak starts up | ``
`keycloak.lifecycleHooks` | Container lifecycle hooks. Passed through the `tpl` function and thus to be configured a string | ``
`keycloak.extraArgs` | Additional arguments to the start command | ``
`keycloak.livenessProbe.initialDelaySeconds` | Liveness Probe `initialDelaySeconds` | `120`
`keycloak.livenessProbe.timeoutSeconds` | Liveness Probe `timeoutSeconds` | `5`
Expand Down
4 changes: 4 additions & 0 deletions stable/keycloak/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
imagePullPolicy: {{ .Values.keycloak.image.pullPolicy }}
command:
- /scripts/keycloak.sh
{{- if .Values.keycloak.lifecycleHooks }}
lifecycle:
{{ tpl .Values.keycloak.lifecycleHooks . | indent 12 }}
{{- end }}
env:
{{- if .Release.IsInstall }}
- name: KEYCLOAK_USER
Expand Down
6 changes: 6 additions & 0 deletions stable/keycloak/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ keycloak:
## Custom script that is run before Keycloak is started.
preStartScript:

## lifecycleHooks defines the container lifecycle hooks
lifecycleHooks: |
# postStart:
# exec:
# command: ["/bin/sh", "-c", "ls"]
## Additional arguments to start command e.g. -Dkeycloak.import= to load a realm
extraArgs: ""

Expand Down

0 comments on commit a947787

Please sign in to comment.