Skip to content

Commit

Permalink
fix: opendj statefulset permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
moabu committed Jan 20, 2023
1 parent c798c4c commit 0d9a2a7
Showing 1 changed file with 17 additions and 34 deletions.
51 changes: 17 additions & 34 deletions charts/janssen/charts/opendj/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,31 @@ spec:
securityContext:
runAsUser: 1000
runAsNonRoot: true
fsGroup: 1000
#fsGroupChangePolicy: "OnRootMismatch" enable once 1.23 is the lowest version
{{- if $.Values.global.upgrade.enabled }}
initContainers:
- command:
- /bin/chown
- -R
- 1000:1000
- /opt/opendj/logs
- /bin/sh
- -c
- ls -l /opt/opendj; /bin/chown -R 1000:1000 /opt/opendj || echo "did not work"; ls -l /opt/opendj; sleep 5
image: busybox:latest
imagePullPolicy: Always
name: change-logs-ownership
name: change-folders-ownership
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /opt/opendj/logs
name: opendj-volume
subPath: logs
- command:
- /bin/chown
- -R
- 1000:1000
- /opt/opendj/db
image: busybox:latest
imagePullPolicy: Always
name: change-db-ownership
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
- command:
- /bin/chown
- -R
- 1000:1000
- /opt/opendj/config
image: busybox:latest
imagePullPolicy: Always
name: change-config-ownership
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
{{- end }}
{{- range $key, $values := $.Values.openDjVolumeMounts }}
- mountPath: {{$values.mountPath}}
name: {{$values.name}}
subPath: {{$key}}
{{- end }}
{{- with $.Values.volumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if $.Values.global.upgrade.enabled }}
- name: ox-ldif-cm
mountPath: /opt/opendj/config/schema/101-jans.ldif
subPath: 101-jans.ldif
{{- end }}
{{- with $.Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit 0d9a2a7

Please sign in to comment.