Skip to content
Snippets Groups Projects
Commit 0aa1b67d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6747 resovle comments

parent 7ecb60da
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,7 @@ component: antragraum-proxy ...@@ -39,6 +39,7 @@ component: antragraum-proxy
{{- required "baseUrl muss angegeben sein" .Values.baseUrl }} {{- required "baseUrl muss angegeben sein" .Values.baseUrl }}
{{- end -}} {{- end -}}
{{- define "app.getCustomList" -}} {{- define "app.getCustomList" -}}
{{- with (.Values.env).customList -}} {{- with (.Values.env).customList -}}
{{- if kindIs "map" . -}} {{- if kindIs "map" . -}}
......
...@@ -58,8 +58,10 @@ spec: ...@@ -58,8 +58,10 @@ spec:
app.kubernetes.io/name: {{ .Release.Name }} app.kubernetes.io/name: {{ .Release.Name }}
containers: containers:
- env: - env:
- name: APP_ENV {{- if (.Values.env).overrideGoProfiles }}
value: "{{ .Values.appEnv | default "" }}" - name: ACTIVE_PROFILE
value: {{ (.Values.env).overrideGoProfiles }}
{{- end }}
{{- with include "app.getCustomList" . }} {{- with include "app.getCustomList" . }}
{{ . | indent 10 }} {{ . | indent 10 }}
{{- end }} {{- end }}
......
...@@ -63,19 +63,18 @@ tests: ...@@ -63,19 +63,18 @@ tests:
name: test_environment name: test_environment
value: "B test value" value: "B test value"
- it: check envs default values - it: should have env ACTIVE_PROFILE with correct value when set
set:
env.overrideGoProfiles: oc,test,ea
asserts: asserts:
- contains: - contains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
name: APP_ENV name: ACTIVE_PROFILE
value: "" value: oc,test,ea
- it: should set APP_ENV
set: - it: should by default not have the ACTIVE_PROFILE env
appEnv: prod
asserts: asserts:
- contains: - equal:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: value: null
name: APP_ENV \ No newline at end of file
value: "prod"
\ 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