Compare commits
12 Commits
d14c607713
...
patch-keyc
Author | SHA1 | Date | |
---|---|---|---|
20977bbc86 | |||
cbf32d11be | |||
ba8d52be03 | |||
5c9f44a214 | |||
e7be6820ab | |||
a6e95707ee | |||
9f6da87d53 | |||
dc16238a95 | |||
0e2bb4f1c6 | |||
7063fe29f6 | |||
22f13dc894 | |||
8e1f7f67a2 |
@@ -10,7 +10,7 @@ jobs:
|
|||||||
helm-package:
|
helm-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
APP: charts/audiobookshelf
|
APP: charts/audiobookshelf
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -24,20 +24,20 @@ jobs:
|
|||||||
|
|
||||||
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
||||||
echo "Helm Chart version: $CHART_VERSION"
|
echo "Helm Chart version: $CHART_VERSION"
|
||||||
echo "::set-output name=tag::$CHART_VERSION"
|
echo "::set-output name=tag::$CHART_VERSION"
|
||||||
|
|
||||||
- name: Setup Helm
|
- name: Setup Helm
|
||||||
run: |
|
run: |
|
||||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.3 && chmod +x /usr/local/bin/helm
|
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||||
helm version
|
helm version
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
run: |
|
run: |
|
||||||
helm dependency update ${{ env.APP }}
|
helm dependency update ${{ env.APP }}
|
||||||
helm lint ${{ env.APP }}
|
helm lint ${{ env.APP }}
|
||||||
helm package ${{ env.APP }}
|
helm package ${{ env.APP }}
|
||||||
|
|
||||||
- name: Upload Helm Package to repo
|
- name: Upload Helm Package to repo
|
||||||
run: |
|
run: |
|
||||||
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
||||||
|
@@ -10,7 +10,7 @@ jobs:
|
|||||||
helm-package:
|
helm-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
APP: charts/dokuwiki
|
APP: charts/dokuwiki
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -24,20 +24,20 @@ jobs:
|
|||||||
|
|
||||||
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
||||||
echo "Helm Chart version: $CHART_VERSION"
|
echo "Helm Chart version: $CHART_VERSION"
|
||||||
echo "::set-output name=tag::$CHART_VERSION"
|
echo "::set-output name=tag::$CHART_VERSION"
|
||||||
|
|
||||||
- name: Setup Helm
|
- name: Setup Helm
|
||||||
run: |
|
run: |
|
||||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.3 && chmod +x /usr/local/bin/helm
|
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||||
helm version
|
helm version
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
run: |
|
run: |
|
||||||
helm dependency update ${{ env.APP }}
|
helm dependency update ${{ env.APP }}
|
||||||
helm lint ${{ env.APP }}
|
helm lint ${{ env.APP }}
|
||||||
helm package ${{ env.APP }}
|
helm package ${{ env.APP }}
|
||||||
|
|
||||||
- name: Upload Helm Package to repo
|
- name: Upload Helm Package to repo
|
||||||
run: |
|
run: |
|
||||||
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
||||||
|
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Setup Helm
|
- name: Setup Helm
|
||||||
run: |
|
run: |
|
||||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.3 && chmod +x /usr/local/bin/helm
|
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||||
helm version
|
helm version
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
|
@@ -3,6 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- keycloak-testing
|
||||||
paths:
|
paths:
|
||||||
- "charts/keycloak/Chart.yaml"
|
- "charts/keycloak/Chart.yaml"
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ jobs:
|
|||||||
- name: Setup Helm
|
- name: Setup Helm
|
||||||
run: |
|
run: |
|
||||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.3 && chmod +x /usr/local/bin/helm
|
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||||
helm version
|
helm version
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
|
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Setup Helm
|
- name: Setup Helm
|
||||||
run: |
|
run: |
|
||||||
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
#curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||||
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.3 && chmod +x /usr/local/bin/helm
|
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
|
||||||
helm version
|
helm version
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Package Helm Chart
|
||||||
|
@@ -2,8 +2,8 @@ apiVersion: v2
|
|||||||
name: audiobookshelf
|
name: audiobookshelf
|
||||||
description: A Helm chart for Audiobookshelf
|
description: A Helm chart for Audiobookshelf
|
||||||
type: application
|
type: application
|
||||||
version: 1.9.2
|
version: 1.10.0
|
||||||
appVersion: "2.25.1"
|
appVersion: "2.29.0"
|
||||||
home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/audiobookshelf
|
home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/audiobookshelf
|
||||||
keywords:
|
keywords:
|
||||||
- audiobookshelf
|
- audiobookshelf
|
||||||
|
@@ -32,5 +32,5 @@ maintainers: []
|
|||||||
name: dokuwiki
|
name: dokuwiki
|
||||||
sources:
|
sources:
|
||||||
- https://git.cooltux.net/Interne-Entwicklungen/TuxNet-helm-charts.git/dokuwiki
|
- https://git.cooltux.net/Interne-Entwicklungen/TuxNet-helm-charts.git/dokuwiki
|
||||||
version: 1.1.1
|
version: 1.1.2
|
||||||
appVersion: "20250530-debian-12"
|
appVersion: "20250807-debian-12"
|
||||||
|
@@ -70,7 +70,7 @@ extraDeploy: []
|
|||||||
image:
|
image:
|
||||||
registry: git.cooltux.net
|
registry: git.cooltux.net
|
||||||
repository: marko/docker-dokuwiki-debian12
|
repository: marko/docker-dokuwiki-debian12
|
||||||
tag: "20250530-debian-12"
|
tag: "20250807-debian-12"
|
||||||
digest: ""
|
digest: ""
|
||||||
## Specify a imagePullPolicy
|
## Specify a imagePullPolicy
|
||||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||||
|
@@ -1,8 +1,37 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 24.9.1 (2025-08-07)
|
## 25.2.0 (2025-08-21)
|
||||||
|
|
||||||
* [bitnami/keycloak] :zap: :arrow_up: Update dependency references ([#35578](https://github.com/bitnami/charts/pull/35578))
|
* [bitnami/keycloak] Add externalDatabase.extraParams for custom JDBC connection parameters ([#35770](https://github.com/bitnami/charts/pull/35770))
|
||||||
|
|
||||||
|
## <small>25.1.2 (2025-08-20)</small>
|
||||||
|
|
||||||
|
* [bitnami/keycloak] :zap: :arrow_up: Update dependency references (#36151) ([be87b21](https://github.com/bitnami/charts/commit/be87b21456910bc3a0c8731be470b48fb5ed32d3)), closes [#36151](https://github.com/bitnami/charts/issues/36151)
|
||||||
|
|
||||||
|
## <small>25.1.1 (2025-08-19)</small>
|
||||||
|
|
||||||
|
* [bitnami/keycloak] docs: remove reference to deprecated parameter on README (#36095) ([88de5cf](https://github.com/bitnami/charts/commit/88de5cfe0cda1f49d53b1ba8cda84b0baada6676)), closes [#36095](https://github.com/bitnami/charts/issues/36095)
|
||||||
|
* [bitnami/keycloak] Fix trailing dash in Config CLI Job (#35784) ([aff4631](https://github.com/bitnami/charts/commit/aff46317d0a8a86a4e5eb1d91bc384ff4ea2c42b)), closes [#35784](https://github.com/bitnami/charts/issues/35784)
|
||||||
|
|
||||||
|
## 25.1.0 (2025-08-15)
|
||||||
|
|
||||||
|
* [bitnami/keycloak] feat: add parameter to enable HTTP endpoint (#35881) ([90b385c](https://github.com/bitnami/charts/commit/90b385cfee09574633fe229881a000a088ef986c)), closes [#35881](https://github.com/bitnami/charts/issues/35881)
|
||||||
|
|
||||||
|
## <small>25.0.2 (2025-08-12)</small>
|
||||||
|
|
||||||
|
* [bitnami/keycloak] bugfix: validation when production is enabled (#35757) ([14e2c8a](https://github.com/bitnami/charts/commit/14e2c8a3030bd82ac7ba9d843cfa4f09a5645dc2)), closes [#35757](https://github.com/bitnami/charts/issues/35757)
|
||||||
|
|
||||||
|
## <small>25.0.1 (2025-08-11)</small>
|
||||||
|
|
||||||
|
* [bitnami/keycloak] bugfix: wrong number of arguments passed to tpl (#35726) ([25b6602](https://github.com/bitnami/charts/commit/25b6602175afaed1c1becce833463d4005e24598)), closes [#35726](https://github.com/bitnami/charts/issues/35726)
|
||||||
|
|
||||||
|
## 25.0.0 (2025-08-08)
|
||||||
|
|
||||||
|
* [bitnami/keycloak] feat: native metrics & refactor (#35568) ([0941bbc](https://github.com/bitnami/charts/commit/0941bbcbeca0b8b8d487e710701628e1f22e9f61)), closes [#35568](https://github.com/bitnami/charts/issues/35568)
|
||||||
|
|
||||||
|
## <small>24.9.1 (2025-08-07)</small>
|
||||||
|
|
||||||
|
* [bitnami/keycloak] :zap: :arrow_up: Update dependency references (#35578) ([6f18b10](https://github.com/bitnami/charts/commit/6f18b10318ec5c39d3a0dab34ae93efa90d70884)), closes [#35578](https://github.com/bitnami/charts/issues/35578)
|
||||||
|
|
||||||
## 24.9.0 (2025-08-04)
|
## 24.9.0 (2025-08-04)
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 16.7.21
|
version: 16.7.26
|
||||||
- name: common
|
- name: common
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 2.31.3
|
version: 2.31.4
|
||||||
digest: sha256:cc4b0618c5eb9e447c5538ba043869a7cbd6548d32768d8f63267fa27fdc5459
|
digest: sha256:d92824e04bd8b3d71ee395ef556c8476badbf15ee7fca655e503933dc90df3eb
|
||||||
generated: "2025-08-07T14:44:22.967095866Z"
|
generated: "2025-08-20T12:56:42.787734637Z"
|
||||||
|
@@ -5,13 +5,13 @@ annotations:
|
|||||||
category: DeveloperTools
|
category: DeveloperTools
|
||||||
images: |
|
images: |
|
||||||
- name: keycloak
|
- name: keycloak
|
||||||
image: docker.io/bitnami/keycloak:26.3.2-debian-12-r1
|
image: docker.io/bitnami/keycloak:26.3.3-debian-12-r0
|
||||||
- name: keycloak-config-cli
|
- name: keycloak-config-cli
|
||||||
image: docker.io/bitnami/keycloak-config-cli:6.4.0-debian-12-r11
|
image: docker.io/bitnami/keycloak-config-cli:6.4.0-debian-12-r11
|
||||||
licenses: Apache-2.0
|
licenses: Apache-2.0
|
||||||
tanzuCategory: application
|
tanzuCategory: application
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
appVersion: 26.3.2
|
appVersion: 26.3.3
|
||||||
dependencies:
|
dependencies:
|
||||||
- condition: postgresql.enabled
|
- condition: postgresql.enabled
|
||||||
name: postgresql
|
name: postgresql
|
||||||
@@ -36,4 +36,4 @@ maintainers:
|
|||||||
name: keycloak
|
name: keycloak
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/bitnami/charts/tree/main/bitnami/keycloak
|
- https://github.com/bitnami/charts/tree/main/bitnami/keycloak
|
||||||
version: 24.9.1
|
version: 25.2.0
|
@@ -31,7 +31,7 @@ These changes aim to improve the security posture of all Bitnami users by promot
|
|||||||
|
|
||||||
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
|
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
|
||||||
|
|
||||||
This chart bootstraps a [Keycloak](https://github.com/bitnami/containers/tree/main/bitnami/keycloak) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
This chart bootstraps a [Keycloak](https://www.keycloak.org/) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@@ -54,12 +54,6 @@ These commands deploy a Keycloak application on the Kubernetes cluster in the de
|
|||||||
|
|
||||||
## Configuration and installation details
|
## Configuration and installation details
|
||||||
|
|
||||||
### Resource requests and limits
|
|
||||||
|
|
||||||
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
|
|
||||||
|
|
||||||
To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
|
|
||||||
|
|
||||||
### Prometheus metrics
|
### Prometheus metrics
|
||||||
|
|
||||||
This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will expose Keycloak native Prometheus endpoint in a `metrics` service, which can be configured under the `metrics.service` section. It will have the necessary annotations to be automatically scraped by Prometheus.
|
This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will expose Keycloak native Prometheus endpoint in a `metrics` service, which can be configured under the `metrics.service` section. It will have the necessary annotations to be automatically scraped by Prometheus.
|
||||||
@@ -84,17 +78,6 @@ It is strongly recommended to use immutable tags in a production environment. Th
|
|||||||
|
|
||||||
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
||||||
|
|
||||||
### Update credentials
|
|
||||||
|
|
||||||
Bitnami charts configure credentials at first boot. Any further change in the secrets or credentials require manual intervention. Follow these instructions:
|
|
||||||
|
|
||||||
- Update the user password following [the upstream documentation](https://www.keycloak.org/server/configuration)
|
|
||||||
- Update the password secret with the new values (replace the SECRET_NAME and PASSWORD placeholders)
|
|
||||||
|
|
||||||
```shell
|
|
||||||
kubectl create secret generic SECRET_NAME --from-literal=admin-password=PASSWORD --dry-run -o yaml | kubectl apply -f -
|
|
||||||
```
|
|
||||||
|
|
||||||
### Use an external database
|
### Use an external database
|
||||||
|
|
||||||
Sometimes, you may want to have Keycloak connect to an external PostgreSQL database rather than a database within your cluster - for example, when using a managed database service, or when running a single database server for all your applications. To do this, set the `postgresql.enabled` parameter to `false` and specify the credentials for the external database using the `externalDatabase.*` parameters. Here is an example:
|
Sometimes, you may want to have Keycloak connect to an external PostgreSQL database rather than a database within your cluster - for example, when using a managed database service, or when running a single database server for all your applications. To do this, set the `postgresql.enabled` parameter to `false` and specify the credentials for the external database using the `externalDatabase.*` parameters. Here is an example:
|
||||||
@@ -133,9 +116,7 @@ extraEnvVars:
|
|||||||
|
|
||||||
You can import a realm by setting the `KEYCLOAK_EXTRA_ARGS` to contain the `--import-realm` argument.
|
You can import a realm by setting the `KEYCLOAK_EXTRA_ARGS` to contain the `--import-realm` argument.
|
||||||
|
|
||||||
This will import all `*.json` under `/opt/bitnami/keycloak/data/import` files as a realm into keycloak as per the
|
This will import all `*.json` under `/opt/bitnami/keycloak/data/import` files as a realm into keycloak as per the official documentation [here](https://www.keycloak.org/server/importExport#_importing_a_realm_from_a_directory). You can supply the files by mounting a volume e.g. with docker compose as follows:
|
||||||
official documentation [here](https://www.keycloak.org/server/importExport#_importing_a_realm_from_a_directory). You
|
|
||||||
can supply the files by mounting a volume e.g. with docker compose as follows:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
keycloak:
|
keycloak:
|
||||||
@@ -146,8 +127,7 @@ keycloak:
|
|||||||
|
|
||||||
#### Exporting a realm
|
#### Exporting a realm
|
||||||
|
|
||||||
You can export a realm through the GUI but it will not export users even the option is set, this is a known keycloak
|
You can export a realm through the GUI but it will not export users even the option is set, this is a known keycloak [bug](https://github.com/keycloak/keycloak/issues/23970).
|
||||||
[bug](https://github.com/keycloak/keycloak/issues/23970).
|
|
||||||
|
|
||||||
By using the `kc.sh` script you can export a realm with users. Be sure to mount the export folder to a local folder:
|
By using the `kc.sh` script you can export a realm with users. Be sure to mount the export folder to a local folder:
|
||||||
|
|
||||||
@@ -162,13 +142,13 @@ Then open a terminal in the running keycloak container and run:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
kc.sh export --dir /export/ --users realm_file
|
kc.sh export --dir /export/ --users realm_file
|
||||||
````
|
```
|
||||||
|
|
||||||
This will export the all the realms with users to the `/export` folder.
|
This will export the all the realms with users to the `/export` folder.
|
||||||
|
|
||||||
### Configure Ingress
|
### Configure Ingress
|
||||||
|
|
||||||
This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress-controller](https://github.com/bitnami/charts/tree/main/bitnami/nginx-ingress-controller) or [contour](https://github.com/bitnami/charts/tree/main/bitnami/contour) you can utilize the ingress controller to serve your application.To enable Ingress integration, set `ingress.enabled` to `true`.
|
This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress-controller](https://github.com/bitnami/charts/tree/main/bitnami/nginx-ingress-controller) or [contour](https://github.com/bitnami/charts/tree/main/bitnami/contour) you can utilize the ingress controller to serve your application. To enable Ingress integration, set `ingress.enabled` to `true`.
|
||||||
|
|
||||||
The most common scenario is to have one host name mapped to the deployment. In this case, the `ingress.hostname` property can be used to set the host name. The `ingress.tls` parameter can be used to add the TLS configuration for this host.
|
The most common scenario is to have one host name mapped to the deployment. In this case, the `ingress.hostname` property can be used to set the host name. The `ingress.tls` parameter can be used to add the TLS configuration for this host.
|
||||||
|
|
||||||
@@ -176,33 +156,11 @@ However, it is also possible to have more than one host. To facilitate this, the
|
|||||||
|
|
||||||
> NOTE: For each host specified in the `ingress.extraHosts` parameter, it is necessary to set a name, path, and any annotations that the Ingress controller should know about. Not all annotations are supported by all Ingress controllers, but [this annotation reference document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md) lists the annotations supported by many popular Ingress controllers.
|
> NOTE: For each host specified in the `ingress.extraHosts` parameter, it is necessary to set a name, path, and any annotations that the Ingress controller should know about. Not all annotations are supported by all Ingress controllers, but [this annotation reference document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md) lists the annotations supported by many popular Ingress controllers.
|
||||||
|
|
||||||
Adding the TLS parameter (where available) will cause the chart to generate HTTPS URLs, and the application will be available on port 443. The actual TLS secrets do not have to be generated by this chart. However, if TLS is enabled, the Ingress record will not work until the TLS secret exists.
|
Adding the TLS parameter (where available) will cause the chart to generate HTTPS URLs, and the application will be available on port 443. The actual TLS secrets do not have to be generated by this chart. However, if TLS is enabled, the Ingress record will not work until the TLS secret exists.
|
||||||
|
|
||||||
[Learn more about Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
|
[Learn more about Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
|
||||||
|
|
||||||
### Configure admin Ingress
|
#### Configure TLS Secrets for use with Ingress
|
||||||
|
|
||||||
In addition to the Ingress resource described above, this chart also provides the ability to define an Ingress for the admin area of Keycloak, for example the `master` realm.
|
|
||||||
|
|
||||||
For this scenario, you can use the Keycloak Config CLI integration with the following values, where `keycloak-admin.example.com` is to be replaced by the actual hostname:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
adminIngress:
|
|
||||||
enabled: true
|
|
||||||
hostname: keycloak-admin.example.com
|
|
||||||
keycloakConfigCli:
|
|
||||||
enabled: true
|
|
||||||
configuration:
|
|
||||||
master.json: |
|
|
||||||
{
|
|
||||||
"realm" : "master",
|
|
||||||
"attributes": {
|
|
||||||
"frontendUrl": "https://keycloak-admin.example.com"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configure TLS Secrets for use with Ingress
|
|
||||||
|
|
||||||
This chart facilitates the creation of TLS secrets for use with the Ingress controller (although this is not mandatory). There are several common use cases:
|
This chart facilitates the creation of TLS secrets for use with the Ingress controller (although this is not mandatory). There are several common use cases:
|
||||||
|
|
||||||
@@ -242,34 +200,82 @@ wrj2wDbCDCFmfqnSJ+dKI3vFLlEz44sAV8jX/kd4Y6ZTQhlLbYc=
|
|||||||
|
|
||||||
### Securing traffic using TLS
|
### Securing traffic using TLS
|
||||||
|
|
||||||
Keycloak can work with TLS interally by setting `tls.enabled=true`. The chart allows two configuration options:
|
TLS support for the web interface can be enabled in the chart by specifying the `tls.enabled=true`. Two possible options are available:
|
||||||
|
|
||||||
- Provide your own secret using the `tls.existingSecret` value. Also set the correct name of the truststore and keystore using the `tls.truststoreFilename` and `tls.keystoreFilename` values.
|
- Provide your own secret with the PEM or JKS certificates
|
||||||
- Have the chart auto-generate the certificates using `tls.autoGenerated=true`.
|
- Have the chart auto-generate the certificates.
|
||||||
|
|
||||||
### Use with ingress offloading SSL
|
#### Providing your own TLS secret
|
||||||
|
|
||||||
If your ingress controller has the SSL Termination, you should set `proxy` to `edge`.
|
To provide your own secret set the `tls.existingSecret` value. It is possible to use PEM or JKS.
|
||||||
|
|
||||||
### Manage secrets and passwords
|
To use PEM Certs:
|
||||||
|
|
||||||
This chart provides several ways to manage passwords:
|
- `tls.usePemCerts=true`: Use PEM certificates instead of a JKS file.
|
||||||
|
- `tls.certFilename`: Certificate filename. Defaults to `tls.crt`.
|
||||||
|
- `tls.certKeyFilename`: Certificate key filename. Defaults to `tls.key`
|
||||||
|
|
||||||
- Values passed to the chart: In this scenario, a new secret including all the passwords will be created during the chart installation. When upgrading, it is necessary to provide the secrets to the chart as shown below. Replace the KC_BOOTSTRAP_ADMIN_PASSWORD, POSTGRESQL_PASSWORD and POSTGRESQL_PVC placeholders with the correct passwords and PVC name.
|
To use JKS keystore:
|
||||||
|
|
||||||
|
- `tls.usePemCerts=false`: Use JKS file.
|
||||||
|
- `tls.keystoreFilename`: Certificate filename. Defaults to `keycloak.keystore.jks`.
|
||||||
|
- `tls.truststoreFilename`: Truststore filename. Defaults to `keycloak.truststore.jks`.
|
||||||
|
|
||||||
|
In the following example we will use PEM certificates. First, create the secret with the certificates files:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
helm upgrade keycloak bitnami/keycloak \
|
kubectl create secret generic certificates-tls-secret --from-file=./cert.pem --from-file=./cert.key
|
||||||
--set auth.adminPassword=KC_BOOTSTRAP_ADMIN_PASSWORD \
|
|
||||||
--set postgresql.postgresqlPassword=POSTGRESQL_PASSWORD \
|
|
||||||
--set postgresql.persistence.existingClaim=POSTGRESQL_PVC
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- An existing secret with all the passwords via the `existingSecret` parameter.
|
Then, use the following parameters:
|
||||||
|
|
||||||
|
```console
|
||||||
|
tls.enabled=true
|
||||||
|
tls.autoGenerated.enabled=false
|
||||||
|
tls.usePemCerts=true
|
||||||
|
tls.existingSecret="certificates-tls-secret"
|
||||||
|
tls.certFilename="cert.pem"
|
||||||
|
tls.certKeyFilename="cert.key"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Auto-generation of TLS certificates
|
||||||
|
|
||||||
|
It is also possible to rely on the chart certificate auto-generation capabilities. The chart supports two different ways to auto-generate the required certificates:
|
||||||
|
|
||||||
|
- Using Helm capabilities. Enable this feature by setting `tls.autoGenerated.enabled` to `true` and `tls.autoGenerated.engine` to `helm`.
|
||||||
|
- Relying on CertManager (please note it's required to have CertManager installed in your K8s cluster). Enable this feature by setting `tls.autoGenerated.enabled` to `true` and `tls.autoGenerated.engine` to `cert-manager`. Please note it's supported to use an existing Issuer/ClusterIssuer for issuing the TLS certificates by setting the `tls.autoGenerated.certManager.existingIssuer` and `tls.autoGenerated.certManager.existingIssuerKind` parameters.
|
||||||
|
|
||||||
|
#### Use with ingress offloading SSL
|
||||||
|
|
||||||
|
If your ingress controller has the TLS/SSL Termination, you might need to properly configure the reverse proxy headers via the `proxyHeaders` parameter. Find more information in the [upstream documentation](https://www.keycloak.org/server/reverseproxy).
|
||||||
|
|
||||||
|
### Update credentials
|
||||||
|
|
||||||
|
Bitnami charts configure credentials at first boot. Any further change in the secrets or credentials require manual intervention. Follow these instructions:
|
||||||
|
|
||||||
|
- Update the user password following [the upstream documentation](https://www.keycloak.org/server/configuration)
|
||||||
|
- Update the password secret with the new values (replace the SECRET_NAME and PASSWORD placeholders)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl create secret generic SECRET_NAME --from-literal=admin-password=PASSWORD --dry-run -o yaml | kubectl apply -f -
|
||||||
|
```
|
||||||
|
|
||||||
### Backup and restore
|
### Backup and restore
|
||||||
|
|
||||||
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool. Find the instructions for using Velero in [this guide](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-deployments-velero-index.html).
|
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool. Find the instructions for using Velero in [this guide](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-deployments-velero-index.html).
|
||||||
|
|
||||||
|
### Resource requests and limits
|
||||||
|
|
||||||
|
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
|
||||||
|
|
||||||
|
To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
|
||||||
|
|
||||||
|
### Set Pod affinity
|
||||||
|
|
||||||
|
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
|
||||||
|
|
||||||
|
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
|
||||||
|
|
||||||
### Add extra environment variables
|
### Add extra environment variables
|
||||||
|
|
||||||
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
|
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
|
||||||
@@ -306,8 +312,6 @@ service:
|
|||||||
targetPort: 11311
|
targetPort: 11311
|
||||||
```
|
```
|
||||||
|
|
||||||
> NOTE: This Helm chart already includes sidecar containers for the Prometheus exporters (where applicable). These can be activated by adding the `--enable-metrics=true` parameter at deployment time. The `sidecars` parameter should therefore only be used for any extra sidecar containers.
|
|
||||||
|
|
||||||
If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
|
If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -334,291 +338,274 @@ The allowed extensions is `.sh`.
|
|||||||
|
|
||||||
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the `extraDeploy` parameter.
|
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the `extraDeploy` parameter.
|
||||||
|
|
||||||
### Set Pod affinity
|
|
||||||
|
|
||||||
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
|
|
||||||
|
|
||||||
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
|
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
### Global parameters
|
### Global parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||||
| `global.imageRegistry` | Global Docker image registry | `""` |
|
| `global.imageRegistry` | Global Docker Image registry | `""` |
|
||||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
|
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
|
||||||
| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
|
| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
|
||||||
| `global.storageClass` | DEPRECATED: use global.defaultStorageClass instead | `""` |
|
|
||||||
| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
|
| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
|
||||||
| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
|
| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
|
||||||
|
| `global.compatibility.omitEmptySeLinuxOptions` | If set to true, removes the seLinuxOptions from the securityContexts when it is set to an empty object | `false` |
|
||||||
|
|
||||||
### Common parameters
|
### Common parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
|
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
|
||||||
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` |
|
| `kubeVersion` | Override Kubernetes version reported by .Capabilities | `""` |
|
||||||
| `nameOverride` | String to partially override common.names.fullname | `""` |
|
| `apiVersions` | Override Kubernetes API versions reported by .Capabilities | `[]` |
|
||||||
|
| `nameOverride` | String to partially override common.names.name | `""` |
|
||||||
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
|
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
|
||||||
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
||||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||||
| `enableServiceLinks` | If set to false, disable Kubernetes service links in the pod spec | `true` |
|
|
||||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||||
| `dnsPolicy` | DNS Policy for pod | `""` |
|
|
||||||
| `dnsConfig` | DNS Configuration pod | `{}` |
|
|
||||||
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
|
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
|
||||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
|
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
|
||||||
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
|
|
||||||
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
|
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
|
||||||
| `diagnosticMode.command` | Command to override all containers in the the statefulset | `["sleep"]` |
|
| `diagnosticMode.command` | Command to override all containers in the chart release | `["sleep"]` |
|
||||||
| `diagnosticMode.args` | Args to override all containers in the the statefulset | `["infinity"]` |
|
| `diagnosticMode.args` | Args to override all containers in the chart release | `["infinity"]` |
|
||||||
|
| `useHelmHooks` | Enable use of Helm hooks if needed, e.g. on post-install jobs | `true` |
|
||||||
|
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
|
||||||
|
|
||||||
### Keycloak parameters
|
### Keycloak parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
|
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
|
||||||
| `image.registry` | Keycloak image registry | `REGISTRY_NAME` |
|
| `image.registry` | Keycloak image registry | `REGISTRY_NAME` |
|
||||||
| `image.repository` | Keycloak image repository | `REPOSITORY_NAME/keycloak` |
|
| `image.repository` | Keycloak image repository | `REPOSITORY_NAME/keycloak` |
|
||||||
| `image.digest` | Keycloak image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
|
| `image.digest` | Keycloak image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
|
||||||
| `image.pullPolicy` | Keycloak image pull policy | `IfNotPresent` |
|
| `image.pullPolicy` | Keycloak image pull policy | `IfNotPresent` |
|
||||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
| `image.pullSecrets` | Keycloak image pull secrets | `[]` |
|
||||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
| `image.debug` | Enable Keycloak image debug mode | `false` |
|
||||||
| `auth.adminUser` | Keycloak administrator user | `user` |
|
| `auth.adminUser` | Keycloak administrator user | `user` |
|
||||||
| `auth.adminPassword` | Keycloak administrator password for the new user | `""` |
|
| `auth.adminPassword` | Keycloak administrator password for the new user | `""` |
|
||||||
| `auth.existingSecret` | Existing secret containing Keycloak admin password | `""` |
|
| `auth.existingSecret` | Existing secret containing Keycloak admin password | `""` |
|
||||||
| `auth.passwordSecretKey` | Key where the Keycloak admin password is being stored inside the existing secret. | `""` |
|
| `auth.passwordSecretKey` | Key where the Keycloak admin password is being stored inside the existing secret. | `""` |
|
||||||
| `auth.annotations` | Additional custom annotations for Keycloak auth secret object | `{}` |
|
| `auth.annotations` | Additional custom annotations for Keycloak auth secret object | `{}` |
|
||||||
| `customCaExistingSecret` | Name of the secret containing the Keycloak custom CA certificates. The secret will be mounted as a directory and configured using KC_TRUSTSTORE_PATHS. | `""` |
|
| `production` | Run Keycloak in production mode. TLS configuration is required except when using proxy headers | `false` |
|
||||||
| `tls.enabled` | Enable TLS encryption. Required for HTTPs traffic. | `false` |
|
| `tls.enabled` | Enable TLS in Keycloak | `false` |
|
||||||
| `tls.autoGenerated` | Generate automatically self-signed TLS certificates. Currently only supports PEM certificates | `false` |
|
| `tls.usePemCerts` | Use PEM certificates as input instead of PKS12/JKS stores | `false` |
|
||||||
| `tls.existingSecret` | Existing secret containing the TLS certificates per Keycloak replica | `""` |
|
| `tls.autoGenerated.enabled` | Enable automatic generation of TLS certificates | `true` |
|
||||||
| `tls.usePem` | Use PEM certificates as input instead of PKS12/JKS stores | `false` |
|
| `tls.autoGenerated.engine` | Mechanism to generate the certificates (allowed values: helm, cert-manager) | `helm` |
|
||||||
| `tls.truststoreFilename` | Truststore filename inside the existing secret | `keycloak.truststore.jks` |
|
| `tls.autoGenerated.certManager.existingIssuer` | The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine) | `""` |
|
||||||
| `tls.keystoreFilename` | Keystore filename inside the existing secret | `keycloak.keystore.jks` |
|
| `tls.autoGenerated.certManager.existingIssuerKind` | Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine) | `""` |
|
||||||
| `tls.keystorePassword` | Password to access the keystore when it's password-protected | `""` |
|
| `tls.autoGenerated.certManager.keyAlgorithm` | Key algorithm for the certificates (only for `cert-manager` engine) | `RSA` |
|
||||||
| `tls.truststorePassword` | Password to access the truststore when it's password-protected | `""` |
|
| `tls.autoGenerated.certManager.keySize` | Key size for the certificates (only for `cert-manager` engine) | `2048` |
|
||||||
| `tls.passwordsSecret` | Secret containing the Keystore and Truststore passwords. | `""` |
|
| `tls.autoGenerated.certManager.duration` | Duration for the certificates (only for `cert-manager` engine) | `2160h` |
|
||||||
| `spi.existingSecret` | Existing secret containing the Keycloak truststore for SPI connection over HTTPS/TLS | `""` |
|
| `tls.autoGenerated.certManager.renewBefore` | Renewal period for the certificates (only for `cert-manager` engine) | `360h` |
|
||||||
| `spi.truststorePassword` | Password to access the truststore when it's password-protected | `""` |
|
| `tls.existingSecret` | The name of an existing Secret containing the TLS certificates for Keycloak replicas | `""` |
|
||||||
| `spi.truststoreFilename` | Truststore filename inside the existing secret | `keycloak-spi.truststore.jks` |
|
| `tls.certFilename` | Certificate filename inside the existing secret (when tls.usePemCerts=true and tls.autoGenerated.enabled=false) | `tls.crt` |
|
||||||
| `spi.passwordsSecret` | Secret containing the SPI Truststore passwords. | `""` |
|
| `tls.certKeyFilename` | Certificate key filename inside the existing secret (when tls.usePemCerts=true and tls.autoGenerated.enabled=false) | `tls.key` |
|
||||||
| `spi.hostnameVerificationPolicy` | Verify the hostname of the server's certificate. Allowed values: "ANY", "WILDCARD", "STRICT". | `""` |
|
| `tls.keystoreFilename` | Keystore filename inside the existing secret | `keycloak.keystore.jks` |
|
||||||
| `adminRealm` | Name of the admin realm | `master` |
|
| `tls.truststoreFilename` | Truststore filename inside the existing secret | `keycloak.truststore.jks` |
|
||||||
| `production` | Run Keycloak in production mode. TLS configuration is required except when using proxy=edge. | `false` |
|
| `tls.keystorePassword` | Password to access the keystore when it's password-protected | `""` |
|
||||||
| `proxyHeaders` | Set Keycloak proxy headers | `""` |
|
| `tls.truststorePassword` | Password to access the truststore when it's password-protected | `""` |
|
||||||
| `proxy` | reverse Proxy mode edge, reencrypt, passthrough or none | `""` |
|
| `tls.passwordsSecret` | The name of an existing Secret containing the keystore/truststore passwords (expected keys: `tls-keystore-password` and `tls-truststore-password`) | `""` |
|
||||||
| `httpRelativePath` | Set the path relative to '/' for serving resources. Useful if you are migrating from older version which were using '/auth/' | `/` |
|
| `trustedCertsExistingSecret` | Name of the existing Secret containing the trusted certificates to validate communications with external services | `""` |
|
||||||
| `configuration` | Keycloak Configuration. Auto-generated based on other parameters when not specified | `""` |
|
| `adminRealm` | Name of the admin realm | `master` |
|
||||||
| `existingConfigmap` | Name of existing ConfigMap with Keycloak configuration | `""` |
|
| `proxyHeaders` | Set Keycloak proxy headers | `""` |
|
||||||
| `extraStartupArgs` | Extra default startup args | `""` |
|
| `hostnameStrict` | Disables dynamically resolving the hostname from request headers (ignored if ingress.enabled is false). | `false` |
|
||||||
| `enableDefaultInitContainers` | Deploy default init containers | `true` |
|
| `httpEnabled` | Force enabling HTTP endpoint (by default is only enabled if TLS is disabled) | `false` |
|
||||||
| `initdbScripts` | Dictionary of initdb scripts | `{}` |
|
| `httpRelativePath` | Set the path relative to '/' for serving resources | `/` |
|
||||||
| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `""` |
|
| `cache.enabled` | Switch to enable or disable the Keycloak distributed cache for kubernetes. | `true` |
|
||||||
| `command` | Override default container command (useful when using custom images) | `[]` |
|
| `cache.stack` | Cache stack to use | `jdbc-ping` |
|
||||||
| `args` | Override default container args (useful when using custom images) | `[]` |
|
| `cache.configFile` | Path to the file from which cache configuration should be loaded from | `cache-ispn.xml` |
|
||||||
| `extraEnvVars` | Extra environment variables to be set on Keycloak container | `[]` |
|
| `cache.useHeadlessServiceWithAppVersion` | Create a headless service used for ispn containing the app version | `false` |
|
||||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
|
| `logging.output` | Alternates between the default log output format or json format | `default` |
|
||||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `""` |
|
| `logging.level` | Allowed values as documented: FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL, OFF | `INFO` |
|
||||||
|
| `configuration` | Keycloak Configuration. Auto-generated based on other parameters when not specified | `""` |
|
||||||
|
| `existingConfigmap` | Name of existing ConfigMap with Keycloak configuration | `""` |
|
||||||
|
| `extraStartupArgs` | Extra default startup args | `""` |
|
||||||
|
| `initdbScripts` | Dictionary of initdb scripts | `{}` |
|
||||||
|
| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `""` |
|
||||||
|
| `command` | Override default container command (useful when using custom images) | `[]` |
|
||||||
|
| `args` | Override default container args (useful when using custom images) | `[]` |
|
||||||
|
| `extraEnvVars` | Extra environment variables to be set on Keycloak container | `[]` |
|
||||||
|
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
|
||||||
|
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `""` |
|
||||||
|
| `containerPorts.http` | Keycloak HTTP container port | `8080` |
|
||||||
|
| `containerPorts.https` | Keycloak HTTPS container port | `8443` |
|
||||||
|
| `containerPorts.management` | Keycloak management container port | `9000` |
|
||||||
|
| `extraContainerPorts` | Optionally specify extra list of additional ports for Keycloak container | `[]` |
|
||||||
|
| `podSecurityContext.enabled` | Enabled Keycloak pods' Security Context | `true` |
|
||||||
|
| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
|
||||||
|
| `podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
|
||||||
|
| `podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
|
||||||
|
| `podSecurityContext.fsGroup` | Set Keycloak pod's Security Context fsGroup | `1001` |
|
||||||
|
| `containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
|
||||||
|
| `containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
|
||||||
|
| `containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
|
||||||
|
| `containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
|
||||||
|
| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
|
||||||
|
| `containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
|
||||||
|
| `containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
|
||||||
|
| `containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
|
||||||
|
| `containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
|
||||||
|
| `containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
|
||||||
|
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` |
|
||||||
|
| `resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
||||||
|
| `livenessProbe.enabled` | Enable livenessProbe on Keycloak containers | `true` |
|
||||||
|
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` |
|
||||||
|
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `1` |
|
||||||
|
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
|
||||||
|
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
||||||
|
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||||
|
| `readinessProbe.enabled` | Enable readinessProbe on Keycloak containers | `true` |
|
||||||
|
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
|
||||||
|
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
|
||||||
|
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
|
||||||
|
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
||||||
|
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||||
|
| `startupProbe.enabled` | Enable startupProbe on Keycloak containers | `false` |
|
||||||
|
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
|
||||||
|
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
|
||||||
|
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
|
||||||
|
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `10` |
|
||||||
|
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||||
|
| `customLivenessProbe` | Custom Liveness probes for Keycloak | `{}` |
|
||||||
|
| `customReadinessProbe` | Custom Readiness probes Keycloak | `{}` |
|
||||||
|
| `customStartupProbe` | Custom Startup probes for Keycloak | `{}` |
|
||||||
|
|
||||||
### Keycloak statefulset parameters
|
### Keycloak StatefulSet parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------- |
|
||||||
| `replicaCount` | Number of Keycloak replicas to deploy | `1` |
|
| `replicaCount` | Number of Keycloak replicas to deploy | `1` |
|
||||||
| `revisionHistoryLimitCount` | Number of controller revisions to keep | `10` |
|
| `updateStrategy.type` | Keycloak StatefulSet type | `RollingUpdate` |
|
||||||
| `containerPorts.http` | Keycloak HTTP container port | `8080` |
|
| `revisionHistoryLimitCount` | Number of controller revisions to keep | `10` |
|
||||||
| `containerPorts.https` | Keycloak HTTPS container port | `8443` |
|
| `minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `0` |
|
||||||
| `containerPorts.metrics` | Keycloak metrics container port | `9000` |
|
| `statefulsetAnnotations` | Optionally add extra annotations on the StatefulSet resource | `{}` |
|
||||||
| `extraContainerPorts` | Optionally specify extra list of additional port-mappings for Keycloak container | `[]` |
|
| `automountServiceAccountToken` | Mount Service Account token in Keycloak pods | `true` |
|
||||||
| `statefulsetAnnotations` | Optionally add extra annotations on the statefulset resource | `{}` |
|
| `hostAliases` | Deployment pod host aliases | `[]` |
|
||||||
| `podSecurityContext.enabled` | Enabled Keycloak pods' Security Context | `true` |
|
| `podLabels` | Extra labels for Keycloak pods | `{}` |
|
||||||
| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
|
| `podAnnotations` | Annotations for Keycloak pods | `{}` |
|
||||||
| `podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
|
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||||
| `podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
|
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||||
| `podSecurityContext.fsGroup` | Set Keycloak pod's Security Context fsGroup | `1001` |
|
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||||
| `containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
|
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
|
||||||
| `containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
|
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
|
||||||
| `containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
|
| `affinity` | Affinity for pod assignment | `{}` |
|
||||||
| `containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
|
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||||
| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
|
| `tolerations` | Tolerations for pod assignment | `[]` |
|
||||||
| `containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
|
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
|
||||||
| `containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
|
| `podManagementPolicy` | Pod management policy for the Keycloak StatefulSet | `Parallel` |
|
||||||
| `containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
|
| `priorityClassName` | Keycloak pods' Priority Class Name | `""` |
|
||||||
| `containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
|
| `schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` |
|
||||||
| `containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
|
| `terminationGracePeriodSeconds` | Seconds Keycloak pod needs to terminate gracefully | `""` |
|
||||||
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` |
|
| `lifecycleHooks` | LifecycleHooks to set additional configuration at startup | `{}` |
|
||||||
| `resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
| `dnsPolicy` | DNS Policy for pod | `""` |
|
||||||
| `livenessProbe.enabled` | Enable livenessProbe on Keycloak containers | `true` |
|
| `dnsConfig` | DNS Configuration pod | `{}` |
|
||||||
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `300` |
|
| `enableServiceLinks` | If set to false, disable Kubernetes service links in the pod spec | `true` |
|
||||||
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `1` |
|
| `extraVolumes` | Optionally specify extra list of additional volumes for Keycloak pods | `[]` |
|
||||||
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
|
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Keycloak container(s) | `[]` |
|
||||||
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
| `initContainers` | Add additional init containers to the Keycloak pods | `[]` |
|
||||||
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
| `sidecars` | Add additional sidecar containers to the Keycloak pods | `[]` |
|
||||||
| `readinessProbe.enabled` | Enable readinessProbe on Keycloak containers | `true` |
|
|
||||||
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
|
|
||||||
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
|
|
||||||
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
|
|
||||||
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
|
||||||
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
|
||||||
| `startupProbe.enabled` | Enable startupProbe on Keycloak containers | `false` |
|
|
||||||
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
|
|
||||||
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
|
|
||||||
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
|
|
||||||
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
|
|
||||||
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
|
||||||
| `customLivenessProbe` | Custom Liveness probes for Keycloak | `{}` |
|
|
||||||
| `customReadinessProbe` | Custom Rediness probes Keycloak | `{}` |
|
|
||||||
| `customStartupProbe` | Custom Startup probes for Keycloak | `{}` |
|
|
||||||
| `lifecycleHooks` | LifecycleHooks to set additional configuration at startup | `{}` |
|
|
||||||
| `automountServiceAccountToken` | Mount Service Account token in pod | `true` |
|
|
||||||
| `hostAliases` | Deployment pod host aliases | `[]` |
|
|
||||||
| `podLabels` | Extra labels for Keycloak pods | `{}` |
|
|
||||||
| `podAnnotations` | Annotations for Keycloak pods | `{}` |
|
|
||||||
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
|
||||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
|
||||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
|
||||||
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
|
|
||||||
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
|
|
||||||
| `affinity` | Affinity for pod assignment | `{}` |
|
|
||||||
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
|
||||||
| `tolerations` | Tolerations for pod assignment | `[]` |
|
|
||||||
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
|
|
||||||
| `podManagementPolicy` | Pod management policy for the Keycloak statefulset | `Parallel` |
|
|
||||||
| `priorityClassName` | Keycloak pods' Priority Class Name | `""` |
|
|
||||||
| `schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` |
|
|
||||||
| `terminationGracePeriodSeconds` | Seconds Keycloak pod needs to terminate gracefully | `""` |
|
|
||||||
| `updateStrategy.type` | Keycloak statefulset strategy type | `RollingUpdate` |
|
|
||||||
| `updateStrategy.rollingUpdate` | Keycloak statefulset rolling update configuration parameters | `{}` |
|
|
||||||
| `minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `0` |
|
|
||||||
| `extraVolumes` | Optionally specify extra list of additional volumes for Keycloak pods | `[]` |
|
|
||||||
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Keycloak container(s) | `[]` |
|
|
||||||
| `initContainers` | Add additional init containers to the Keycloak pods | `[]` |
|
|
||||||
| `sidecars` | Add additional sidecar containers to the Keycloak pods | `[]` |
|
|
||||||
|
|
||||||
### Exposure parameters
|
### Traffic Exposure Parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
|
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
||||||
| `service.type` | Kubernetes service type | `ClusterIP` |
|
| `service.type` | Kubernetes service type | `ClusterIP` |
|
||||||
| `service.http.enabled` | Enable http port on service | `true` |
|
| `service.http.enabled` | Enable http port on service | `true` |
|
||||||
| `service.ports.http` | Keycloak service HTTP port | `80` |
|
| `service.ports.http` | Keycloak service HTTP port | `80` |
|
||||||
| `service.ports.https` | Keycloak service HTTPS port | `443` |
|
| `service.ports.https` | Keycloak service HTTPS port | `443` |
|
||||||
| `service.nodePorts` | Specify the nodePort values for the LoadBalancer and NodePort service types. | `{}` |
|
| `service.nodePorts.http` | Node port for HTTP | `""` |
|
||||||
| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
|
| `service.nodePorts.https` | Node port for HTTPS | `""` |
|
||||||
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
|
| `service.extraPorts` | Extra port to expose on Keycloak service | `[]` |
|
||||||
| `service.clusterIP` | Keycloak service clusterIP IP | `""` |
|
| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
|
||||||
| `service.loadBalancerIP` | loadBalancerIP for the SuiteCRM Service (optional, cloud specific) | `""` |
|
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
|
||||||
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
| `service.clusterIP` | Keycloak service clusterIP IP | `""` |
|
||||||
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
| `service.loadBalancerIP` | loadBalancerIP for the SuiteCRM Service (optional, cloud specific) | `""` |
|
||||||
| `service.annotations` | Additional custom annotations for Keycloak service | `{}` |
|
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
||||||
| `service.extraPorts` | Extra port to expose on Keycloak service | `[]` |
|
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||||
| `service.extraHeadlessPorts` | Extra ports to expose on Keycloak headless service | `[]` |
|
| `service.annotations` | Additional custom annotations for Keycloak service | `{}` |
|
||||||
| `service.headless.annotations` | Annotations for the headless service. | `{}` |
|
| `service.headless.annotations` | Annotations for the headless service. | `{}` |
|
||||||
| `service.headless.extraPorts` | Extra ports to expose on Keycloak headless service | `[]` |
|
| `service.headless.extraPorts` | Extra ports to expose on Keycloak headless service | `[]` |
|
||||||
| `ingress.enabled` | Enable ingress record generation for Keycloak | `false` |
|
| `ingress.enabled` | Enable ingress record generation for Keycloak | `false` |
|
||||||
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (evaluated as template) (Kubernetes 1.18+) | `""` |
|
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
||||||
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
|
||||||
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
|
| `ingress.hostname` | Default host for the ingress record (evaluated as template) | `keycloak.local` |
|
||||||
| `ingress.controller` | The ingress controller type. Currently supports `default` and `gce` | `default` |
|
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (evaluated as template) | `""` |
|
||||||
| `ingress.hostname` | Default host for the ingress record (evaluated as template) | `keycloak.local` |
|
| `ingress.controller` | The ingress controller type. Currently supports `default` and `gce` | `default` |
|
||||||
| `ingress.hostnameStrict` | Disables dynamically resolving the hostname from request headers. | `false` |
|
| `ingress.path` | Default path for the ingress record | `{{ .Values.httpRelativePath }}` |
|
||||||
| `ingress.path` | Default path for the ingress record (evaluated as template) | `""` |
|
| `ingress.servicePort` | Backend service port to use | `http` |
|
||||||
| `ingress.servicePort` | Backend service port to use | `http` |
|
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
||||||
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
| `ingress.labels` | Additional labels for the Ingress resource. | `{}` |
|
||||||
| `ingress.labels` | Additional labels for the Ingress resource. | `{}` |
|
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
||||||
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
||||||
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
||||||
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` |
|
||||||
| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` |
|
| `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
|
||||||
| `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
|
| `ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
|
||||||
| `ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
|
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
||||||
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
|
||||||
| `adminIngress.enabled` | Enable admin ingress record generation for Keycloak | `false` |
|
| `networkPolicy.allowExternal` | Don't require server label for connections | `true` |
|
||||||
| `adminIngress.ingressClassName` | IngressClass that will be be used to implement the Ingress (evaluated as template) (Kubernetes 1.18+) | `""` |
|
| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
|
||||||
| `adminIngress.pathType` | Ingress path type | `ImplementationSpecific` |
|
| `networkPolicy.addExternalClientAccess` | Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true. | `true` |
|
||||||
| `adminIngress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
|
| `networkPolicy.kubeAPIServerPorts` | List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security) | `[]` |
|
||||||
| `adminIngress.controller` | The ingress controller type. Currently supports `default` and `gce` | `default` |
|
| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
||||||
| `adminIngress.hostname` | Default host for the admin ingress record (evaluated as template) | `keycloak.local` |
|
| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
||||||
| `adminIngress.path` | Default path for the admin ingress record (evaluated as template) | `""` |
|
| `networkPolicy.ingressPodMatchLabels` | Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
|
||||||
| `adminIngress.servicePort` | Backend service port to use | `http` |
|
| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
|
||||||
| `adminIngress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
|
||||||
| `adminIngress.labels` | Additional labels for the Ingress resource. | `{}` |
|
|
||||||
| `adminIngress.tls` | Enable TLS configuration for the host defined at `adminIngress.hostname` parameter | `false` |
|
|
||||||
| `adminIngress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
|
||||||
| `adminIngress.extraHosts` | An array with additional hostname(s) to be covered with the admin ingress record | `[]` |
|
|
||||||
| `adminIngress.extraPaths` | Any additional arbitrary paths that may need to be added to the admin ingress under the main host. | `[]` |
|
|
||||||
| `adminIngress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
|
|
||||||
| `adminIngress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
|
|
||||||
| `adminIngress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
|
||||||
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
|
|
||||||
| `networkPolicy.allowExternal` | Don't require server label for connections | `true` |
|
|
||||||
| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
|
|
||||||
| `networkPolicy.kubeAPIServerPorts` | List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security) | `[]` |
|
|
||||||
| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
|
||||||
| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
|
|
||||||
| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
|
|
||||||
| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
|
|
||||||
|
|
||||||
### RBAC parameter
|
|
||||||
|
|
||||||
| Name | Description | Value |
|
|
||||||
| --------------------------------------------- | --------------------------------------------------------- | ------- |
|
|
||||||
| `serviceAccount.create` | Enable the creation of a ServiceAccount for Keycloak pods | `true` |
|
|
||||||
| `serviceAccount.name` | Name of the created ServiceAccount | `""` |
|
|
||||||
| `serviceAccount.automountServiceAccountToken` | Auto-mount the service account token in the pod | `false` |
|
|
||||||
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
|
|
||||||
| `serviceAccount.extraLabels` | Additional labels for the ServiceAccount | `{}` |
|
|
||||||
| `rbac.create` | Whether to create and use RBAC resources or not | `false` |
|
|
||||||
| `rbac.rules` | Custom RBAC rules | `[]` |
|
|
||||||
|
|
||||||
### Other parameters
|
### Other parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------- |
|
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||||
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
|
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
|
||||||
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
|
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
|
||||||
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
|
| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
|
||||||
| `autoscaling.enabled` | Enable autoscaling for Keycloak | `false` |
|
| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
|
||||||
| `autoscaling.minReplicas` | Minimum number of Keycloak replicas | `1` |
|
| `serviceAccount.extraLabels` | Additional Service Account labels (evaluated as a template) | `{}` |
|
||||||
| `autoscaling.maxReplicas` | Maximum number of Keycloak replicas | `11` |
|
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
|
||||||
| `autoscaling.targetCPU` | Target CPU utilization percentage | `""` |
|
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
|
||||||
| `autoscaling.targetMemory` | Target Memory utilization percentage | `""` |
|
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty. | `""` |
|
||||||
| `autoscaling.behavior.scaleUp.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling up | `120` |
|
| `autoscaling.vpa.enabled` | Enable VPA for Keycloak pods | `false` |
|
||||||
| `autoscaling.behavior.scaleUp.selectPolicy` | The priority of policies that the autoscaler will apply when scaling up | `Max` |
|
| `autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
|
||||||
| `autoscaling.behavior.scaleUp.policies` | HPA scaling policies when scaling up | `[]` |
|
| `autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
|
||||||
| `autoscaling.behavior.scaleDown.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling down | `300` |
|
| `autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
|
||||||
| `autoscaling.behavior.scaleDown.selectPolicy` | The priority of policies that the autoscaler will apply when scaling down | `Max` |
|
| `autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
|
||||||
| `autoscaling.behavior.scaleDown.policies` | HPA scaling policies when scaling down | `[]` |
|
| `autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy | `Auto` |
|
||||||
|
| `autoscaling.hpa.enabled` | Enable HPA for Keycloak pods | `false` |
|
||||||
|
| `autoscaling.hpa.minReplicas` | Minimum number of Keycloak replicas | `1` |
|
||||||
|
| `autoscaling.hpa.maxReplicas` | Maximum number of Keycloak replicas | `11` |
|
||||||
|
| `autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
|
||||||
|
| `autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleUp.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling up | `120` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleUp.selectPolicy` | The priority of policies that the autoscaler will apply when scaling up | `Max` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleUp.policies` | HPA scaling policies when scaling up | `[]` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleDown.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling down | `300` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleDown.selectPolicy` | The priority of policies that the autoscaler will apply when scaling down | `Max` |
|
||||||
|
| `autoscaling.hpa.behavior.scaleDown.policies` | HPA scaling policies when scaling down | `[]` |
|
||||||
|
|
||||||
### Metrics parameters
|
### Metrics parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------- |
|
||||||
| `metrics.enabled` | Enable exposing Keycloak statistics | `false` |
|
| `metrics.enabled` | Enable exposing Keycloak metrics | `false` |
|
||||||
| `metrics.service.ports.http` | Metrics service HTTP port | `8080` |
|
| `metrics.service.ports.metrics` | Metrics service Metrics port | `9000` |
|
||||||
| `metrics.service.ports.https` | Metrics service HTTPS port | `8443` |
|
| `metrics.service.annotations` | Annotations for enabling prometheus to access the metrics endpoints | `{}` |
|
||||||
| `metrics.service.ports.metrics` | Metrics service Metrics port | `9000` |
|
| `metrics.service.extraPorts` | Add additional ports to the keycloak metrics service | `[]` |
|
||||||
| `metrics.service.annotations` | Annotations for enabling prometheus to access the metrics endpoints | `{}` |
|
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||||
| `metrics.service.extraPorts` | Add additional ports to the keycloak metrics service (i.e. admin port 9000) | `[]` |
|
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
|
||||||
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
|
| `metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
|
||||||
| `metrics.serviceMonitor.port` | Metrics service HTTP port | `metrics` |
|
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
|
||||||
| `metrics.serviceMonitor.scheme` | Metrics service scheme | `http` |
|
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
|
||||||
| `metrics.serviceMonitor.tlsConfig` | Metrics service TLS configuration | `{}` |
|
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
||||||
| `metrics.serviceMonitor.endpoints` | The endpoint configuration of the ServiceMonitor. Path is mandatory. Port, scheme, tlsConfig, interval, timeout and labellings can be overwritten. | `[]` |
|
| `metrics.serviceMonitor.tlsConfig` | TLS configuration used for scrape endpoints used by Prometheus | `{}` |
|
||||||
| `metrics.serviceMonitor.path` | Metrics service HTTP path. Deprecated: Use @param metrics.serviceMonitor.endpoints instead | `""` |
|
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
|
||||||
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
|
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
|
||||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
|
| `metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||||
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
|
| `metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||||
| `metrics.serviceMonitor.labels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
|
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
||||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
| `metrics.prometheusRule.enabled` | Create PrometheusRule Resource for scraping metrics using PrometheusOperator | `false` |
|
||||||
| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
|
| `metrics.prometheusRule.namespace` | Namespace which Prometheus is running in | `""` |
|
||||||
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
|
| `metrics.prometheusRule.labels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
|
||||||
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
| `metrics.prometheusRule.groups` | Groups, containing the alert rules. | `[]` |
|
||||||
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
|
|
||||||
| `metrics.prometheusRule.enabled` | Create PrometheusRule Resource for scraping metrics using PrometheusOperator | `false` |
|
|
||||||
| `metrics.prometheusRule.namespace` | Namespace which Prometheus is running in | `""` |
|
|
||||||
| `metrics.prometheusRule.labels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
|
|
||||||
| `metrics.prometheusRule.groups` | Groups, containing the alert rules. | `[]` |
|
|
||||||
|
|
||||||
### keycloak-config-cli parameters
|
### keycloak-config-cli parameters
|
||||||
|
|
||||||
@@ -656,7 +643,7 @@ As an alternative, you can use of the preset configurations for pod affinity, po
|
|||||||
| `keycloakConfigCli.podLabels` | Pod extra labels | `{}` |
|
| `keycloakConfigCli.podLabels` | Pod extra labels | `{}` |
|
||||||
| `keycloakConfigCli.podAnnotations` | Annotations for job pod | `{}` |
|
| `keycloakConfigCli.podAnnotations` | Annotations for job pod | `{}` |
|
||||||
| `keycloakConfigCli.nodeSelector` | Node labels for pod assignment | `{}` |
|
| `keycloakConfigCli.nodeSelector` | Node labels for pod assignment | `{}` |
|
||||||
| `keycloakConfigCli.podTolerations` | Tolerations for job pod assignment | `[]` |
|
| `keycloakConfigCli.tolerations` | Tolerations for job pod assignment | `[]` |
|
||||||
| `keycloakConfigCli.availabilityCheck.enabled` | Whether to wait until Keycloak is available | `true` |
|
| `keycloakConfigCli.availabilityCheck.enabled` | Whether to wait until Keycloak is available | `true` |
|
||||||
| `keycloakConfigCli.availabilityCheck.timeout` | Timeout for the availability check (Default is 120s) | `""` |
|
| `keycloakConfigCli.availabilityCheck.timeout` | Timeout for the availability check (Default is 120s) | `""` |
|
||||||
| `keycloakConfigCli.extraEnvVars` | Additional environment variables to set | `[]` |
|
| `keycloakConfigCli.extraEnvVars` | Additional environment variables to set | `[]` |
|
||||||
@@ -671,6 +658,24 @@ As an alternative, you can use of the preset configurations for pod affinity, po
|
|||||||
| `keycloakConfigCli.cleanupAfterFinished.enabled` | Enables Cleanup for Finished Jobs | `false` |
|
| `keycloakConfigCli.cleanupAfterFinished.enabled` | Enables Cleanup for Finished Jobs | `false` |
|
||||||
| `keycloakConfigCli.cleanupAfterFinished.seconds` | Sets the value of ttlSecondsAfterFinished | `600` |
|
| `keycloakConfigCli.cleanupAfterFinished.seconds` | Sets the value of ttlSecondsAfterFinished | `600` |
|
||||||
|
|
||||||
|
### Default init container parameters
|
||||||
|
|
||||||
|
| Name | Description | Value |
|
||||||
|
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.enabled` | Enable init container that copies writable directories to an empty dir | `true` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.enabled` | Enabled "prepare-write-dirs" init-containers' Security Context | `true` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.seLinuxOptions` | Set SELinux options in "prepare-write-dirs" init-containers | `{}` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.runAsUser` | Set runAsUser in "prepare-write-dirs" init-containers' Security Context | `1001` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.runAsGroup` | Set runAsGroup in "prepare-write-dirs" init-containers' Security Context | `1001` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.runAsNonRoot` | Set runAsNonRoot in "prepare-write-dirs" init-containers' Security Context | `true` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.privileged` | Set privileged in "prepare-write-dirs" init-containers' Security Context | `false` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.readOnlyRootFilesystem` | Set readOnlyRootFilesystem in "prepare-write-dirs" init-containers' Security Context | `true` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.allowPrivilegeEscalation` | Set allowPrivilegeEscalation in "prepare-write-dirs" init-containers' Security Context | `false` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped in "prepare-write-dirs" init-containers | `["ALL"]` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.containerSecurityContext.seccompProfile.type` | Set seccomp profile in "prepare-write-dirs" init-containers | `RuntimeDefault` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.resourcesPreset` | Set Keycloak "prepare-write-dirs" init container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if defaultInitContainers.prepareWriteDirs.resources is set (defaultInitContainers.prepareWriteDirs.resources is recommended for production). | `nano` |
|
||||||
|
| `defaultInitContainers.prepareWriteDirs.resources` | Set Keycloak "prepare-write-dirs" init container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
||||||
|
|
||||||
### Database parameters
|
### Database parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
@@ -690,28 +695,10 @@ As an alternative, you can use of the preset configurations for pod affinity, po
|
|||||||
| `externalDatabase.database` | Keycloak database name | `bitnami_keycloak` |
|
| `externalDatabase.database` | Keycloak database name | `bitnami_keycloak` |
|
||||||
| `externalDatabase.schema` | Keycloak database schema | `public` |
|
| `externalDatabase.schema` | Keycloak database schema | `public` |
|
||||||
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
|
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
|
||||||
| `externalDatabase.existingSecretHostKey` | Name of an existing secret key containing the database host name | `""` |
|
|
||||||
| `externalDatabase.existingSecretPortKey` | Name of an existing secret key containing the database port | `""` |
|
|
||||||
| `externalDatabase.existingSecretUserKey` | Name of an existing secret key containing the database user | `""` |
|
| `externalDatabase.existingSecretUserKey` | Name of an existing secret key containing the database user | `""` |
|
||||||
| `externalDatabase.existingSecretDatabaseKey` | Name of an existing secret key containing the database name | `""` |
|
|
||||||
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `""` |
|
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `""` |
|
||||||
| `externalDatabase.annotations` | Additional custom annotations for external database secret object | `{}` |
|
| `externalDatabase.annotations` | Additional custom annotations for external database secret object | `{}` |
|
||||||
|
| `externalDatabase.extraParams` | Additional JDBC connection parameters appended to the JDBC URL (KC_DB_URL). | `""` |
|
||||||
### Keycloak Cache parameters
|
|
||||||
|
|
||||||
| Name | Description | Value |
|
|
||||||
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
|
||||||
| `cache.enabled` | Switch to enable or disable the keycloak distributed cache for kubernetes. | `true` |
|
|
||||||
| `cache.stack` | Set infinispan cache stack to use, sets KC_CACHE_STACK (<https://www.keycloak.org/server/all-config?q=cache-stack>) | `kubernetes` |
|
|
||||||
| `cache.configFile` | Set infinispan cache stack config filename sets KC_CACHE_CONFIG_FILE (<https://www.keycloak.org/server/all-config?q=cache-config-file>) | `cache-ispn.xml` |
|
|
||||||
| `cache.useHeadlessServiceWithAppVersion` | Set to true to create the headless service used for ispn containing the app version | `false` |
|
|
||||||
|
|
||||||
### Keycloak Logging parameters
|
|
||||||
|
|
||||||
| Name | Description | Value |
|
|
||||||
| ---------------- | ------------------------------------------------------------------------------ | --------- |
|
|
||||||
| `logging.output` | Alternates between the default log output format or json format | `default` |
|
|
||||||
| `logging.level` | Allowed values as documented: FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL, OFF | `INFO` |
|
|
||||||
|
|
||||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
|
|
||||||
@@ -742,6 +729,13 @@ Find more information about how to deal with common errors related to Bitnami's
|
|||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
|
### To 25.0.0
|
||||||
|
|
||||||
|
This version stops relying on the [Keycloak Metrics SPI](https://github.com/aerogear/keycloak-metrics-spi) to expose metrics and, relies on the native metrics exposed by Keycloak via [the management interface](https://www.keycloak.org/server/management-interface) and removes SPI Truststore related parameters given this functionality was deprecated on Keycloak as described in this [GitHub discussion](https://github.com/keycloak/keycloak/discussions/28007).
|
||||||
|
For security reasons, we also dropped support for exposing the management interface via Ingress.
|
||||||
|
|
||||||
|
This version includes some important refactoring to remove technical debt. As a consequence, some deprecated parameters were removed and it's likely some others were renamed to match the standards used in the Bitnami Charts catalog.
|
||||||
|
|
||||||
### To 24.3.0
|
### To 24.3.0
|
||||||
|
|
||||||
This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
|
This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
|
||||||
|
BIN
charts/keycloak/charts/common-2.31.3.tgz
Normal file
BIN
charts/keycloak/charts/common-2.31.3.tgz
Normal file
Binary file not shown.
BIN
charts/keycloak/charts/postgresql-16.7.24.tgz
Normal file
BIN
charts/keycloak/charts/postgresql-16.7.24.tgz
Normal file
Binary file not shown.
@@ -10,7 +10,7 @@ APP VERSION: {{ .Chart.AppVersion }}
|
|||||||
|
|
||||||
Keycloak can be accessed through the following DNS name from within your cluster:
|
Keycloak can be accessed through the following DNS name from within your cluster:
|
||||||
|
|
||||||
{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ coalesce .Values.service.ports.http .Values.service.port }})
|
{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ ternary .Values.service.ports.https .Values.service.ports.http .Values.tls.enabled }})
|
||||||
|
|
||||||
To access Keycloak from outside the cluster execute the following commands:
|
To access Keycloak from outside the cluster execute the following commands:
|
||||||
|
|
||||||
@@ -22,60 +22,33 @@ To access Keycloak from outside the cluster execute the following commands:
|
|||||||
echo "Keycloak URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ (tpl .Values.ingress.hostname .) }}/"
|
echo "Keycloak URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ (tpl .Values.ingress.hostname .) }}/"
|
||||||
echo "$CLUSTER_IP {{ (tpl .Values.ingress.hostname .) }}" | sudo tee -a /etc/hosts
|
echo "$CLUSTER_IP {{ (tpl .Values.ingress.hostname .) }}" | sudo tee -a /etc/hosts
|
||||||
|
|
||||||
{{- if .Values.adminIngress.enabled }}
|
|
||||||
The admin area of Keycloak has been configured to point to a different domain ({{ .Values.adminIngress.hostname }}). Please remember to update the `frontendUrl` property of the `{{ .Values.adminRealm | default "master" }}` (or any other) realm for it to work properly (see README for an example) :
|
|
||||||
|
|
||||||
echo "Keycloak admin URL: http{{ if .Values.adminIngress.tls }}s{{ end }}://{{ (tpl .Values.adminIngress.hostname .) }}/"
|
|
||||||
echo "$CLUSTER_IP {{ (tpl .Values.adminIngress.hostname .) }}" | sudo tee -a /etc/hosts
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
||||||
1. Get the Keycloak URL by running these commands:
|
1. Get the Keycloak URL by running these commands:
|
||||||
|
|
||||||
{{- if contains "NodePort" .Values.service.type }}
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
|
||||||
export HTTP_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].nodePort}" services {{ include "common.names.fullname" . }})
|
export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http{{ if .Values.tls.enabled }}s{{ end }}')].nodePort}" services {{ include "common.names.fullname" . }})
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
export HTTPS_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].nodePort}" services {{ include "common.names.fullname" . }})
|
|
||||||
{{- end }}
|
|
||||||
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
|
||||||
echo "http://${NODE_IP}:${HTTP_NODE_PORT}/"
|
echo "http{{ if .Values.tls.enabled }}s{{ end }}://${NODE_IP}:${NODE_PORT}/"
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
echo "https://${NODE_IP}:${HTTPS_NODE_PORT}/"
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
|
||||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
You can watch its status by running 'kubectl get --namespace {{ include "common.names.namespace" . }} svc -w {{ include "common.names.fullname" . }}'
|
You can watch its status by running 'kubectl get --namespace {{ include "common.names.namespace" . }} svc -w {{ include "common.names.fullname" . }}'
|
||||||
|
|
||||||
export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
|
export SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http{{ if .Values.tls.enabled }}s{{ end }}')].port}" services {{ include "common.names.fullname" . }})
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
|
|
||||||
{{- end }}
|
|
||||||
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||||
|
|
||||||
echo "http://${SERVICE_IP}:${HTTP_SERVICE_PORT}/"
|
echo "http{{ if .Values.tls.enabled }}s{{ end }}://${SERVICE_IP}:${SERVICE_PORT}/"
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
echo "https://${SERVICE_IP}:${HTTPS_SERVICE_PORT}/"
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
|
||||||
export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
|
export SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http{{ if .Values.tls.enabled }}s{{ end }}')].port}" services {{ include "common.names.fullname" . }})
|
||||||
{{- if .Values.tls.enabled }}
|
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${SERVICE_PORT}:${SERVICE_PORT} &
|
||||||
export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
|
|
||||||
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} ${HTTPS_SERVICE_PORT}:${HTTPS_SERVICE_PORT} &
|
|
||||||
{{- else }}
|
|
||||||
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} &
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
echo "http://127.0.0.1:${HTTP_SERVICE_PORT}/"
|
echo "http{{ if .Values.tls.enabled }}s{{ end }}://127.0.0.1:${SERVICE_PORT}/"
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
echo "https://127.0.0.1:${HTTPS_SERVICE_PORT}/"
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -85,7 +58,7 @@ The admin area of Keycloak has been configured to point to a different domain ({
|
|||||||
3. Access the Administration Console using the following credentials:
|
3. Access the Administration Console using the following credentials:
|
||||||
|
|
||||||
echo Username: {{ .Values.auth.adminUser }}
|
echo Username: {{ .Values.auth.adminUser }}
|
||||||
echo Password: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "keycloak.secretName" . }} -o jsonpath="{.data.{{ include "keycloak.secretKey" .}}}" | base64 -d)
|
echo Password: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "keycloak.secretName" . }} -o jsonpath="{.data.{{ include "keycloak.secretKey" . }}}" | base64 -d)
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.metrics.enabled }}
|
{{- if .Values.metrics.enabled }}
|
||||||
|
|
||||||
@@ -93,9 +66,9 @@ You can access the Prometheus metrics following the steps below:
|
|||||||
|
|
||||||
1. Get the Keycloak Prometheus metrics URL by running:
|
1. Get the Keycloak Prometheus metrics URL by running:
|
||||||
|
|
||||||
{{- $metricsPort := coalesce .Values.metrics.service.ports.metrics .Values.metrics.service.port | toString }}
|
{{- $metricsPort := .Values.metrics.service.ports.metrics | toString }}
|
||||||
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ $metricsPort }}:{{ $metricsPort }} &
|
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ $metricsPort }}:{{ $metricsPort }} &
|
||||||
echo "Keycloak Prometheus metrics URL: http://127.0.0.1:{{ $metricsPort }}/metrics"
|
echo "Keycloak Prometheus metrics URL: http{{ if .Values.tls.enabled }}s{{ end }}://127.0.0.1:{{ $metricsPort }}/metrics"
|
||||||
|
|
||||||
2. Open a browser and access Keycloak Prometheus metrics using the obtained URL.
|
2. Open a browser and access Keycloak Prometheus metrics using the obtained URL.
|
||||||
|
|
||||||
@@ -104,6 +77,6 @@ You can access the Prometheus metrics following the steps below:
|
|||||||
{{- include "keycloak.validateValues" . }}
|
{{- include "keycloak.validateValues" . }}
|
||||||
{{- include "common.warnings.rollingTag" .Values.image }}
|
{{- include "common.warnings.rollingTag" .Values.image }}
|
||||||
{{- include "common.warnings.rollingTag" .Values.keycloakConfigCli.image }}
|
{{- include "common.warnings.rollingTag" .Values.keycloakConfigCli.image }}
|
||||||
{{- include "common.warnings.resources" (dict "sections" (list "keycloakConfigCli" "") "context" $) }}
|
{{- include "common.warnings.resources" (dict "sections" (list "" "keycloakConfigCli") "context" .) }}
|
||||||
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) }}
|
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" .) }}
|
||||||
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) }}
|
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" .) }}
|
||||||
|
@@ -17,39 +17,35 @@ Return the proper keycloak-config-cli image name
|
|||||||
{{ include "common.images.image" (dict "imageRoot" .Values.keycloakConfigCli.image "global" .Values.global) }}
|
{{ include "common.images.image" (dict "imageRoot" .Values.keycloakConfigCli.image "global" .Values.global) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the keycloak-config-cli configuration configmap.
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.keycloakConfigCli.configmapName" -}}
|
|
||||||
{{- if .Values.keycloakConfigCli.existingConfigmap -}}
|
|
||||||
{{- printf "%s" (tpl .Values.keycloakConfigCli.existingConfigmap $) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- printf "%s-keycloak-config-cli-configmap" (include "common.names.fullname" .) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return true if a configmap object should be created for keycloak-config-cli
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.keycloakConfigCli.createConfigmap" -}}
|
|
||||||
{{- if and .Values.keycloakConfigCli.enabled .Values.keycloakConfigCli.configuration (not .Values.keycloakConfigCli.existingConfigmap) -}}
|
|
||||||
{{- true -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the proper Docker Image Registry Secret Names
|
Return the proper Docker Image Registry Secret Names
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.imagePullSecrets" -}}
|
{{- define "keycloak.imagePullSecrets" -}}
|
||||||
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) -}}
|
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create a default fully qualified app name.
|
Create a default fully qualified postgresql name.
|
||||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.postgresql.fullname" -}}
|
{{- define "keycloak.postgresql.fullname" -}}
|
||||||
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
|
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified headless service name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.headless.serviceName" -}}
|
||||||
|
{{- printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified headless service name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.headless.ispn.serviceName" -}}
|
||||||
|
{{- printf "%s-headless-ispn-%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
@@ -64,189 +60,24 @@ Create the name of the service account to use
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the path Keycloak is hosted on. This looks at httpRelativePath and returns it with a trailing slash. For example:
|
Return the Keycloak configuration ConfigMap name.
|
||||||
/ -> / (the default httpRelativePath)
|
|
||||||
/auth -> /auth/ (trailing slash added)
|
|
||||||
/custom/ -> /custom/ (unchanged)
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.httpPath" -}}
|
|
||||||
{{ ternary .Values.httpRelativePath (printf "%s%s" .Values.httpRelativePath "/") (hasSuffix "/" .Values.httpRelativePath) }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Keycloak configuration configmap
|
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.configmapName" -}}
|
{{- define "keycloak.configmapName" -}}
|
||||||
{{- if .Values.existingConfigmap -}}
|
{{- if .Values.existingConfigmap -}}
|
||||||
{{- printf "%s" (tpl .Values.existingConfigmap $) -}}
|
{{- tpl .Values.existingConfigmap . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s-configuration" (include "common.names.fullname" .) -}}
|
{{- printf "%s-configuration" (include "common.names.fullname" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return true if a configmap object should be created
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.createConfigmap" -}}
|
|
||||||
{{- if and .Values.configuration (not .Values.existingConfigmap) }}
|
|
||||||
{{- true -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database hostname
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseHost" -}}
|
|
||||||
{{- if eq .Values.postgresql.architecture "replication" }}
|
|
||||||
{{- ternary (include "keycloak.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled -}}-primary
|
|
||||||
{{- else -}}
|
|
||||||
{{- ternary (include "keycloak.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database port
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databasePort" -}}
|
|
||||||
{{- ternary "5432" (tpl (.Values.externalDatabase.port | toString) $) .Values.postgresql.enabled | quote -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database database name
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseName" -}}
|
|
||||||
{{- if .Values.postgresql.enabled }}
|
|
||||||
{{- if .Values.global.postgresql }}
|
|
||||||
{{- if .Values.global.postgresql.auth }}
|
|
||||||
{{- coalesce .Values.global.postgresql.auth.database .Values.postgresql.auth.database -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Values.postgresql.auth.database -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Values.postgresql.auth.database -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- tpl .Values.externalDatabase.database $ -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database port
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseSchema" -}}
|
|
||||||
{{- ternary "public" (tpl (.Values.externalDatabase.schema | toString) $) .Values.postgresql.enabled | quote -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database user
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseUser" -}}
|
|
||||||
{{- if .Values.postgresql.enabled -}}
|
|
||||||
{{- if .Values.global.postgresql -}}
|
|
||||||
{{- if .Values.global.postgresql.auth -}}
|
|
||||||
{{- coalesce .Values.global.postgresql.auth.username .Values.postgresql.auth.username -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Values.postgresql.auth.username -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Values.postgresql.auth.username -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- tpl .Values.externalDatabase.user $ -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Database encrypted password
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseSecretName" -}}
|
|
||||||
{{- if .Values.postgresql.enabled -}}
|
|
||||||
{{- if .Values.global.postgresql -}}
|
|
||||||
{{- if .Values.global.postgresql.auth -}}
|
|
||||||
{{- if .Values.global.postgresql.auth.existingSecret -}}
|
|
||||||
{{- tpl .Values.global.postgresql.auth.existingSecret $ -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- default (printf "%s-externaldb" (include "common.names.fullname" .)) (tpl .Values.externalDatabase.existingSecret $) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Add environment variables to configure database values
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.databaseSecretPasswordKey" -}}
|
|
||||||
{{- if .Values.postgresql.enabled -}}
|
|
||||||
{{- printf "%s" (.Values.postgresql.auth.secretKeys.userPasswordKey | default "password") -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecret -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretPasswordKey -}}
|
|
||||||
{{- printf "%s" .Values.externalDatabase.existingSecretPasswordKey -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-password" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-password" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- define "keycloak.databaseSecretHostKey" -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretHostKey -}}
|
|
||||||
{{- printf "%s" .Values.externalDatabase.existingSecretHostKey -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-host" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- define "keycloak.databaseSecretPortKey" -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretPortKey -}}
|
|
||||||
{{- printf "%s" .Values.externalDatabase.existingSecretPortKey -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-port" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- define "keycloak.databaseSecretUserKey" -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretUserKey -}}
|
|
||||||
{{- printf "%s" .Values.externalDatabase.existingSecretUserKey -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-user" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- define "keycloak.databaseSecretDatabaseKey" -}}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretDatabaseKey -}}
|
|
||||||
{{- printf "%s" .Values.externalDatabase.existingSecretDatabaseKey -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- print "db-database" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the Keycloak initdb scripts configmap
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.initdbScriptsCM" -}}
|
|
||||||
{{- if .Values.initdbScriptsConfigMap -}}
|
|
||||||
{{- printf "%s" .Values.initdbScriptsConfigMap -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- printf "%s-init-scripts" (include "common.names.fullname" .) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the secret containing the Keycloak admin password
|
Return the secret containing the Keycloak admin password
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.secretName" -}}
|
{{- define "keycloak.secretName" -}}
|
||||||
{{- $secretName := .Values.auth.existingSecret -}}
|
{{- if .Values.auth.existingSecret -}}
|
||||||
{{- if $secretName -}}
|
{{- tpl .Values.auth.existingSecret . -}}
|
||||||
{{- printf "%s" (tpl $secretName $) -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
{{- include "common.names.fullname" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@@ -254,21 +85,134 @@ Return the secret containing the Keycloak admin password
|
|||||||
Return the secret key that contains the Keycloak admin password
|
Return the secret key that contains the Keycloak admin password
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.secretKey" -}}
|
{{- define "keycloak.secretKey" -}}
|
||||||
{{- $secretName := .Values.auth.existingSecret -}}
|
{{- if and .Values.auth.existingSecret .Values.auth.passwordSecretKey -}}
|
||||||
{{- if and $secretName .Values.auth.passwordSecretKey -}}
|
{{- tpl .Values.auth.passwordSecretKey . -}}
|
||||||
{{- printf "%s" .Values.auth.passwordSecretKey -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "admin-password" -}}
|
{{- print "admin-password" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the keycloak-config-cli configuration ConfigMap name.
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.keycloakConfigCli.configmapName" -}}
|
||||||
|
{{- if .Values.keycloakConfigCli.existingConfigmap -}}
|
||||||
|
{{- tpl .Values.keycloakConfigCli.existingConfigmap . -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-keycloak-config-cli-configmap" (include "common.names.fullname" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database hostname
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.host" -}}
|
||||||
|
{{- if .Values.postgresql.enabled -}}
|
||||||
|
{{- include "keycloak.postgresql.fullname" . -}}{{- if eq .Values.postgresql.architecture "replication" }}-primary{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- tpl .Values.externalDatabase.host . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database port
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.port" -}}
|
||||||
|
{{- ternary "5432" .Values.externalDatabase.port .Values.postgresql.enabled -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database database name
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.name" -}}
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
|
{{- coalesce (((.Values.global).postgresql).auth).database .Values.postgresql.auth.database "postgres" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- tpl .Values.externalDatabase.database . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database user
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.user" -}}
|
||||||
|
{{- if .Values.postgresql.enabled -}}
|
||||||
|
{{- coalesce (((.Values.global).postgresql).auth).username .Values.postgresql.auth.username | default "" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- tpl .Values.externalDatabase.user . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database schema
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.schema" -}}
|
||||||
|
{{- ternary "public" .Values.externalDatabase.schema .Values.postgresql.enabled -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return extra connection parameters for the Database DSN
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.extraParams" -}}
|
||||||
|
{{- if .Values.externalDatabase.extraParams -}}
|
||||||
|
{{- printf "&%s" (tpl .Values.externalDatabase.extraParams .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database secret name
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.secretName" -}}
|
||||||
|
{{- if .Values.postgresql.enabled -}}
|
||||||
|
{{- if not (empty (coalesce (((.Values.global).postgresql).auth).existingSecret .Values.postgresql.auth.existingSecret | default "")) -}}
|
||||||
|
{{- tpl (coalesce (((.Values.global).postgresql).auth).existingSecret .Values.postgresql.auth.existingSecret) . -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- include "keycloak.postgresql.fullname" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else if not (empty .Values.externalDatabase.existingSecret) -}}
|
||||||
|
{{- tpl .Values.externalDatabase.existingSecret . -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-externaldb" (include "common.names.fullname" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database secret key that contains the database user
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.secretUserKey" -}}
|
||||||
|
{{- default "db-user" .Values.externalDatabase.existingSecretUserKey -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Database secret key that contains the database password
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.database.secretPasswordKey" -}}
|
||||||
|
{{- if .Values.postgresql.enabled -}}
|
||||||
|
{{- default "password" .Values.postgresql.auth.secretKeys.userPasswordKey -}}
|
||||||
|
{{- else if .Values.externalDatabase.existingSecret -}}
|
||||||
|
{{- default "db-password" .Values.externalDatabase.existingSecretPasswordKey -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- print "db-password" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the Keycloak initdb scripts ConfigMap name.
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.initdbScripts.configmapName" -}}
|
||||||
|
{{- if .Values.initdbScriptsConfigMap -}}
|
||||||
|
{{- tpl .Values.initdbScriptsConfigMap . -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-init-scripts" (include "common.names.fullname" .) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the secret containing Keycloak HTTPS/TLS certificates
|
Return the secret containing Keycloak HTTPS/TLS certificates
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.tlsSecretName" -}}
|
{{- define "keycloak.tls.secretName" -}}
|
||||||
{{- $secretName := .Values.tls.existingSecret -}}
|
{{- if .Values.tls.existingSecret -}}
|
||||||
{{- if $secretName -}}
|
{{- tpl .Values.tls.existingSecret . -}}
|
||||||
{{- printf "%s" (tpl $secretName $) -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
|
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -277,36 +221,14 @@ Return the secret containing Keycloak HTTPS/TLS certificates
|
|||||||
{{/*
|
{{/*
|
||||||
Return the secret containing Keycloak HTTPS/TLS keystore and truststore passwords
|
Return the secret containing Keycloak HTTPS/TLS keystore and truststore passwords
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "keycloak.tlsPasswordsSecretName" -}}
|
{{- define "keycloak.tls.passwordsSecretName" -}}
|
||||||
{{- $secretName := .Values.tls.passwordsSecret -}}
|
{{- if .Values.tls.passwordsSecret -}}
|
||||||
{{- if $secretName -}}
|
{{- tpl .Values.tls.passwordsSecret . -}}
|
||||||
{{- printf "%s" (tpl $secretName $) -}}
|
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the secret containing Keycloak SPI TLS certificates
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.spiPasswordsSecretName" -}}
|
|
||||||
{{- $secretName := .Values.spi.passwordsSecret -}}
|
|
||||||
{{- if $secretName -}}
|
|
||||||
{{- printf "%s" (tpl $secretName $) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- printf "%s-spi-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return true if a TLS secret object should be created
|
|
||||||
*/}}
|
|
||||||
{{- define "keycloak.createTlsSecret" -}}
|
|
||||||
{{- if and .Values.tls.enabled .Values.tls.autoGenerated (not .Values.tls.existingSecret) }}
|
|
||||||
{{- true -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Compile all warnings into a single message.
|
Compile all warnings into a single message.
|
||||||
*/}}
|
*/}}
|
||||||
@@ -325,7 +247,7 @@ Compile all warnings into a single message.
|
|||||||
|
|
||||||
{{/* Validate values of Keycloak - database */}}
|
{{/* Validate values of Keycloak - database */}}
|
||||||
{{- define "keycloak.validateValues.database" -}}
|
{{- define "keycloak.validateValues.database" -}}
|
||||||
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.host) (and (not .Values.externalDatabase.password) (not .Values.externalDatabase.existingSecret)) -}}
|
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.host) -}}
|
||||||
keycloak: database
|
keycloak: database
|
||||||
You disabled the PostgreSQL sub-chart but did not specify an external PostgreSQL host.
|
You disabled the PostgreSQL sub-chart but did not specify an external PostgreSQL host.
|
||||||
Either deploy the PostgreSQL sub-chart (--set postgresql.enabled=true),
|
Either deploy the PostgreSQL sub-chart (--set postgresql.enabled=true),
|
||||||
@@ -337,19 +259,19 @@ keycloak: database
|
|||||||
|
|
||||||
{{/* Validate values of Keycloak - TLS enabled */}}
|
{{/* Validate values of Keycloak - TLS enabled */}}
|
||||||
{{- define "keycloak.validateValues.tls" -}}
|
{{- define "keycloak.validateValues.tls" -}}
|
||||||
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated) (not .Values.tls.existingSecret) }}
|
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated.enabled) (not .Values.tls.existingSecret) }}
|
||||||
keycloak: tls.enabled
|
keycloak: tls.enabled
|
||||||
In order to enable TLS, you also need to provide
|
In order to enable TLS, you need to provide a secret with the TLS
|
||||||
an existing secret containing the Keystore and Truststore or
|
certificates (--set tls.existingSecret=FOO) or enable auto-generated
|
||||||
enable auto-generated certificates.
|
TLS certificates (--set tls.autoGenerated.enabled=true).
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/* Validate values of Keycloak - Production mode enabled */}}
|
{{/* Validate values of Keycloak - Production mode enabled */}}
|
||||||
{{- define "keycloak.validateValues.production" -}}
|
{{- define "keycloak.validateValues.production" -}}
|
||||||
{{- if and .Values.production (not .Values.tls.enabled) (not (eq .Values.proxy "edge")) (empty .Values.proxyHeaders) -}}
|
{{- if and .Values.production (not .Values.tls.enabled) (empty .Values.proxyHeaders) -}}
|
||||||
keycloak: production
|
keycloak: production
|
||||||
In order to enable Production mode, you also need to enable HTTPS/TLS
|
In order to enable Production mode, you also need to enable
|
||||||
using the value 'tls.enabled' and providing an existing secret containing the Keystore and Trustore.
|
HTTPS/TLS (--set tls.enabled=true) or use proxy headers (--set proxyHeaders=FOO).
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
39
charts/keycloak/templates/_init_containers.tpl
Normal file
39
charts/keycloak/templates/_init_containers.tpl
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Returns an init-container that copies writable directories to an empty dir volume in order to not break the application functionality
|
||||||
|
*/}}
|
||||||
|
{{- define "keycloak.defaultInitContainers.prepareWriteDirs" -}}
|
||||||
|
- name: prepare-write-dirs
|
||||||
|
image: {{ template "keycloak.image" . }}
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
{{- if .Values.defaultInitContainers.prepareWriteDirs.containerSecurityContext.enabled }}
|
||||||
|
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.defaultInitContainers.prepareWriteDirs.containerSecurityContext "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.defaultInitContainers.prepareWriteDirs.resources }}
|
||||||
|
resources: {{- toYaml .Values.defaultInitContainers.prepareWriteDirs.resources | nindent 4 }}
|
||||||
|
{{- else if ne .Values.defaultInitContainers.prepareWriteDirs.resourcesPreset "none" }}
|
||||||
|
resources: {{- include "common.resources.preset" (dict "type" .Values.defaultInitContainers.prepareWriteDirs.resourcesPreset) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
. /opt/bitnami/scripts/liblog.sh
|
||||||
|
|
||||||
|
info "Copying writable dirs to empty dir"
|
||||||
|
# In order to not break the application functionality we need to make some
|
||||||
|
# directories writable, so we need to copy it to an empty dir volume
|
||||||
|
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/lib/quarkus /emptydir/app-quarkus-dir
|
||||||
|
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/data /emptydir/app-data-dir
|
||||||
|
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/providers /emptydir/app-providers-dir
|
||||||
|
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/themes /emptydir/app-themes-dir
|
||||||
|
info "Copy operation completed"
|
||||||
|
volumeMounts:
|
||||||
|
- name: empty-dir
|
||||||
|
mountPath: /emptydir
|
||||||
|
{{- end -}}
|
53
charts/keycloak/templates/ca-cert.yaml
Normal file
53
charts/keycloak/templates/ca-cert.yaml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{{- /*
|
||||||
|
Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if and .Values.tls.enabled .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "cert-manager") }}
|
||||||
|
{{- if empty .Values.tls.autoGenerated.certManager.existingIssuer }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Issuer
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-clusterissuer" (include "common.names.fullname" .) }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
selfSigned: {}
|
||||||
|
---
|
||||||
|
{{- end }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
secretName: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
|
||||||
|
commonName: {{ printf "%s-ca" (include "common.names.fullname" .) }}
|
||||||
|
isCA: true
|
||||||
|
issuerRef:
|
||||||
|
name: {{ default (printf "%s-clusterissuer" (include "common.names.fullname" .)) .Values.tls.autoGenerated.certManager.existingIssuer }}
|
||||||
|
kind: {{ default "Issuer" .Values.tls.autoGenerated.certManager.existingIssuerKind }}
|
||||||
|
---
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Issuer
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-ca-issuer" (include "common.names.fullname" .) }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
ca:
|
||||||
|
secretName: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
|
||||||
|
{{- end }}
|
44
charts/keycloak/templates/cert.yaml
Normal file
44
charts/keycloak/templates/cert.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{{- /*
|
||||||
|
Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if and .Values.tls.enabled .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "cert-manager") }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-crt" (include "common.names.fullname" .) }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
secretName: {{ template "keycloak.tls.secretName" . }}
|
||||||
|
commonName: {{ printf "%s.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain }}
|
||||||
|
issuerRef:
|
||||||
|
name: {{ printf "%s-ca-issuer" (include "common.names.fullname" .) }}
|
||||||
|
kind: Issuer
|
||||||
|
subject:
|
||||||
|
organizations:
|
||||||
|
- "Keycloak"
|
||||||
|
dnsNames:
|
||||||
|
- '*.{{ include "common.names.namespace" . }}'
|
||||||
|
- '*.{{ include "common.names.namespace" . }}.svc'
|
||||||
|
- '*.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }}'
|
||||||
|
- '*.{{ include "common.names.fullname" . }}'
|
||||||
|
- '*.{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}'
|
||||||
|
- '*.{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc'
|
||||||
|
- '*.{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }}'
|
||||||
|
- '*.{{ include "keycloak.headless.serviceName" . }}'
|
||||||
|
- '*.{{ include "keycloak.headless.serviceName" . }}.{{ include "common.names.namespace" . }}'
|
||||||
|
- '*.{{ include "keycloak.headless.serviceName" . }}.{{ include "common.names.namespace" . }}.svc'
|
||||||
|
- '*.{{ include "keycloak.headless.serviceName" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }}'
|
||||||
|
privateKey:
|
||||||
|
algorithm: {{ .Values.tls.autoGenerated.certManager.keyAlgorithm }}
|
||||||
|
size: {{ int .Values.tls.autoGenerated.certManager.keySize }}
|
||||||
|
duration: {{ .Values.tls.autoGenerated.certManager.duration }}
|
||||||
|
renewBefore: {{ .Values.tls.autoGenerated.certManager.renewBefore }}
|
||||||
|
{{- end }}
|
@@ -8,102 +8,78 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
|
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
data:
|
data:
|
||||||
|
BITNAMI_DEBUG: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||||
|
KEYCLOAK_PRODUCTION: {{ ternary "true" "false" .Values.production | quote }}
|
||||||
|
KC_LOG_LEVEL: {{ .Values.logging.level | quote }}
|
||||||
|
KC_LOG_CONSOLE_OUTPUT: {{ .Values.logging.output | quote }}
|
||||||
KC_BOOTSTRAP_ADMIN_USERNAME: {{ .Values.auth.adminUser | quote }}
|
KC_BOOTSTRAP_ADMIN_USERNAME: {{ .Values.auth.adminUser | quote }}
|
||||||
KEYCLOAK_HTTP_PORT: {{ .Values.containerPorts.http | quote }}
|
{{- if .Values.usePasswordFiles }}
|
||||||
{{- if and .Values.proxy (empty .Values.proxyHeaders) }}
|
KC_BOOTSTRAP_ADMIN_PASSWORD_FILE: {{ printf "/opt/bitnami/keycloak/secrets/%s" (include "keycloak.secretKey" .) }}
|
||||||
KEYCLOAK_PROXY_HEADERS: {{ ternary "" "xforwarded" (eq .Values.proxy "passthrough") | quote }}
|
|
||||||
{{- else }}
|
|
||||||
KEYCLOAK_PROXY_HEADERS: {{ .Values.proxyHeaders | quote }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.adminIngress.enabled .Values.adminIngress.hostname }}
|
KC_HTTP_PORT: {{ .Values.containerPorts.http | quote }}
|
||||||
KEYCLOAK_HOSTNAME_ADMIN: |-
|
KC_HTTP_MANAGEMENT_PORT: {{ .Values.containerPorts.management | quote }}
|
||||||
{{ ternary "https://" "http://" ( or .Values.adminIngress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}} {{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.hostname "context" $) -}}
|
KC_HTTP_ENABLED: {{ ternary "true" "false" (or .Values.httpEnabled (not .Values.tls.enabled)) | quote }}
|
||||||
{{- if eq .Values.adminIngress.controller "default" }}
|
{{- if .Values.proxyHeaders }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.path "context" $) }}
|
KC_PROXY_HEADERS: {{ .Values.proxyHeaders | quote }}
|
||||||
{{- else if eq .Values.adminIngress.controller "gce" }}
|
|
||||||
{{- $path := .Values.adminIngress.path -}}
|
|
||||||
{{- if hasSuffix "*" $path -}}
|
|
||||||
{{- $path = trimSuffix "*" $path -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.ingress.enabled .Values.ingress.hostname }}
|
|
||||||
KEYCLOAK_HOSTNAME: |-
|
|
||||||
{{ ternary "https://" "http://" ( or .Values.ingress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}} {{- include "common.tplvalues.render" (dict "value" .Values.ingress.hostname "context" $) -}}
|
|
||||||
{{- if eq .Values.ingress.controller "default" }}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.path "context" $) }}
|
|
||||||
{{- else if eq .Values.ingress.controller "gce" }}
|
|
||||||
{{- $path := .Values.ingress.path -}}
|
|
||||||
{{- if hasSuffix "*" $path -}}
|
|
||||||
{{- $path = trimSuffix "*" $path -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.enabled }}
|
{{- if .Values.ingress.enabled }}
|
||||||
KEYCLOAK_HOSTNAME_STRICT: {{ ternary "true" "false" .Values.ingress.hostnameStrict | quote }}
|
KC_HOSTNAME_STRICT: {{ ternary "true" "false" .Values.hostnameStrict | quote }}
|
||||||
|
{{- if .Values.ingress.hostname }}
|
||||||
|
{{- $path := tpl .Values.ingress.path . }}
|
||||||
|
{{- if and (eq .Values.ingress.controller "gce") (hasSuffix "*" $path) }}
|
||||||
|
{{- $path = trimSuffix "*" $path }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
KEYCLOAK_ENABLE_STATISTICS: {{ ternary "true" "false" .Values.metrics.enabled | quote }}
|
KC_HOSTNAME: {{ printf "%s://%s%s" (ternary "https" "http" (or .Values.ingress.tls (not (empty .Values.proxyHeaders)))) (tpl .Values.ingress.hostname .) $path | quote }}
|
||||||
{{- if not .Values.externalDatabase.existingSecretHostKey }}
|
|
||||||
KEYCLOAK_DATABASE_HOST: {{ include "keycloak.databaseHost" . | quote }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Values.externalDatabase.existingSecretPortKey }}
|
{{- end }}
|
||||||
KEYCLOAK_DATABASE_PORT: {{ include "keycloak.databasePort" . }}
|
KC_METRICS_ENABLED: {{ ternary "true" "false" .Values.metrics.enabled | quote }}
|
||||||
|
KC_DB_URL: {{ printf "jdbc:postgresql://%s:%d/%s?currentSchema=%s%s" (include "keycloak.database.host" .) (include "keycloak.database.port" . | int) (include "keycloak.database.name" .) (include "keycloak.database.schema" .) (include "keycloak.database.extraParams" .) | quote }}
|
||||||
|
KC_DB_SCHEMA: {{ include "keycloak.database.schema" . | quote }}
|
||||||
|
{{- if .Values.usePasswordFiles }}
|
||||||
|
KC_DB_PASSWORD_FILE: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.database.secretPasswordKey" .) }}
|
||||||
|
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
||||||
|
KC_DB_USERNAME_FILE: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.database.secretUserKey" .) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Values.externalDatabase.existingSecretDatabaseKey }}
|
{{- end }}
|
||||||
KEYCLOAK_DATABASE_NAME: {{ include "keycloak.databaseName" . | quote }}
|
{{- if not (and .Values.externalDatabase.existingSecret .Values.externalDatabase.existingSecretUserKey) }}
|
||||||
|
KC_DB_USERNAME: {{ include "keycloak.database.user" . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
KEYCLOAK_DATABASE_SCHEMA: {{ include "keycloak.databaseSchema" . }}
|
{{- if .Values.tls.enabled }}
|
||||||
{{- if not .Values.externalDatabase.existingSecretUserKey }}
|
KEYCLOAK_ENABLE_HTTPS: "true"
|
||||||
KEYCLOAK_DATABASE_USER: {{ include "keycloak.databaseUser" . | quote }}
|
KC_HTTPS_PORT: {{ .Values.containerPorts.https | quote }}
|
||||||
{{- end }}
|
{{- if or .Values.tls.usePemCerts .Values.tls.autoGenerated.enabled }}
|
||||||
KEYCLOAK_PRODUCTION: {{ ternary "true" "false" .Values.production | quote }}
|
KEYCLOAK_HTTPS_USE_PEM: "true"
|
||||||
KEYCLOAK_ENABLE_HTTPS: {{ ternary "true" "false" .Values.tls.enabled | quote }}
|
KC_HTTPS_CERTIFICATE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" (ternary "tls.crt" .Values.tls.certFilename .Values.tls.autoGenerated.enabled) | quote }}
|
||||||
{{- if .Values.customCaExistingSecret }}
|
KC_HTTPS_CERTIFICATE_KEY_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" (ternary "tls.key" .Values.tls.certKeyFilename .Values.tls.autoGenerated.enabled) | quote }}
|
||||||
KC_TRUSTSTORE_PATHS: "/opt/bitnami/keycloak/custom-ca"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
KEYCLOAK_HTTPS_PORT: {{ .Values.containerPorts.https | quote }}
|
|
||||||
KEYCLOAK_HTTPS_USE_PEM: {{ ternary "true" "false" (or .Values.tls.usePem .Values.tls.autoGenerated) | quote }}
|
|
||||||
{{- if or .Values.tls.usePem .Values.tls.autoGenerated }}
|
|
||||||
KEYCLOAK_HTTPS_CERTIFICATE_FILE: "/opt/bitnami/keycloak/certs/tls.crt"
|
|
||||||
KEYCLOAK_HTTPS_CERTIFICATE_KEY_FILE: "/opt/bitnami/keycloak/certs/tls.key"
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
KEYCLOAK_HTTPS_KEY_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.keystoreFilename | quote }}
|
KC_HTTPS_KEY_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.keystoreFilename | quote }}
|
||||||
KEYCLOAK_HTTPS_TRUST_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.truststoreFilename | quote }}
|
KC_HTTPS_TRUST_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.truststoreFilename | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.trustedCertsExistingSecret }}
|
||||||
|
KC_TRUSTSTORE_PATHS: "/opt/bitnami/keycloak/truststore"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.spi.existingSecret }}
|
KC_CACHE: {{ ternary "ispn" "local" .Values.cache.enabled | quote }}
|
||||||
{{- if .Values.spi.hostnameVerificationPolicy }}
|
{{- if .Values.cache.enabled }}
|
||||||
KEYCLOAK_SPI_TRUSTSTORE_FILE_HOSTNAME_VERIFICATION_POLICY: {{ .Values.spi.hostnameVerificationPolicy | quote }}
|
|
||||||
{{- end }}
|
|
||||||
KEYCLOAK_SPI_TRUSTSTORE_FILE: {{ printf "/opt/bitnami/keycloak/spi-certs/%s" .Values.spi.truststoreFilename }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.cache.enabled }}
|
|
||||||
KC_CACHE_TYPE: "ispn"
|
|
||||||
{{- if .Values.cache.stack }}
|
{{- if .Values.cache.stack }}
|
||||||
KC_CACHE_STACK: {{ .Values.cache.stack | quote }}
|
KC_CACHE_STACK: {{ .Values.cache.stack | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.cache.configFile }}
|
{{- if .Values.cache.configFile }}
|
||||||
KC_CACHE_CONFIG_FILE: {{ .Values.cache.configFile | quote }}
|
KC_CACHE_CONFIG_FILE: {{ .Values.cache.configFile | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.cache.useHeadlessServiceWithAppVersion }}
|
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s.%s.svc.%s" (ternary (include "keycloak.headless.ispn.serviceName" .) (include "keycloak.headless.serviceName" .) .Values.cache.useHeadlessServiceWithAppVersion) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
|
||||||
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless-ispn-%s.%s.svc.%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
|
{{- end }}
|
||||||
{{- else }}
|
KC_HTTP_RELATIVE_PATH: {{ .Values.httpRelativePath | quote }}
|
||||||
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
|
{{- if .Values.adminRealm }}
|
||||||
|
KC_SPI_ADMIN_REALM: {{ .Values.adminRealm | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- if .Values.extraStartupArgs }}
|
||||||
KC_CACHE_TYPE: "local"
|
KEYCLOAK_EXTRA_ARGS: {{ .Values.extraStartupArgs | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.logging }}
|
|
||||||
KEYCLOAK_LOG_OUTPUT: {{ .Values.logging.output | quote }}
|
|
||||||
KEYCLOAK_LOG_LEVEL: {{ .Values.logging.level | quote }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
@@ -3,16 +3,17 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if (include "keycloak.createConfigmap" .) }}
|
{{- if and .Values.configuration (not .Values.existingConfigmap) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-configuration" (include "common.names.fullname" .) }}
|
name: {{ printf "%s-configuration" (include "common.names.fullname" .) }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
data:
|
data:
|
||||||
keycloak.conf: |-
|
keycloak.conf: |-
|
||||||
|
@@ -7,37 +7,38 @@ SPDX-License-Identifier: APACHE-2.0
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-headless-ispn-%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) | trunc 63 | trimSuffix "-" }}
|
name: {{ template "keycloak.headless.ispn.serviceName" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
|
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.headless.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
ports:
|
ports:
|
||||||
|
{{- if .Values.service.http.enabled }}
|
||||||
- name: http
|
- name: http
|
||||||
port: {{ .Values.containerPorts.http }}
|
port: {{ .Values.containerPorts.http }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: http
|
targetPort: http
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: https
|
- name: https
|
||||||
port: {{ .Values.containerPorts.https }}
|
port: {{ .Values.containerPorts.https }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: https
|
targetPort: https
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.extraHeadlessPorts }}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraHeadlessPorts "context" $) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.service.headless.extraPorts }}
|
{{- if .Values.service.headless.extraPorts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
publishNotReadyAddresses: true
|
publishNotReadyAddresses: true
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
selector: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
app.kubernetes.io/app-version: {{ .Chart.AppVersion }}
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
app.kubernetes.io/app-version: {{ .Chart.AppVersion | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -6,35 +6,36 @@ SPDX-License-Identifier: APACHE-2.0
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
name: {{ template "keycloak.headless.serviceName" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
|
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.headless.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
ports:
|
ports:
|
||||||
|
{{- if .Values.service.http.enabled }}
|
||||||
- name: http
|
- name: http
|
||||||
port: {{ .Values.containerPorts.http }}
|
port: {{ .Values.containerPorts.http }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: http
|
targetPort: http
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: https
|
- name: https
|
||||||
port: {{ .Values.containerPorts.https }}
|
port: {{ .Values.containerPorts.https }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: https
|
targetPort: https
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.extraHeadlessPorts }}
|
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraHeadlessPorts "context" $) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.service.headless.extraPorts }}
|
{{- if .Values.service.headless.extraPorts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
publishNotReadyAddresses: true
|
publishNotReadyAddresses: true
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
selector: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
@@ -3,56 +3,57 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if .Values.autoscaling.enabled }}
|
{{- if .Values.autoscaling.hpa.enabled }}
|
||||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
|
apiVersion: {{ include "common.capabilities.hpa.apiVersion" (dict "context" .) }}
|
||||||
kind: HorizontalPodAutoscaler
|
kind: HorizontalPodAutoscaler
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
minReplicas: {{ .Values.autoscaling.hpa.minReplicas }}
|
||||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
maxReplicas: {{ .Values.autoscaling.hpa.maxReplicas }}
|
||||||
metrics:
|
metrics:
|
||||||
{{- if .Values.autoscaling.targetCPU }}
|
{{- if .Values.autoscaling.hpa.targetCPU }}
|
||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: cpu
|
name: cpu
|
||||||
target:
|
target:
|
||||||
type: Utilization
|
type: Utilization
|
||||||
averageUtilization: {{ .Values.autoscaling.targetCPU }}
|
averageUtilization: {{ .Values.autoscaling.hpa.targetCPU }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.autoscaling.targetMemory }}
|
{{- if .Values.autoscaling.hpa.targetMemory }}
|
||||||
- type: Resource
|
- type: Resource
|
||||||
resource:
|
resource:
|
||||||
name: memory
|
name: memory
|
||||||
target:
|
target:
|
||||||
type: Utilization
|
type: Utilization
|
||||||
averageUtilization: {{ .Values.autoscaling.targetMemory }}
|
averageUtilization: {{ .Values.autoscaling.hpa.targetMemory }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.autoscaling.behavior.scaleDown.policies .Values.autoscaling.behavior.scaleUp.policies }}
|
{{- if or .Values.autoscaling.hpa.behavior.scaleDown.policies .Values.autoscaling.hpa.behavior.scaleUp.policies }}
|
||||||
behavior:
|
behavior:
|
||||||
{{- if .Values.autoscaling.behavior.scaleDown.policies }}
|
{{- if .Values.autoscaling.hpa.behavior.scaleDown.policies }}
|
||||||
scaleDown:
|
scaleDown:
|
||||||
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleDown.stabilizationWindowSeconds }}
|
stabilizationWindowSeconds: {{ .Values.autoscaling.hpa.behavior.scaleDown.stabilizationWindowSeconds }}
|
||||||
selectPolicy: {{ .Values.autoscaling.behavior.scaleDown.selectPolicy }}
|
selectPolicy: {{ .Values.autoscaling.hpa.behavior.scaleDown.selectPolicy }}
|
||||||
policies:
|
policies:
|
||||||
{{- toYaml .Values.autoscaling.behavior.scaleDown.policies | nindent 8 }}
|
{{- toYaml .Values.autoscaling.hpa.behavior.scaleDown.policies | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.autoscaling.behavior.scaleUp.policies }}
|
{{- if .Values.autoscaling.hpa.behavior.scaleUp.policies }}
|
||||||
scaleUp:
|
scaleUp:
|
||||||
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleUp.stabilizationWindowSeconds }}
|
stabilizationWindowSeconds: {{ .Values.autoscaling.hpa.behavior.scaleUp.stabilizationWindowSeconds }}
|
||||||
selectPolicy: {{ .Values.autoscaling.behavior.scaleUp.selectPolicy }}
|
selectPolicy: {{ .Values.autoscaling.hpa.behavior.scaleUp.selectPolicy }}
|
||||||
policies:
|
policies:
|
||||||
{{- toYaml .Values.autoscaling.behavior.scaleUp.policies | nindent 8 }}
|
{{- toYaml .Values.autoscaling.hpa.behavior.scaleUp.policies | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
48
charts/keycloak/templates/ingress-tls-secret.yaml
Normal file
48
charts/keycloak/templates/ingress-tls-secret.yaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{{- /*
|
||||||
|
Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
{{- if .Values.ingress.secrets }}
|
||||||
|
{{- range .Values.ingress.secrets }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .name }}
|
||||||
|
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" $.Values.commonLabels "context" $) | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if $.Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" $.Values.commonAnnotations "context" $) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
type: kubernetes.io/tls
|
||||||
|
data:
|
||||||
|
tls.crt: {{ .certificate | b64enc }}
|
||||||
|
tls.key: {{ .key | b64enc }}
|
||||||
|
---
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
|
||||||
|
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
|
||||||
|
{{- $ca := genCA "keycloak-ca" 365 }}
|
||||||
|
{{- $cert := genSignedCert (tpl .Values.ingress.hostname .) nil (list (tpl .Values.ingress.hostname .)) 365 $ca }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
type: kubernetes.io/tls
|
||||||
|
data:
|
||||||
|
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||||
|
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||||
|
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@@ -9,16 +9,17 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ include "common.names.fullname" . }}
|
name: {{ include "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.labels .Values.commonLabels ) "context" . ) }}
|
{{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.labels .Values.commonLabels) "context" .) }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" $labels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
|
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.ingress.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.ingressClassName }}
|
{{- if .Values.ingress.ingressClassName }}
|
||||||
ingressClassName: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.ingressClassName "context" $ ) | quote }}
|
ingressClassName: {{ tpl .Values.ingress.ingressClassName . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
{{- if .Values.ingress.hostname }}
|
{{- if .Values.ingress.hostname }}
|
||||||
@@ -28,9 +29,9 @@ spec:
|
|||||||
{{- if .Values.ingress.extraPaths }}
|
{{- if .Values.ingress.extraPaths }}
|
||||||
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- path: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.path "context" $) }}
|
- path: {{ tpl .Values.ingress.path . | quote }}
|
||||||
pathType: {{ .Values.ingress.pathType }}
|
pathType: {{ .Values.ingress.pathType }}
|
||||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.ingress.servicePort "context" $) | nindent 14 }}
|
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.ingress.servicePort "context" .) | nindent 14 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Values.ingress.extraHosts }}
|
{{- range .Values.ingress.extraHosts }}
|
||||||
- host: {{ (tpl .name $) }}
|
- host: {{ (tpl .name $) }}
|
||||||
@@ -41,17 +42,17 @@ spec:
|
|||||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.ingress.servicePort "context" $) | nindent 14 }}
|
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.ingress.servicePort "context" $) | nindent 14 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.extraRules }}
|
{{- if .Values.ingress.extraRules }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned .Values.ingress.secrets )) .Values.ingress.extraTls }}
|
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" (dict "annotations" .Values.ingress.annotations)) .Values.ingress.selfSigned .Values.ingress.secrets)) .Values.ingress.extraTls }}
|
||||||
tls:
|
tls:
|
||||||
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.secrets .Values.ingress.selfSigned) }}
|
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" (dict "annotations" .Values.ingress.annotations)) .Values.ingress.secrets .Values.ingress.selfSigned) }}
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ (tpl .Values.ingress.hostname .) | quote }}
|
- {{ (tpl .Values.ingress.hostname .) | quote }}
|
||||||
secretName: {{ printf "%s-tls" (tpl .Values.ingress.hostname .) }}
|
secretName: {{ printf "%s-tls" (tpl .Values.ingress.hostname .) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.extraTls }}
|
{{- if .Values.ingress.extraTls }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -9,10 +9,11 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-init-scripts" (include "common.names.fullname" .) }}
|
name: {{ printf "%s-init-scripts" (include "common.names.fullname" .) }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
data:
|
data:
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }}
|
||||||
|
@@ -3,14 +3,18 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if (include "keycloak.keycloakConfigCli.createConfigmap" .) }}
|
{{- if and .Values.keycloakConfigCli.enabled .Values.keycloakConfigCli.configuration (not .Values.keycloakConfigCli.existingConfigmap) -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
|
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak-config-cli
|
app.kubernetes.io/component: keycloak-config-cli
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if .Values.commonAnnotations }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
data:
|
data:
|
||||||
{{- range $fileName, $fileContent := .Values.keycloakConfigCli.configuration }}
|
{{- range $fileName, $fileContent := .Values.keycloakConfigCli.configuration }}
|
||||||
{{- if $fileContent }}
|
{{- if $fileContent }}
|
||||||
|
@@ -9,12 +9,12 @@ kind: Job
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-keycloak-config-cli" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
name: {{ printf "%s-keycloak-config-cli" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak-config-cli
|
app.kubernetes.io/component: keycloak-config-cli
|
||||||
{{- if or .Values.keycloakConfigCli.annotations .Values.commonAnnotations }}
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.keycloakConfigCli.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $defaultAnnotations := ternary (dict "helm.sh/hook" "post-install,post-upgrade,post-rollback" "helm.sh/hook-delete-policy" "before-hook-creation,hook-succeeded" "helm.sh/hook-weight" "5") (dict) .Values.useHelmHooks }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.keycloakConfigCli.annotations .Values.commonAnnotations $defaultAnnotations) "context" .) }}
|
||||||
{{- end }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
backoffLimit: {{ .Values.keycloakConfigCli.backoffLimit }}
|
backoffLimit: {{ .Values.keycloakConfigCli.backoffLimit }}
|
||||||
{{- if .Values.keycloakConfigCli.cleanupAfterFinished.enabled }}
|
{{- if .Values.keycloakConfigCli.cleanupAfterFinished.enabled }}
|
||||||
@@ -22,58 +22,61 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.keycloakConfigCli.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.keycloakConfigCli.podLabels .Values.commonLabels) "context" .) }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" $podLabels "context" .) | nindent 8 }}
|
||||||
app.kubernetes.io/component: keycloak-config-cli
|
app.kubernetes.io/component: keycloak-config-cli
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
annotations:
|
annotations:
|
||||||
{{- if (include "keycloak.keycloakConfigCli.createConfigmap" .) }}
|
{{- if and .Values.keycloakConfigCli.configuration (not .Values.keycloakConfigCli.existingConfigmap) }}
|
||||||
checksum/configuration: {{ include (print $.Template.BasePath "/keycloak-config-cli-configmap.yaml") . | sha256sum }}
|
checksum/configuration: {{ include (print $.Template.BasePath "/keycloak-config-cli-configmap.yaml") . | sha256sum }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.podAnnotations }}
|
{{- if .Values.keycloakConfigCli.podAnnotations }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.podAnnotations "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.podAnnotations "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
|
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
|
||||||
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
|
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
|
||||||
restartPolicy: Never
|
|
||||||
{{- if .Values.keycloakConfigCli.podSecurityContext.enabled }}
|
{{- if .Values.keycloakConfigCli.podSecurityContext.enabled }}
|
||||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.podSecurityContext "context" $) | nindent 8 }}
|
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.podSecurityContext "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
automountServiceAccountToken: {{ .Values.keycloakConfigCli.automountServiceAccountToken }}
|
automountServiceAccountToken: {{ .Values.keycloakConfigCli.automountServiceAccountToken }}
|
||||||
{{- if .Values.keycloakConfigCli.hostAliases }}
|
{{- if .Values.keycloakConfigCli.hostAliases }}
|
||||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.hostAliases "context" $) | nindent 8 }}
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.hostAliases "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.nodeSelector }}
|
{{- if .Values.keycloakConfigCli.nodeSelector }}
|
||||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.nodeSelector "context" $) | nindent 8 }}
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.nodeSelector "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.podTolerations }}
|
{{- if .Values.keycloakConfigCli.tolerations }}
|
||||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.podTolerations "context" .) | nindent 8 }}
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.tolerations "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.initContainers }}
|
{{- if .Values.keycloakConfigCli.initContainers }}
|
||||||
initContainers:
|
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.initContainers "context" .) | nindent 8 }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.initContainers "context" $) | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: keycloak-config-cli
|
- name: keycloak-config-cli
|
||||||
image: {{ template "keycloak.keycloakConfigCli.image" . }}
|
image: {{ template "keycloak.keycloakConfigCli.image" . }}
|
||||||
imagePullPolicy: {{ .Values.keycloakConfigCli.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.keycloakConfigCli.image.pullPolicy }}
|
||||||
{{- if .Values.keycloakConfigCli.command }}
|
|
||||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.command "context" $) | nindent 12 }}
|
|
||||||
{{- else }}
|
|
||||||
command:
|
command:
|
||||||
|
{{- if .Values.keycloakConfigCli.command }}
|
||||||
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.command "context" .) | nindent 12 }}
|
||||||
|
{{- else }}
|
||||||
- java
|
- java
|
||||||
|
{{- end }}
|
||||||
|
args:
|
||||||
|
{{- if .Values.keycloakConfigCli.args }}
|
||||||
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.args "context" .) | nindent 12 }}
|
||||||
|
{{- else }}
|
||||||
- -jar
|
- -jar
|
||||||
- /opt/bitnami/keycloak-config-cli/keycloak-config-cli.jar
|
- /opt/bitnami/keycloak-config-cli/keycloak-config-cli.jar
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.args }}
|
|
||||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.args "context" $) | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.keycloakConfigCli.containerSecurityContext.enabled }}
|
{{- if .Values.keycloakConfigCli.containerSecurityContext.enabled }}
|
||||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.containerSecurityContext "context" $) | nindent 12 }}
|
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.containerSecurityContext "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
|
# ref: https://github.com/adorsys/keycloak-config-cli?tab=readme-ov-file#configuration
|
||||||
- name: KEYCLOAK_URL
|
- name: KEYCLOAK_URL
|
||||||
value: {{ printf "http://%s-headless:%d%s" (include "common.names.fullname" .) (.Values.containerPorts.http | int) (.Values.httpRelativePath) }}
|
value: {{ printf "http://%s:%d%s" (include "keycloak.headless.serviceName" .) (.Values.containerPorts.http | int) (.Values.httpRelativePath) }}
|
||||||
- name: KEYCLOAK_USER
|
- name: KEYCLOAK_USER
|
||||||
value: {{ .Values.auth.adminUser | quote }}
|
value: {{ .Values.auth.adminUser | quote }}
|
||||||
- name: KEYCLOAK_PASSWORD
|
- name: KEYCLOAK_PASSWORD
|
||||||
@@ -92,17 +95,17 @@ spec:
|
|||||||
value: {{ .Values.keycloakConfigCli.availabilityCheck.timeout }}
|
value: {{ .Values.keycloakConfigCli.availabilityCheck.timeout }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.extraEnvVars }}
|
{{- if .Values.keycloakConfigCli.extraEnvVars }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVars "context" $) | nindent 12 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVars "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.keycloakConfigCli.extraEnvVarsCM .Values.keycloakConfigCli.extraEnvVarsSecret }}
|
{{- if or .Values.keycloakConfigCli.extraEnvVarsCM .Values.keycloakConfigCli.extraEnvVarsSecret }}
|
||||||
envFrom:
|
envFrom:
|
||||||
{{- if .Values.keycloakConfigCli.extraEnvVarsCM }}
|
{{- if .Values.keycloakConfigCli.extraEnvVarsCM }}
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVarsCM "context" $) }}
|
name: {{ tpl .Values.keycloakConfigCli.extraEnvVarsCM . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.extraEnvVarsSecret }}
|
{{- if .Values.keycloakConfigCli.extraEnvVarsSecret }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVarsSecret "context" $) }}
|
name: {{ tpl .Values.keycloakConfigCli.extraEnvVarsSecret . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap .Values.keycloakConfigCli.extraVolumeMounts }}
|
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap .Values.keycloakConfigCli.extraVolumeMounts }}
|
||||||
@@ -115,7 +118,7 @@ spec:
|
|||||||
mountPath: /config
|
mountPath: /config
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.extraVolumeMounts }}
|
{{- if .Values.keycloakConfigCli.extraVolumeMounts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumeMounts "context" $) | nindent 12 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumeMounts "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.resources }}
|
{{- if .Values.keycloakConfigCli.resources }}
|
||||||
@@ -124,9 +127,8 @@ spec:
|
|||||||
resources: {{- include "common.resources.preset" (dict "type" .Values.keycloakConfigCli.resourcesPreset) | nindent 12 }}
|
resources: {{- include "common.resources.preset" (dict "type" .Values.keycloakConfigCli.resourcesPreset) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.sidecars }}
|
{{- if .Values.keycloakConfigCli.sidecars }}
|
||||||
{{- include "common.tplvalues.render" ( dict "value" .Values.keycloakConfigCli.sidecars "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" ("value" .Values.keycloakConfigCli.sidecars "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap .Values.keycloakConfigCli.extraVolumes }}
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: empty-dir
|
- name: empty-dir
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
@@ -136,7 +138,6 @@ spec:
|
|||||||
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
|
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.keycloakConfigCli.extraVolumes }}
|
{{- if .Values.keycloakConfigCli.extraVolumes }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumes "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumes "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -9,33 +9,25 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-metrics" (include "common.names.fullname" .) }}
|
name: {{ printf "%s-metrics" (include "common.names.fullname" .) }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: metrics
|
app.kubernetes.io/component: metrics
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
|
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- name: metrics
|
- name: tcp-metrics
|
||||||
port: {{ .Values.metrics.service.ports.metrics }}
|
port: {{ .Values.metrics.service.ports.metrics }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.containerPorts.metrics }}
|
targetPort: management
|
||||||
- name: http
|
|
||||||
port: {{ .Values.metrics.service.ports.http }}
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: {{ .Values.containerPorts.http }}
|
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
- name: https
|
|
||||||
port: {{ .Values.metrics.service.ports.https }}
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: {{ .Values.containerPorts.https }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.metrics.service.extraPorts }}
|
{{- if .Values.metrics.service.extraPorts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
selector: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -9,16 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
podSelector:
|
podSelector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 6 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
policyTypes:
|
policyTypes:
|
||||||
- Ingress
|
- Ingress
|
||||||
- Egress
|
- Egress
|
||||||
@@ -38,7 +40,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
# Allow connection to PostgreSQL
|
# Allow connection to PostgreSQL
|
||||||
- ports:
|
- ports:
|
||||||
- port: {{ include "keycloak.databasePort" . | trimAll "\"" | int }}
|
- port: {{ include "keycloak.database.port" . | int }}
|
||||||
{{- if .Values.postgresql.enabled }}
|
{{- if .Values.postgresql.enabled }}
|
||||||
to:
|
to:
|
||||||
- podSelector:
|
- podSelector:
|
||||||
@@ -46,7 +48,7 @@ spec:
|
|||||||
app.kubernetes.io/name: postgresql
|
app.kubernetes.io/name: postgresql
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# Allow connection to other keycloak nodes
|
# Allow connection to other Keycloak nodes
|
||||||
- ports:
|
- ports:
|
||||||
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
||||||
- port: 7800
|
- port: 7800
|
||||||
@@ -56,30 +58,37 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
to:
|
to:
|
||||||
- podSelector:
|
- podSelector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.commonLabels "context" .) | nindent 14 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.networkPolicy.extraEgress }}
|
{{- if .Values.networkPolicy.extraEgress }}
|
||||||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.extraEgress "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ingress:
|
ingress:
|
||||||
- ports:
|
- ports:
|
||||||
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
|
||||||
- port: 7800
|
|
||||||
{{- if and (.Values.metrics.enabled) (not (eq (.Values.containerPorts.http | int) (.Values.containerPorts.metrics | int) )) }}
|
|
||||||
- port: {{ .Values.containerPorts.metrics }} # metrics and health
|
|
||||||
{{- end }}
|
|
||||||
- port: {{ .Values.containerPorts.http }}
|
- port: {{ .Values.containerPorts.http }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- port: {{ .Values.containerPorts.https }}
|
- port: {{ .Values.containerPorts.https }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
- port: {{ .Values.containerPorts.management }}
|
||||||
|
{{- end }}
|
||||||
|
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
||||||
|
- port: 7800
|
||||||
{{- if not .Values.networkPolicy.allowExternal }}
|
{{- if not .Values.networkPolicy.allowExternal }}
|
||||||
from:
|
from:
|
||||||
- podSelector:
|
- podSelector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.commonLabels "context" .) | nindent 14 }}
|
||||||
|
{{- if .Values.networkPolicy.addExternalClientAccess }}
|
||||||
- podSelector:
|
- podSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{ template "common.names.fullname" . }}-client: "true"
|
{{ template "common.names.fullname" . }}-client: "true"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.ingressPodMatchLabels }}
|
||||||
|
- podSelector:
|
||||||
|
matchLabels: {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressPodMatchLabels "context" .) | nindent 14 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.networkPolicy.ingressNSMatchLabels }}
|
{{- if .Values.networkPolicy.ingressNSMatchLabels }}
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -95,8 +104,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $extraIngress := coalesce .Values.networkPolicy.additionalRules .Values.networkPolicy.extraIngress }}
|
{{- if .Values.networkPolicy.extraIngress }}
|
||||||
{{- if $extraIngress }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.extraIngress "context" .) | nindent 4 }}
|
||||||
{{- include "common.tplvalues.render" ( dict "value" $extraIngress "context" $ ) | nindent 4 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -9,20 +9,22 @@ kind: PodDisruptionBudget
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.pdb.minAvailable }}
|
{{- if .Values.pdb.minAvailable }}
|
||||||
minAvailable: {{ .Values.pdb.minAvailable }}
|
minAvailable: {{ .Values.pdb.minAvailable }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.pdb.maxUnavailable ( not .Values.pdb.minAvailable ) }}
|
{{- if or .Values.pdb.maxUnavailable (not .Values.pdb.minAvailable) }}
|
||||||
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
|
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 6 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -3,17 +3,18 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.groups}}
|
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.groups }}
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PrometheusRule
|
kind: PrometheusRule
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace }}
|
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace }}
|
||||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.prometheusRule.labels .Values.commonLabels ) "context" . ) }}
|
{{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.prometheusRule.labels .Values.commonLabels) "context" .) }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" $labels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
groups: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.groups "context" .) | nindent 4 }}
|
groups: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.groups "context" .) | nindent 4 }}
|
||||||
|
@@ -3,17 +3,19 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) (not .Values.postgresql.existingSecret) }}
|
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-externaldb" (include "common.names.fullname" .) }}
|
{{- $secretName := printf "%s-externaldb" (include "common.names.fullname" .) }}
|
||||||
|
name: {{ $secretName }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.externalDatabase.annotations .Values.commonAnnotations }}
|
{{- if or .Values.externalDatabase.annotations .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.externalDatabase.annotations .Values.commonAnnotations) "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.externalDatabase.annotations .Values.commonAnnotations) "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
db-password: {{ include "common.secrets.passwords.manage" (dict "secret" (printf "%s-externaldb" (include "common.names.fullname" .)) "key" "db-password" "length" 10 "providedValues" (list "externalDatabase.password") "context" $) }}
|
db-password: {{ include "common.secrets.passwords.manage" (dict "secret" $secretName "key" "db-password" "length" 10 "providedValues" (list "externalDatabase.password") "context" .) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -7,14 +7,15 @@ SPDX-License-Identifier: APACHE-2.0
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
name: {{ include "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.auth.annotations .Values.commonAnnotations }}
|
{{- if or .Values.auth.annotations .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.auth.annotations .Values.commonAnnotations) "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.auth.annotations .Values.commonAnnotations) "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") "key" "admin-password" "length" 10 "providedValues" (list "auth.adminPassword") "context" $) }}
|
admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "admin-password" "length" 10 "providedValues" (list "auth.adminPassword") "context" .) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -8,11 +8,12 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.service.annotations .Values.commonAnnotations }}
|
{{- if or .Values.service.annotations .Values.commonAnnotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.service.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
type: {{ .Values.service.type }}
|
type: {{ .Values.service.type }}
|
||||||
@@ -32,15 +33,15 @@ spec:
|
|||||||
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.sessionAffinityConfig }}
|
{{- if .Values.service.sessionAffinityConfig }}
|
||||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
{{- if .Values.service.http.enabled }}
|
{{- if .Values.service.http.enabled }}
|
||||||
- name: http
|
- name: http
|
||||||
port: {{ coalesce .Values.service.ports.http .Values.service.port }}
|
port: {{ .Values.service.ports.http }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: http
|
targetPort: http
|
||||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http))) }}
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
|
||||||
nodePort: {{ .Values.service.nodePorts.http }}
|
nodePort: {{ .Values.service.nodePorts.http }}
|
||||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||||
nodePort: null
|
nodePort: null
|
||||||
@@ -48,18 +49,19 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: https
|
- name: https
|
||||||
port: {{ coalesce .Values.service.ports.https .Values.service.httpsPort }}
|
port: {{ .Values.service.ports.https}}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: https
|
targetPort: https
|
||||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https))) }}
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https)) }}
|
||||||
nodePort: {{ .Values.service.nodePorts.https }}
|
nodePort: {{ .Values.service.nodePorts.https }}
|
||||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||||
nodePort: null
|
nodePort: null
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.service.extraPorts }}
|
{{- if .Values.service.extraPorts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
selector: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
@@ -9,14 +9,15 @@ kind: ServiceAccount
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "keycloak.serviceAccountName" . }}
|
name: {{ template "keycloak.serviceAccountName" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.serviceAccount.extraLabels }}
|
{{- if .Values.serviceAccount.extraLabels }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.extraLabels "context" $) | nindent 4 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.extraLabels "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
|
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
|
||||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.serviceAccount.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -9,50 +9,50 @@ kind: ServiceMonitor
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }}
|
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }}
|
||||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
|
{{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.labels .Values.commonLabels) "context" .) }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" $labels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
app.kubernetes.io/part-of: keycloak
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
{{- if or .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
|
||||||
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.metrics.serviceMonitor.jobLabel }}
|
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
|
||||||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
|
|
||||||
{{- end }}
|
|
||||||
endpoints:
|
endpoints:
|
||||||
{{- $defaultEndpoint := pick .Values.metrics.serviceMonitor "port" "scheme" "tlsConfig" "interval" "scrapeTimeout" "relabelings" "metricRelabelings" "honorLabels" }}
|
- port: tcp-metrics
|
||||||
{{- $endpoints := ternary (.Values.metrics.serviceMonitor.endpoints) (list (dict "path" .Values.metrics.serviceMonitor.path)) (empty .Values.metrics.serviceMonitor.path) }}
|
path: "/metrics"
|
||||||
{{- range $endpoints }}
|
{{- if .Values.tls.enabled }}
|
||||||
{{- $endpoint := merge . $defaultEndpoint }}
|
scheme: https
|
||||||
- port: {{ $endpoint.port | quote }}
|
{{- if .Values.metrics.serviceMonitor.tlsConfig }}
|
||||||
scheme: {{ $endpoint.scheme | quote }}
|
tlsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.tlsConfig "context" .) | nindent 8 }}
|
||||||
{{- if $endpoint.tlsConfig }}
|
{{- else if .Values.tls.autoGenerated.enabled }}
|
||||||
tlsConfig: {{- include "common.tplvalues.render" ( dict "value" $endpoint.tlsConfig "context" $) | nindent 8 }}
|
tlsConfig:
|
||||||
|
insecureSkipVerify: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
path: {{ include "common.tplvalues.render" ( dict "value" $endpoint.path "context" $) }}
|
|
||||||
{{- if $endpoint.interval }}
|
|
||||||
interval: {{ $endpoint.interval }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $endpoint.scrapeTimeout }}
|
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||||
scrapeTimeout: {{ $endpoint.scrapeTimeout }}
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $endpoint.relabelings }}
|
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" $endpoint.relabelings "context" $) | nindent 6 }}
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $endpoint.metricRelabelings }}
|
{{- if .Values.metrics.serviceMonitor.honorLabels }}
|
||||||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" $endpoint.metricRelabelings "context" $) | nindent 6 }}
|
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $endpoint.honorLabels }}
|
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||||
honorLabels: {{ $endpoint.honorLabels }}
|
metricRelabelings: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" .) | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||||
|
relabelings: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.relabelings "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
namespaceSelector:
|
namespaceSelector:
|
||||||
matchNames:
|
matchNames:
|
||||||
- {{ include "common.names.namespace" . | quote }}
|
- {{ include "common.names.namespace" . | quote }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.commonLabels "context" .) | nindent 6 }}
|
||||||
{{- if .Values.metrics.serviceMonitor.selector }}
|
{{- if .Values.metrics.serviceMonitor.selector }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" .) | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
app.kubernetes.io/component: metrics
|
app.kubernetes.io/component: metrics
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -8,27 +8,28 @@ kind: StatefulSet
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ template "common.names.fullname" . }}
|
name: {{ template "common.names.fullname" . }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if or .Values.statefulsetAnnotations .Values.commonAnnotations }}
|
{{- if or .Values.statefulsetAnnotations .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.statefulsetAnnotations .Values.commonAnnotations ) "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.statefulsetAnnotations .Values.commonAnnotations) "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if not .Values.autoscaling.enabled }}
|
{{- if not .Values.autoscaling.hpa.enabled }}
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimitCount }}
|
revisionHistoryLimit: {{ .Values.revisionHistoryLimitCount }}
|
||||||
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||||
serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||||
updateStrategy:
|
updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" .) | nindent 4 }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }}
|
|
||||||
{{- if .Values.minReadySeconds }}
|
{{- if .Values.minReadySeconds }}
|
||||||
minReadySeconds: {{ .Values.minReadySeconds }}
|
minReadySeconds: {{ .Values.minReadySeconds }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
|
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.podLabels .Values.commonLabels) "context" .) }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" $podLabels "context" .) | nindent 6 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
@@ -36,32 +37,32 @@ spec:
|
|||||||
{{- if not .Values.auth.existingSecret }}
|
{{- if not .Values.auth.existingSecret }}
|
||||||
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if (include "keycloak.createConfigmap" .) }}
|
{{- if and .Values.configuration (not .Values.existingConfigmap) }}
|
||||||
checksum/configuration: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
checksum/configuration: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.podAnnotations }}
|
{{- if .Values.podAnnotations }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" $podLabels "context" .) | nindent 8 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
app.kubernetes.io/app-version: {{ .Chart.AppVersion }}
|
app.kubernetes.io/part-of: keycloak
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
|
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
|
||||||
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
|
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
|
||||||
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
|
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
|
||||||
{{- if .Values.hostAliases }}
|
{{- if .Values.hostAliases }}
|
||||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.affinity }}
|
{{- if .Values.affinity }}
|
||||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
|
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" .) | nindent 8 }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
affinity:
|
affinity:
|
||||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }}
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "keycloak" "customLabels" $podLabels "context" .) | nindent 10 }}
|
||||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }}
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "keycloak" "customLabels" $podLabels "context" .) | nindent 10 }}
|
||||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.nodeSelector }}
|
{{- if .Values.nodeSelector }}
|
||||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.tolerations }}
|
{{- if .Values.tolerations }}
|
||||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
|
||||||
@@ -76,7 +77,7 @@ spec:
|
|||||||
schedulerName: {{ .Values.schedulerName }}
|
schedulerName: {{ .Values.schedulerName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.podSecurityContext.enabled }}
|
{{- if .Values.podSecurityContext.enabled }}
|
||||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.podSecurityContext "context" $) | nindent 8 }}
|
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.podSecurityContext "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.dnsPolicy }}
|
{{- if .Values.dnsPolicy }}
|
||||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||||
@@ -88,41 +89,13 @@ spec:
|
|||||||
{{- if .Values.terminationGracePeriodSeconds }}
|
{{- if .Values.terminationGracePeriodSeconds }}
|
||||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.enableDefaultInitContainers .Values.initContainers }}
|
{{- if or .Values.defaultInitContainers.prepareWriteDirs.enabled .Values.initContainers }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{- if .Values.enableDefaultInitContainers }}
|
{{- if .Values.defaultInitContainers.prepareWriteDirs.enabled }}
|
||||||
- name: prepare-write-dirs
|
{{- include "keycloak.defaultInitContainers.prepareWriteDirs" . | nindent 8 }}
|
||||||
image: {{ template "keycloak.image" . }}
|
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
args:
|
|
||||||
- -ec
|
|
||||||
- |
|
|
||||||
. /opt/bitnami/scripts/liblog.sh
|
|
||||||
|
|
||||||
info "Copying writable dirs to empty dir"
|
|
||||||
# In order to not break the application functionality we need to make some
|
|
||||||
# directories writable, so we need to copy it to an empty dir volume
|
|
||||||
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/lib/quarkus /emptydir/app-quarkus-dir
|
|
||||||
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/data /emptydir/app-data-dir
|
|
||||||
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/providers /emptydir/app-providers-dir
|
|
||||||
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/themes /emptydir/app-themes-dir
|
|
||||||
info "Copy operation completed"
|
|
||||||
{{- if .Values.containerSecurityContext.enabled }}
|
|
||||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.resources }}
|
|
||||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
|
||||||
{{- else if ne .Values.resourcesPreset "none" }}
|
|
||||||
resources: {{- include "common.resources.preset" (dict "type" .Values.resourcesPreset) | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: empty-dir
|
|
||||||
mountPath: /emptydir
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.initContainers }}
|
{{- if .Values.initContainers }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
@@ -130,20 +103,20 @@ spec:
|
|||||||
image: {{ template "keycloak.image" . }}
|
image: {{ template "keycloak.image" . }}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
{{- if .Values.lifecycleHooks }}
|
{{- if .Values.lifecycleHooks }}
|
||||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.containerSecurityContext.enabled }}
|
{{- if .Values.containerSecurityContext.enabled }}
|
||||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
|
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.diagnosticMode.enabled }}
|
{{- if .Values.diagnosticMode.enabled }}
|
||||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" .) | nindent 12 }}
|
||||||
{{- else if .Values.command }}
|
{{- else if .Values.command }}
|
||||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.diagnosticMode.enabled }}
|
{{- if .Values.diagnosticMode.enabled }}
|
||||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" .) | nindent 12 }}
|
||||||
{{- else if .Values.args }}
|
{{- else if .Values.args }}
|
||||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: KUBERNETES_NAMESPACE
|
- name: KUBERNETES_NAMESPACE
|
||||||
@@ -151,125 +124,52 @@ spec:
|
|||||||
fieldRef:
|
fieldRef:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
- name: BITNAMI_DEBUG
|
{{- if not .Values.usePasswordFiles }}
|
||||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
|
||||||
{{- if .Values.usePasswordFiles }}
|
|
||||||
- name: KC_BOOTSTRAP_ADMIN_PASSWORD_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/%s" (include "keycloak.secretKey" .) }}
|
|
||||||
- name: KEYCLOAK_DATABASE_PASSWORD_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretPasswordKey" .) }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretHostKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_HOST_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretHostKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretPortKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_PORT_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretPortKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_USER_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretUserKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_NAME_FILE
|
|
||||||
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretDatabaseKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.passwordsSecret) }}
|
|
||||||
- name: KEYCLOAK_HTTPS_KEY_STORE_PASSWORD_FILE
|
|
||||||
value: "/opt/bitnami/keycloak/secrets/tls-keystore-password"
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.tls.enabled (or .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
|
|
||||||
- name: KEYCLOAK_HTTPS_TRUST_STORE_PASSWORD_FILE
|
|
||||||
value: "/opt/bitnami/keycloak/secrets/tls-truststore-password"
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
|
|
||||||
- name: KEYCLOAK_SPI_TRUSTSTORE_PASSWORD_FILE
|
|
||||||
value: "/opt/bitnami/keycloak/secrets/spi-truststore-password"
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
|
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "keycloak.secretName" . }}
|
name: {{ include "keycloak.secretName" . }}
|
||||||
key: {{ include "keycloak.secretKey" . }}
|
key: {{ include "keycloak.secretKey" . }}
|
||||||
- name: KEYCLOAK_DATABASE_PASSWORD
|
- name: KC_DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
name: {{ include "keycloak.database.secretName" . }}
|
||||||
key: {{ include "keycloak.databaseSecretPasswordKey" . }}
|
key: {{ include "keycloak.database.secretPasswordKey" . }}
|
||||||
{{- if .Values.externalDatabase.existingSecretHostKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
|
||||||
key: {{ include "keycloak.databaseSecretHostKey" . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretPortKey }}
|
|
||||||
- name: KEYCLOAK_DATABASE_PORT
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
|
||||||
key: {{ include "keycloak.databaseSecretPortKey" . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
||||||
- name: KEYCLOAK_DATABASE_USER
|
- name: KC_DB_USERNAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
name: {{ include "keycloak.database.secretName" . }}
|
||||||
key: {{ include "keycloak.databaseSecretUserKey" . }}
|
key: {{ include "keycloak.database.secretUserKey" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
|
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated.enabled) (or .Values.tls.keystorePassword .Values.tls.passwordsSecret) }}
|
||||||
- name: KEYCLOAK_DATABASE_NAME
|
- name: KC_HTTPS_KEY_STORE_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
name: {{ include "keycloak.tls.passwordsSecretName" . }}
|
||||||
key: {{ include "keycloak.databaseSecretDatabaseKey" . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.passwordsSecret) }}
|
|
||||||
- name: KEYCLOAK_HTTPS_KEY_STORE_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
|
|
||||||
key: "tls-keystore-password"
|
key: "tls-keystore-password"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.tls.enabled (or .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
|
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated.enabled) (or .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
|
||||||
- name: KEYCLOAK_HTTPS_TRUST_STORE_PASSWORD
|
- name: KC_HTTPS_TRUST_STORE_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
|
name: {{ include "keycloak.tls.passwordsSecretName" . }}
|
||||||
key: "tls-truststore-password"
|
key: "tls-truststore-password"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
|
{{- end }}
|
||||||
- name: KEYCLOAK_SPI_TRUSTSTORE_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ include "keycloak.spiPasswordsSecretName" . }}
|
|
||||||
key: "spi-truststore-password"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
- name: KEYCLOAK_HTTP_RELATIVE_PATH
|
|
||||||
value: {{ .Values.httpRelativePath | quote }}
|
|
||||||
{{- if .Values.extraStartupArgs }}
|
|
||||||
- name: KEYCLOAK_EXTRA_ARGS
|
|
||||||
value: {{ .Values.extraStartupArgs | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.adminRealm }}
|
|
||||||
- name: KC_SPI_ADMIN_REALM
|
|
||||||
value: "{{ .Values.adminRealm }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.extraEnvVars }}
|
{{- if .Values.extraEnvVars }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
|
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
|
||||||
{{- if .Values.extraEnvVarsCM }}
|
{{- if .Values.extraEnvVarsCM }}
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
|
name: {{ tpl .Values.extraEnvVarsCM . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraEnvVarsSecret }}
|
{{- if .Values.extraEnvVarsSecret }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
name: {{ tpl .Values.extraEnvVarsSecret . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.resources }}
|
{{- if .Values.resources }}
|
||||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||||
@@ -285,40 +185,42 @@ spec:
|
|||||||
containerPort: {{ .Values.containerPorts.https }}
|
containerPort: {{ .Values.containerPorts.https }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and (.Values.metrics.enabled) (not (eq (.Values.containerPorts.http | int) (.Values.containerPorts.metrics | int) )) }}
|
{{- if .Values.metrics.enabled }}
|
||||||
- name: metrics
|
- name: management
|
||||||
containerPort: {{ .Values.containerPorts.metrics }}
|
containerPort: {{ .Values.containerPorts.management }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
|
||||||
- name: discovery
|
- name: discovery
|
||||||
containerPort: 7800
|
containerPort: 7800
|
||||||
{{- if .Values.extraContainerPorts }}
|
{{- if .Values.extraContainerPorts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Values.diagnosticMode.enabled }}
|
{{- if not .Values.diagnosticMode.enabled }}
|
||||||
{{- if .Values.customStartupProbe }}
|
{{- if .Values.customStartupProbe }}
|
||||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" .) | nindent 12 }}
|
||||||
{{- else if .Values.startupProbe.enabled }}
|
{{- else if .Values.startupProbe.enabled }}
|
||||||
startupProbe: {{- omit .Values.startupProbe "enabled" | toYaml | nindent 12 }}
|
startupProbe: {{- omit .Values.startupProbe "enabled" | toYaml | nindent 12 }}
|
||||||
httpGet:
|
httpGet:
|
||||||
path: {{ .Values.httpRelativePath }}
|
path: {{ .Values.httpRelativePath }}
|
||||||
port: http
|
port: {{ ternary "http" "https" (or .Values.httpEnabled (not .Values.tls.enabled)) }}
|
||||||
|
scheme: {{ ternary "HTTP" "HTTPS" (or .Values.httpEnabled (not .Values.tls.enabled)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.customLivenessProbe }}
|
{{- if .Values.customLivenessProbe }}
|
||||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" .) | nindent 12 }}
|
||||||
{{- else if .Values.livenessProbe.enabled }}
|
{{- else if .Values.livenessProbe.enabled }}
|
||||||
livenessProbe: {{- omit .Values.livenessProbe "enabled" | toYaml | nindent 12 }}
|
livenessProbe: {{- omit .Values.livenessProbe "enabled" | toYaml | nindent 12 }}
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: http
|
port: {{ ternary "http" "https" (or .Values.httpEnabled (not .Values.tls.enabled)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.customReadinessProbe }}
|
{{- if .Values.customReadinessProbe }}
|
||||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" .) | nindent 12 }}
|
||||||
{{- else if .Values.readinessProbe.enabled }}
|
{{- else if .Values.readinessProbe.enabled }}
|
||||||
readinessProbe: {{- omit .Values.readinessProbe "enabled" | toYaml | nindent 12 }}
|
readinessProbe: {{- omit .Values.readinessProbe "enabled" | toYaml | nindent 12 }}
|
||||||
httpGet:
|
httpGet:
|
||||||
path: {{ .Values.httpRelativePath }}realms/{{ .Values.adminRealm | default "master" }}
|
path: {{ .Values.httpRelativePath }}realms/{{ .Values.adminRealm | default "master" }}
|
||||||
port: http
|
port: {{ ternary "http" "https" (or .Values.httpEnabled (not .Values.tls.enabled)) }}
|
||||||
|
scheme: {{ ternary "HTTP" "HTTPS" (or .Values.httpEnabled (not .Values.tls.enabled)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@@ -357,14 +259,9 @@ spec:
|
|||||||
mountPath: /opt/bitnami/keycloak/certs
|
mountPath: /opt/bitnami/keycloak/certs
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.customCaExistingSecret }}
|
{{- if .Values.trustedCertsExistingSecret }}
|
||||||
- name: custom-ca
|
- name: truststore
|
||||||
mountPath: /opt/bitnami/keycloak/custom-ca
|
mountPath: /opt/bitnami/keycloak/truststore
|
||||||
readOnly: true
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.spi.existingSecret }}
|
|
||||||
- name: spi-certificates
|
|
||||||
mountPath: /opt/bitnami/keycloak/spi-certs
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
||||||
@@ -372,10 +269,10 @@ spec:
|
|||||||
mountPath: /docker-entrypoint-initdb.d
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" .) | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.sidecars }}
|
{{- if .Values.sidecars }}
|
||||||
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: empty-dir
|
- name: empty-dir
|
||||||
@@ -387,33 +284,17 @@ spec:
|
|||||||
- secret:
|
- secret:
|
||||||
name: {{ include "keycloak.secretName" . }}
|
name: {{ include "keycloak.secretName" . }}
|
||||||
- secret:
|
- secret:
|
||||||
name: {{ include "keycloak.databaseSecretName" . }}
|
name: {{ include "keycloak.database.secretName" . }}
|
||||||
items:
|
items:
|
||||||
- key: {{ include "keycloak.databaseSecretPasswordKey" . }}
|
- key: {{ include "keycloak.database.secretPasswordKey" . }}
|
||||||
path: {{ printf "db-%s" (include "keycloak.databaseSecretPasswordKey" .) }}
|
path: {{ printf "db-%s" (include "keycloak.database.secretPasswordKey" .) }}
|
||||||
{{- if .Values.externalDatabase.existingSecretHostKey }}
|
|
||||||
- key: {{ include "keycloak.databaseSecretHostKey" . }}
|
|
||||||
path: {{ printf "db-%s" (include "keycloak.databaseSecretHostKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretPortKey }}
|
|
||||||
- key: {{ include "keycloak.databaseSecretPortKey" . }}
|
|
||||||
path: {{ printf "db-%s" (include "keycloak.databaseSecretPortKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
{{- if .Values.externalDatabase.existingSecretUserKey }}
|
||||||
- key: {{ include "keycloak.databaseSecretUserKey" . }}
|
- key: {{ include "keycloak.database.secretUserKey" . }}
|
||||||
path: {{ printf "db-%s" (include "keycloak.databaseSecretUserKey" .) }}
|
path: {{ printf "db-%s" (include "keycloak.database.secretUserKey" .) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
|
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated.enabled) (or .Values.tls.keystorePassword .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
|
||||||
- key: {{ include "keycloak.databaseSecretDatabaseKey" . }}
|
|
||||||
path: {{ printf "db-%s" (include "keycloak.databaseSecretDatabaseKey" .) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
|
|
||||||
- secret:
|
- secret:
|
||||||
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
|
name: {{ include "keycloak.tls.passwordsSecretName" . }}
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
|
|
||||||
- secret:
|
|
||||||
name: {{ include "keycloak.spiPasswordsSecretName" . }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.configuration .Values.existingConfigmap }}
|
{{- if or .Values.configuration .Values.existingConfigmap }}
|
||||||
@@ -424,26 +305,20 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: certificates
|
- name: certificates
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ include "keycloak.tlsSecretName" . }}
|
secretName: {{ include "keycloak.tls.secretName" . }}
|
||||||
defaultMode: 420
|
defaultMode: 420
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.customCaExistingSecret }}
|
{{- if .Values.trustedCertsExistingSecret }}
|
||||||
- name: custom-ca
|
- name: truststore
|
||||||
secret:
|
secret:
|
||||||
secretName: {{ .Values.customCaExistingSecret }}
|
secretName: {{ tpl .Values.trustedCertsExistingSecret . }}
|
||||||
defaultMode: 420
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.spi.existingSecret }}
|
|
||||||
- name: spi-certificates
|
|
||||||
secret:
|
|
||||||
secretName: {{ .Values.spi.existingSecret }}
|
|
||||||
defaultMode: 420
|
defaultMode: 420
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
|
||||||
- name: custom-init-scripts
|
- name: custom-init-scripts
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "keycloak.initdbScriptsCM" . }}
|
name: {{ include "keycloak.initdbScripts.configmapName" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.extraVolumes }}
|
{{- if .Values.extraVolumes }}
|
||||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" .) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -3,16 +3,17 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if and (or .Values.tls.keystorePassword .Values.tls.truststorePassword) (not .Values.tls.passwordsSecret) }}
|
{{- if and (not .Values.tls.usePemCerts) (.Values.tls.autoGenerated.enabled) (not .Values.tls.passwordsSecret) (or .Values.tls.keystorePassword .Values.tls.truststorePassword) }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
name: {{ printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: keycloak
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
@@ -22,22 +23,4 @@ data:
|
|||||||
{{- if .Values.tls.truststorePassword }}
|
{{- if .Values.tls.truststorePassword }}
|
||||||
tls-truststore-password: {{ .Values.tls.truststorePassword | b64enc | quote }}
|
tls-truststore-password: {{ .Values.tls.truststorePassword | b64enc | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.spi.truststorePassword (not .Values.spi.passwordsSecret) }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ printf "%s-spi-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
||||||
app.kubernetes.io/component: keycloak
|
|
||||||
{{- if .Values.commonAnnotations }}
|
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
{{- if .Values.spi.truststorePassword }}
|
|
||||||
spi-truststore-password: {{ .Values.spi.truststorePassword | b64enc | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -3,69 +3,28 @@ Copyright Broadcom, Inc. All Rights Reserved.
|
|||||||
SPDX-License-Identifier: APACHE-2.0
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if .Values.ingress.enabled }}
|
{{- if and .Values.tls.enabled .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "helm") -}}
|
||||||
{{- if .Values.ingress.secrets }}
|
|
||||||
{{- range .Values.ingress.secrets }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ include "common.tplvalues.render" ( dict "value" .name "context" $ ) }}
|
|
||||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
|
||||||
{{- if $.Values.commonAnnotations }}
|
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
type: kubernetes.io/tls
|
|
||||||
data:
|
|
||||||
tls.crt: {{ include "common.tplvalues.render" ( dict "value" .certificate "context" $ ) | b64enc }}
|
|
||||||
tls.key: {{ include "common.tplvalues.render" ( dict "value" .key "context" $ ) | b64enc }}
|
|
||||||
---
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
|
|
||||||
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
|
|
||||||
{{- $ca := genCA "keycloak-ca" 365 }}
|
|
||||||
{{- $cert := genSignedCert (tpl .Values.ingress.hostname .) nil (list (tpl .Values.ingress.hostname .)) 365 $ca }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ $secretName }}
|
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
||||||
{{- if .Values.commonAnnotations }}
|
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
type: kubernetes.io/tls
|
|
||||||
data:
|
|
||||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
|
||||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
|
||||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if (include "keycloak.createTlsSecret" $) }}
|
|
||||||
{{- $secretName := printf "%s-crt" (include "common.names.fullname" .) }}
|
|
||||||
{{- $ca := genCA "keycloak-ca" 365 }}
|
{{- $ca := genCA "keycloak-ca" 365 }}
|
||||||
{{- $releaseNamespace := include "common.names.namespace" . }}
|
{{- $releaseNamespace := include "common.names.namespace" . }}
|
||||||
{{- $clusterDomain := .Values.clusterDomain }}
|
{{- $clusterDomain := .Values.clusterDomain }}
|
||||||
---
|
{{- $headlessServiceName := include "keycloak.headless.serviceName" . }}
|
||||||
|
{{- $serviceName := include "common.names.fullname" . }}
|
||||||
|
{{- $altNames := list (printf "*.%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) $headlessServiceName (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) $serviceName "127.0.0.1" "localhost" }}
|
||||||
|
{{- $cert := genSignedCert $serviceName nil $altNames 365 $ca }}
|
||||||
|
{{- $secretName := include "keycloak.tls.secretName" . }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $secretName }}
|
name: {{ $secretName }}
|
||||||
namespace: {{ include "common.names.namespace" . | quote }}
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
app.kubernetes.io/component: keycloak
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
{{- if .Values.commonAnnotations }}
|
{{- if .Values.commonAnnotations }}
|
||||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
type: Opaque
|
type: kubernetes.io/tls
|
||||||
data:
|
data:
|
||||||
{{- $replicaCount := int .Values.replicaCount }}
|
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" .) }}
|
||||||
{{- $svcName := include "common.names.fullname" . }}
|
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" .) }}
|
||||||
{{- $altNames := list (printf "%s.%s.svc.%s" $svcName $releaseNamespace $clusterDomain) (printf "%s.%s" $svcName $releaseNamespace) $svcName }}
|
|
||||||
{{- $cert := genSignedCert $svcName nil $altNames 365 $ca }}
|
|
||||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
|
||||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
|
||||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
45
charts/keycloak/templates/vpa.yaml
Normal file
45
charts/keycloak/templates/vpa.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{{- /*
|
||||||
|
Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
SPDX-License-Identifier: APACHE-2.0
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if and (include "common.capabilities.apiVersions.has" (dict "version" "autoscaling.k8s.io/v1/VerticalPodAutoscaler" "context" .)) .Values.autoscaling.vpa.enabled }}
|
||||||
|
apiVersion: autoscaling.k8s.io/v1
|
||||||
|
kind: VerticalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
namespace: {{ include "common.names.namespace" . | quote }}
|
||||||
|
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: keycloak
|
||||||
|
app.kubernetes.io/part-of: keycloak
|
||||||
|
{{- if or .Values.autoscaling.vpa.annotations .Values.commonAnnotations }}
|
||||||
|
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.autoscaling.vpa.annotations .Values.commonAnnotations) "context" .) }}
|
||||||
|
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
resourcePolicy:
|
||||||
|
containerPolicies:
|
||||||
|
- containerName: keycloak
|
||||||
|
{{- with .Values.autoscaling.vpa.controlledResources }}
|
||||||
|
controlledResources:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.autoscaling.vpa.maxAllowed }}
|
||||||
|
maxAllowed:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.autoscaling.vpa.minAllowed }}
|
||||||
|
minAllowed:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||||
|
kind: StatefulSet
|
||||||
|
name: {{ template "common.names.fullname" . }}
|
||||||
|
{{- if .Values.autoscaling.vpa.updatePolicy }}
|
||||||
|
updatePolicy:
|
||||||
|
{{- with .Values.autoscaling.vpa.updatePolicy.updateMode }}
|
||||||
|
updateMode: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user