40 lines
1.2 KiB
Jsonnet
40 lines
1.2 KiB
Jsonnet
local appDef = import './app-definitions.libsonnet';
|
|
|
|
appDef.helmApplication(
|
|
name="keycloak",
|
|
sourceRepoUrl="https://charts.bitnami.com/bitnami",
|
|
sourceChart="keycloak",
|
|
sourceTargetRevision="19.3.4",
|
|
helmValues={
|
|
ingress: {
|
|
enabled: true,
|
|
hostname: "keycloak.avril"
|
|
},
|
|
initContainers: [
|
|
// https://stackoverflow.com/a/70947232/1040915
|
|
{
|
|
name: "add-backup-to-crontab",
|
|
image: "ubuntu",
|
|
command: [
|
|
"/bin/sh",
|
|
"-c",
|
|
'apt update; apt install -y cron; echo "* * * * * /opt/bitnami/keycloak/bin/kc.sh export --file /backup/realm-export-$(date +%s).json --realm new-realm" | crontab -'
|
|
],
|
|
securityContext: {
|
|
allowPrivilegeEscalation: true,
|
|
runAsUser: 0
|
|
}
|
|
}
|
|
],
|
|
image: {
|
|
tag: "24.0.2"
|
|
},
|
|
extraEnvVars: [
|
|
{
|
|
// https://github.com/keycloak/keycloak/issues/28384
|
|
name: "KEYCLOAK_CACHE_TYPE",
|
|
value: "local"
|
|
}
|
|
]
|
|
}
|
|
) |