Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/ldap-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
name: ldap-sync
version: 0.0.1
8 changes: 8 additions & 0 deletions charts/ldap-sync/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ldap-sync
data:
{{- range $k, $v := .Values.configs }}
{{ $k }}: {{ $v }}
{{- end }}
45 changes: 45 additions & 0 deletions charts/ldap-sync/templates/cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: ldap-sync
spec:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
concurrencyPolicy: Forbid
schedule: {{ .Values.cronSchedule | quote }}
jobTemplate:
spec:
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
backoffLimit: 1
parallelism: 1
template:
metadata:
labels:
cronjob: ldap-sync
spec:
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
serviceAccountName: ldap-sync
restartPolicy: Never
containers:
- name: backup
image: {{ printf "%s:%s".Values.image.repository .Values.image.tag | quote }}
command: ["/opt/matrix-ldap-sync/matrix-ldap-sync"]
resources:
{{ toYaml .Values.synapse.pgbouncer.resources | nindent 16 }}
envFrom:
- configMapRef:
name: ldap-sync
- secretRef:
name: ldap-sync
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | nindent 12 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | nindent 12 }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/ldap-sync/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: ldap-sync
type: Opaque
data:
{{- range $k, $v := .Values.secrets }}
{{ $k }}: {{ $v | toString | b64enc }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/ldap-sync/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
image:
repository: "jushcherbak/matrix-ldap-sync"
tag: "0.0.1"
pullPolicy: IfNotPresent
cronSchedule: "0 2 * * *"
activeDeadlineSeconds: 21600
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
configs:
LDAP_URL: ''
LDAP_BASE: ''
LDAP_FILTER: ''
SYNAPSE_HOMESERVER_URL: ''
DO_REAL_JOB: false
secrets:
LDAP_BIND_DN: ''
LDAP_BIND_PASSWD: ''
SYNAPSE_USER_ID: ''
SYNAPSE_ACCESS_TOKEN: ''