Skip to content

Commit bbb2028

Browse files
authored
Ldap sync (#7)
* ldap-sync
1 parent bc7617b commit bbb2028

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

charts/ldap-sync/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
name: ldap-sync
3+
version: 0.0.1
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: ldap-sync
5+
data:
6+
{{- range $k, $v := .Values.configs }}
7+
{{ $k }}: {{ $v }}
8+
{{- end }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: batch/v1
2+
kind: CronJob
3+
metadata:
4+
name: ldap-sync
5+
spec:
6+
successfulJobsHistoryLimit: 1
7+
failedJobsHistoryLimit: 3
8+
concurrencyPolicy: Forbid
9+
schedule: {{ .Values.cronSchedule | quote }}
10+
jobTemplate:
11+
spec:
12+
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
13+
backoffLimit: 1
14+
parallelism: 1
15+
template:
16+
metadata:
17+
labels:
18+
cronjob: ldap-sync
19+
spec:
20+
activeDeadlineSeconds: {{ .Values.activeDeadlineSeconds }}
21+
serviceAccountName: ldap-sync
22+
restartPolicy: Never
23+
containers:
24+
- name: backup
25+
image: {{ printf "%s:%s".Values.image.repository .Values.image.tag | quote }}
26+
command: ["/opt/matrix-ldap-sync/matrix-ldap-sync"]
27+
resources:
28+
{{ toYaml .Values.synapse.pgbouncer.resources | nindent 16 }}
29+
envFrom:
30+
- configMapRef:
31+
name: ldap-sync
32+
- secretRef:
33+
name: ldap-sync
34+
{{- if .Values.nodeSelector }}
35+
nodeSelector:
36+
{{ toYaml .Values.nodeSelector | nindent 12 }}
37+
{{- end }}
38+
{{- if .Values.tolerations }}
39+
tolerations:
40+
{{ toYaml .Values.tolerations | nindent 12 }}
41+
{{- end }}
42+
{{- if .Values.affinity }}
43+
affinity:
44+
{{ toYaml .Values.affinity | nindent 12 }}
45+
{{- end }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: ldap-sync
5+
type: Opaque
6+
data:
7+
{{- range $k, $v := .Values.secrets }}
8+
{{ $k }}: {{ $v | toString | b64enc }}
9+
{{- end }}

charts/ldap-sync/values.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
image:
2+
repository: "jushcherbak/matrix-ldap-sync"
3+
tag: "0.0.1"
4+
pullPolicy: IfNotPresent
5+
cronSchedule: "0 2 * * *"
6+
activeDeadlineSeconds: 21600
7+
resources: {}
8+
nodeSelector: {}
9+
tolerations: []
10+
affinity: {}
11+
configs:
12+
LDAP_URL: ''
13+
LDAP_BASE: ''
14+
LDAP_FILTER: ''
15+
SYNAPSE_HOMESERVER_URL: ''
16+
DO_REAL_JOB: false
17+
secrets:
18+
LDAP_BIND_DN: ''
19+
LDAP_BIND_PASSWD: ''
20+
SYNAPSE_USER_ID: ''
21+
SYNAPSE_ACCESS_TOKEN: ''

0 commit comments

Comments
 (0)