-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Laura <[email protected]> Co-authored-by: M. Alisafaee <[email protected]> Co-authored-by: Jakub Chrobasik <[email protected]> Co-authored-by: Ralf Grubenmann <[email protected]>
- Loading branch information
1 parent
ed21d78
commit d1f252b
Showing
13 changed files
with
374 additions
and
50 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
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
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
113 changes: 113 additions & 0 deletions
113
helm-chart/renku/templates/keycloak-users-sync-cronjob.yaml
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,113 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ include "renku.fullname" . }}-keycloak-sync-events | ||
labels: | ||
app: keycloak-sync | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
chart: {{ template "renku.chart" . }} | ||
spec: | ||
schedule: "*/2 * * * *" | ||
concurrencyPolicy: Forbid | ||
successfulJobsHistoryLimit: 1 | ||
failedJobsHistoryLimit: 3 | ||
jobTemplate: | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: keycloak-sync | ||
spec: | ||
initContainers: | ||
{{- include "certificates.initContainer" . | nindent 12 }} | ||
containers: | ||
- name: keycloak-sync | ||
image: "{{ .Values.dataService.keycloakSync.image.repository }}:{{ .Values.dataService.keycloakSync.image.tag }}" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: DB_HOST | ||
value: {{ template "postgresql.fullname" . }} | ||
- name: DB_USER | ||
value: {{ .Values.global.db.common.username }} | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.global.db.common.passwordSecretName }} | ||
key: password | ||
- name: KEYCLOAK_URL | ||
value: {{ include "renku.keycloakUrl" . | quote}} | ||
- name: KEYCLOAK_REALM | ||
value: {{ include "renku.keycloak.realm" . | quote}} | ||
- name: KEYCLOAK_CLIENT_ID | ||
value: {{ include "renku.dataService.keycloak.clientId" . | quote }} | ||
- name: KEYCLOAK_CLIENT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "renku.fullname" . }} | ||
key: dataServiceKeycloakClientSecret | ||
- name: TOTAL_USER_SYNC | ||
value: "false" | ||
{{- include "certificates.env.python" . | nindent 16 }} | ||
volumeMounts: | ||
{{- include "certificates.volumeMounts.system" . | nindent 16 }} | ||
restartPolicy: Never | ||
volumes: | ||
{{- include "certificates.volumes" . | nindent 12 }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ include "renku.fullname" . }}-keycloak-sync-total | ||
labels: | ||
app: keycloak-sync | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
chart: {{ template "renku.chart" . }} | ||
spec: | ||
schedule: "0 3 * * *" | ||
concurrencyPolicy: Forbid | ||
successfulJobsHistoryLimit: 1 | ||
failedJobsHistoryLimit: 3 | ||
jobTemplate: | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: keycloak-sync | ||
spec: | ||
initContainers: | ||
{{- include "certificates.initContainer" . | nindent 12 }} | ||
containers: | ||
- name: keycloak-sync | ||
image: "{{ .Values.dataService.keycloakSync.image.repository }}:{{ .Values.dataService.keycloakSync.image.tag }}" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: DB_HOST | ||
value: {{ template "postgresql.fullname" . }} | ||
- name: DB_USER | ||
value: {{ .Values.global.db.common.username }} | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.global.db.common.passwordSecretName }} | ||
key: password | ||
- name: KEYCLOAK_URL | ||
value: {{ include "renku.keycloakUrl" . | quote}} | ||
- name: KEYCLOAK_REALM | ||
value: {{ include "renku.keycloak.realm" . | quote}} | ||
- name: KEYCLOAK_CLIENT_ID | ||
value: {{ include "renku.dataService.keycloak.clientId" . | quote }} | ||
- name: KEYCLOAK_CLIENT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "renku.fullname" . }} | ||
key: dataServiceKeycloakClientSecret | ||
- name: TOTAL_USER_SYNC | ||
value: "true" | ||
{{- include "certificates.env.python" . | nindent 16 }} | ||
volumeMounts: | ||
{{- include "certificates.volumeMounts.system" . | nindent 16 }} | ||
restartPolicy: Never | ||
volumes: | ||
{{- include "certificates.volumes" . | nindent 12 }} |
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
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
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,4 +1,4 @@ | ||
FROM python:3.9-alpine | ||
FROM python:3.10-alpine | ||
|
||
COPY requirements.txt init-realm.py utils.py /app/ | ||
WORKDIR /app | ||
|
Oops, something went wrong.