Skip to content

Commit

Permalink
Update CheCluster patch when deploying Che with Keycloak as OIDC prov… (
Browse files Browse the repository at this point in the history
#2817)

* Update CheCluster patch when deploying Che with Keycloak as OIDC provider

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* Fixup

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

---------

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha authored Nov 13, 2024
1 parent b071358 commit 75fd4ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ spec:
gateway:
oAuthProxy:
cookieExpireSeconds: 300
deployment:
containers:
- env:
- name: OAUTH2_PROXY_BACKEND_LOGOUT_URL
value: "http://keycloak.$(minikube ip).nip.io/realms/che/protocol/openid-connect/logout?id_token_hint=\{id_token}"
name: oauth-proxy
components:
cheServer:
extraProperties:
Expand All @@ -333,6 +339,7 @@ helm install che \
--set networking.auth.identityProviderURL=https://keycloak.$(minikube ip).nip.io/realms/che . && \
sleep 5s && \
{orch-cli} patch checluster/eclipse-che --patch '{"spec": {"components": {"cheServer": {"extraProperties": {"CHE_OIDC_USERNAME__CLAIM": "email"}}}}}' --type=merge -n eclipse-che
{orch-cli} patch checluster/eclipse-che --patch '{"spec": {"networking": {"auth": {"gateway": {"deployment": {"containers": [{"name": "oauth-proxy", "env":[{"name": "OAUTH2_PROXY_BACKEND_LOGOUT_URL", "value": "http://keycloak.$(minikube ip).nip.io/realms/che/protocol/openid-connect/logout?id_token_hint=\{id_token}"}]}]}}}}}}' --type=merge -n eclipse-che
----

.Verification steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,13 @@ spec:
gateway:
oAuthProxy:
cookieExpireSeconds: 300
components:
deployment:
containers:
- env:
- name: OAUTH2_PROXY_BACKEND_LOGOUT_URL
value: "http://$KEYCLOAK_HOST/realms/che/protocol/openid-connect/logout?id_token_hint=\{id_token}"
name: oauth-proxy
components:
cheServer:
extraProperties:
CHE_OIDC_USERNAME__CLAIM: email
Expand Down

0 comments on commit 75fd4ed

Please sign in to comment.