Skip to content

Commit

Permalink
chore: add keycloak url to gateway (#3282)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Oct 27, 2023
1 parent 25bdca0 commit a3a6682
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions helm-chart/renku/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{- define "renku.keycloak.realm" -}}
{{ .Values.global.keycloak.realm | default "Renku" }}
{{- end -}}
2 changes: 2 additions & 0 deletions helm-chart/renku/templates/gateway/deployment-revproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
value: {{ template "gateway.core.serviceNames" . }}
- name: REVPROXY_RENKU_SERVICES_AUTH
value: {{ printf "http://%s-gateway-auth" .Release.Name }}
- name: REVPROXY_RENKU_SERVICES_KEYCLOAK
value: {{ include "renku.keycloakUrl" . | quote }}
- name: REVPROXY_RENKU_SERVICES_DATA_SERVICE
value: {{ printf "http://%s-data-service" .Release.Name | quote }}
- name: REVPROXY_PORT
Expand Down
4 changes: 1 addition & 3 deletions helm-chart/renku/templates/gateway/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ spec:
value: {{ .Values.gateway.gitlabClientId | default .Values.global.gateway.gitlabClientId | quote }}
- name: KEYCLOAK_URL
value: {{ include "renku.keycloakUrl" . | quote }}
{{ if .Values.global.keycloak.realm }}
- name: KEYCLOAK_REALM
value: {{ .Values.global.keycloak.realm | quote }}
{{ end }}
value: {{ include "renku.keycloak.realm" . | quote }}
- name: GATEWAY_SERVICE_PREFIX
value: "/api/"
- name: REDIS_HOST
Expand Down
4 changes: 1 addition & 3 deletions helm-chart/renku/templates/notebooks/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ spec:
value: renku
- name: NB_SESSIONS__GIT_PROXY__RENKU_CLIENT_SECRET
value: {{ .Values.global.gateway.clientSecret | quote }}
{{ if .Values.global.keycloak.realm }}
- name: NB_KEYCLOAK_REALM
value: {{ .Values.global.keycloak.realm | quote }}
{{ end }}
value: {{ include "renku.keycloak.realm" . | quote }}
- name: NB_SESSIONS__SSH__ENABLED
value: {{ .Values.notebooks.ssh.enabled | quote }}
{{- if not (kindIs "invalid" .Values.notebooks.ssh.hostKeySecret) }}
Expand Down
4 changes: 1 addition & 3 deletions helm-chart/renku/templates/notebooks/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ spec:
value: "true"
- name: NB_SESSIONS__GIT_PROXY__RENKU_CLIENT_SECRET
value: {{ $.Values.global.gateway.clientSecret | default "renku-client-secret" | quote }}
{{ if $.Values.global.keycloak.realm }}
- name: NB_KEYCLOAK_REALM
value: {{ $.Values.global.keycloak.realm | quote }}
{{ end }}
value: {{ include "renku.keycloak.realm" $ | quote }}
- name: NB_SESSIONS__SSH__ENABLED
value: {{ $.Values.notebooks.ssh.enabled | quote }}
{{- if not (kindIs "invalid" $.Values.notebooks.ssh.hostKeySecret) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ spec:
value: {{ toJson .Values.ui.client.homepage | quote }}
- name: CORE_API_VERSION_CONFIG
value: {{ toJson .Values.ui.client.coreApiVersionConfig | quote }}
- name: KEYCLOAK_REALM
value: {{ include "renku.keycloak.realm" . | quote }}
livenessProbe:
httpGet:
path: /
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/renku/templates/ui/ui-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
- name: GATEWAY_LOGOUT_PATH
value: {{ .Values.gateway.logoutSuffix | default (printf "/auth/logout") | quote }}
- name: AUTH_SERVER_URL
value: {{ printf "%s/auth/realms/Renku" (include "renku.baseUrl" .) | quote }}
value: {{ printf "%s/auth/realms/%s" (include "renku.baseUrl" .) (include "renku.keycloak.realm" .) | quote }}
- name: AUTH_CLIENT_ID
value: {{ .Values.ui.server.authentication.id | default (printf "renku-ui") | quote }}
- name: AUTH_CLIENT_SECRET
Expand Down

0 comments on commit a3a6682

Please sign in to comment.