Skip to content
Snippets Groups Projects
Commit 02639faa authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' into OZG-6177

parents c0a70eb2 4df6e6f9
Branches
No related tags found
No related merge requests found
......@@ -33,6 +33,14 @@ spec:
containers:
- image: "{{ .Values.image.repo }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
env:
{{- if (.Values.userAuthentication).enabled }}
- name: ETR_SICHERHEIT_AUTHENTIFIZIERUNG
value: "yaml"
- name: ETR_SICHERHEIT_YAML_CREDENTIALS-FILE-PATH
value: /home/etr/etr-user/users.yaml
- name: ETR_GRUPPENMODUS
value: "gruppen_token"
{{- end }}
{{- with include "app.getCustomList" . }}
{{ . | indent 8 }}
{{- end }}
......@@ -68,11 +76,19 @@ spec:
volumeMounts:
- name: etr-home
mountPath: "/home/etr"
{{- if (.Values.userAuthentication).enabled }}
- name: etr-user
mountPath: "/home/etr/etr-user"
{{- end }}
volumes:
- name: etr-home
persistentVolumeClaim:
claimName: {{ .Release.Name }}-home-pvc
{{- if (.Values.userAuthentication).enabled }}
- name: etr-user
configMap:
name: etr-user-config
{{- end }}
imagePullSecrets:
- name: {{ required "imagePullSecret must be set" .Values.imagePullSecret }}
restartPolicy: Always
......
......@@ -46,3 +46,24 @@ tests:
asserts:
- isNullOrEmpty:
path: spec.template.spec.containers[0].env
- it: should add etr sicherheit Envs
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ETR_SICHERHEIT_AUTHENTIFIZIERUNG
value: "yaml"
- contains:
path: spec.template.spec.containers[0].env
content:
name: ETR_SICHERHEIT_YAML_CREDENTIALS-FILE-PATH
value: /home/etr/etr-user/users.yaml
- contains:
path: spec.template.spec.containers[0].env
content:
name: ETR_GRUPPENMODUS
value: "gruppen_token"
\ No newline at end of file
......@@ -22,3 +22,41 @@ tests:
name: etr-home
persistentVolumeClaim:
claimName: etr-home-pvc
- it: should add etr-user volume mount
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etr-user
mountPath: "/home/etr/etr-user"
- it: should add etr-user volume
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: etr-user
configMap:
name: etr-user-config
- it: should not add etr-user volume mount
asserts:
- notContains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: etr-user
mountPath: "/home/etr/etr-user"
- it: should not add etr-user volume
asserts:
- notContains:
path: spec.template.spec.volumes
content:
name: etr-user
configMap:
name: etr-user-config
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment