-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade keycloak version to upstream chart version 18.7.0
- Loading branch information
Showing
5 changed files
with
84 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contribute to Keycloak Devpro Helm chart | ||
|
||
## How to update the chart | ||
|
||
```bash | ||
# adds helm chart repository | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
|
||
# searches for the latest version | ||
helm search repo -l keycloak | ||
|
||
# manual: update version number in Chart.yaml | ||
|
||
# updates Chart.lock | ||
helm dependency update | ||
``` | ||
|
||
## How to deploy from the sources | ||
|
||
```bash | ||
# gets ingress controller public IP | ||
NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` | ||
|
||
# checks the Kubernetes objects generated from the chart | ||
helm template keycloak . -f values.yaml \ | ||
--namespace keycloak > temp.yaml | ||
|
||
# applies the manifest (add "--debug > output.yaml" in case of issue) | ||
helm upgrade --install keycloak . -f values.yaml --create-namespace \ | ||
--set keycloak.auth.adminPassword=Admin1234 \ | ||
--set keycloak.ingress.hostname=keycloak.${NGINX_PUBLIC_IP}.sslip.io \ | ||
--set keycloak.ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ | ||
--set keycloak.global.storageClass=default \ | ||
--set keycloak.extraStartupArgs="-Dkeycloak.frontendUrl=keycloak.${NGINX_PUBLIC_IP}.sslip.io --proxy edge" | ||
--namespace keycloak | ||
|
||
# waits for the application to be running | ||
kubectl wait pods -n keycloak -l app.kubernetes.io/instance=keycloak --for condition=Ready | ||
|
||
# checks everything is ok | ||
kubectl get svc,deploy,pod,ingress,pv,certificate -n keycloak | ||
|
||
# manual: open https://keycloak.${NGINX_PUBLIC_IP}.sslip.io/ (and login with user/Admin1234) | ||
|
||
# if needed, deletes the chart | ||
helm uninstall keycloak -n keycloak | ||
kubectl delete ns keycloak | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: keycloak | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 9.2.10 | ||
digest: sha256:4fa06ef6bf8691a261fc85ad3175f06ce1c4620aad05a67ec15ae01cd7648636 | ||
generated: "2022-12-26T22:37:56.080641402+01:00" | ||
version: 18.7.0 | ||
digest: sha256:5316590066b03500b1c7af114f631c56bcf27c8c44e39e6decf6812b28f4fa82 | ||
generated: "2024-04-23T18:04:09.32086579+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,44 @@ | ||
# Keycloack | ||
# Helm chart for Keycloak | ||
|
||
This Helm chart will install [Keycloack](https://www.keycloak.org/) ([docs](https://www.keycloak.org/documentation), [code](https://github.com/keycloak/keycloak)) | ||
and is based from the [Bitnami Helm chart](https://bitnami.com/stack/keycloak/helm) ([code](https://github.com/bitnami/charts/tree/main/bitnami/keycloak)). | ||
This Helm chart will install [Keycloack](https://www.keycloak.org/) ([docs](https://www.keycloak.org/documentation), [code](https://github.com/keycloak/keycloak)) in a Kubernetes cluster. | ||
It is based on [Bitnami Helm chart](https://bitnami.com/stack/keycloak/helm) ([code](https://github.com/bitnami/charts/tree/main/bitnami/keycloak)). | ||
|
||
## How to update the chart | ||
## Quick start | ||
|
||
- Add Devpro Helm repository (if this is the first the repo is used) | ||
|
||
```bash | ||
# adds helm chart repository | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add devpro https://devpro.github.io/helm-charts | ||
helm repo update | ||
|
||
# searches for the latest version | ||
helm search repo -l keycloak | ||
|
||
# manual: update version number in Chart.yaml | ||
|
||
# updates Chart.lock | ||
helm dependency update | ||
``` | ||
|
||
## How to deploy manually | ||
- Review the default configuration from [values.yaml](values.yaml) | ||
|
||
```bash | ||
# gets ingress controller public IP | ||
NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` | ||
- Install or update the chart | ||
|
||
# checks the Kubernetes objects generated from the chart | ||
helm template keycloak . -f values.yaml \ | ||
--namespace authentication > temp.yaml | ||
|
||
# applies the manifest (add "--debug > output.yaml" in case of issue) | ||
helm upgrade --install keycloak . -f values.yaml --create-namespace \ | ||
--set keycloak.ingress.hostname=keycloak.${NGINX_PUBLIC_IP}.sslip.io \ | ||
--set keycloak.extraEnvVars[1].value="https://keycloak.${NGINX_PUBLIC_IP}.sslip.io/auth/" \ | ||
--namespace authentication | ||
```bash | ||
helm upgrade --install keycloak devpro/keycloak --namespace keycloak | ||
``` | ||
|
||
# checks everything is ok | ||
kubectl get svc,deploy,pod,ingress,pv,certificate -n authentication | ||
- [Get started with Keycloak on Kubernetes](https://www.keycloak.org/getting-started/getting-started-kube) | ||
|
||
# manual: open https://keycloak.${NGINX_PUBLIC_IP}.sslip.io/ (and login with user/Admin1234) | ||
- Clean-up | ||
|
||
# if needed, deletes the chart | ||
helm uninstall keycloak -n authentication | ||
```bash | ||
helm uninstall keycloak -n keycloak | ||
kubectl delete ns keycloak | ||
``` | ||
|
||
## How to start once the application is running | ||
## Known issues | ||
|
||
* [Get started with Keycloak on Kubernetes](https://www.keycloak.org/getting-started/getting-started-kube) | ||
- Creating the secret at the same time as the chart may cause issue, create the secret first | ||
|
||
## How to investigate | ||
- Rancher is not compatible with Quarkus ([Keycloak 17.0.0](https://www.keycloak.org/2022/02/keycloak-1700-released.html)) | ||
- [Migrating to Quarkus distribution](https://www.keycloak.org/migration/migrating-to-quarkus) | ||
- [Rancher issue #38625](https://github.com/rancher/rancher/issues/38625) ([Rancher PR #38822](https://github.com/rancher/rancher/pull/38822)) | ||
|
||
### Known issues | ||
- Use `extraStartupArgs` value to fix the issue with NGINX Ingress Controller (see [Issue #5074](https://github.com/bitnami/charts/issues/5074)) | ||
|
||
* Creating the secret at the same time as the chart may cause issue, create the secret first | ||
## Going further | ||
|
||
* Rancher is not compatible with Quarkus ([Keycloak 17.0.0](https://www.keycloak.org/2022/02/keycloak-1700-released.html)) | ||
* [Migrating to Quarkus distribution](https://www.keycloak.org/migration/migrating-to-quarkus) | ||
* [Rancher issue #38625](https://github.com/rancher/rancher/issues/38625) ([Rancher PR #38822](https://github.com/rancher/rancher/pull/38822)) | ||
Look at the [Contributing](CONTRIBUTING.md) page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
# https://github.com/bitnami/charts/blob/main/bitnami/keycloak/values.yaml | ||
# Chart 7.1.17: https://github.com/bitnami/charts/blob/a919764ab7eef235a7496bd6c205e3b1814d40e6/bitnami/keycloak/values.yaml | ||
# https://hub.docker.com/r/bitnami/keycloak/ | ||
keycloak: | ||
auth: | ||
adminPassword: Admin1234 | ||
auth: {} | ||
# adminPassword: Admin1234 | ||
# existingSecret: keycloak-credentials | ||
# passwordSecretKey: admin-password | ||
# production: false | ||
ingress: | ||
enabled: true | ||
ingressClassName: nginx | ||
annotations: | ||
cert-manager.io/cluster-issuer: letsencrypt-prod | ||
annotations: {} | ||
# cert-manager.io/cluster-issuer: letsencrypt-prod | ||
tls: true | ||
extraEnvVars: | ||
# - name: KEYCLOAK_LOG_LEVEL | ||
# value: DEBUG | ||
# specific to Keycloak 16 | ||
- name: KEYCLOAK_PROXY_ADDRESS_FORWARDING | ||
value: "true" | ||
- name: KEYCLOAK_FRONTEND_URL | ||
value: "" |