diff --git a/charts/application/Chart.yaml b/charts/application/Chart.yaml index da9f7d0..7f10e56 100644 --- a/charts/application/Chart.yaml +++ b/charts/application/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - name: MediaMarktSaturn url: https://github.com/MediaMarktSaturn appVersion: 1.0.0 -version: 1.27.0 +version: 1.28.0 diff --git a/charts/application/templates/_podTemplate.tpl b/charts/application/templates/_podTemplate.tpl index 4a4ec59..9df72eb 100644 --- a/charts/application/templates/_podTemplate.tpl +++ b/charts/application/templates/_podTemplate.tpl @@ -69,13 +69,17 @@ spec: {{- end }} resources: {{- toYaml (or $i.resources $.Values.initDefaults.resources) | nindent 8 }} - {{- if .env }} env: + - name: APPLICATION_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .env }} {{- range $k, $v := .env }} - name: {{ $k }} value: {{ $v | quote }} {{- end }} - {{- end }} + {{- end }} {{- if (or $i.configEnvFrom $i.secretEnvFrom )}} envFrom: {{- range $c := $i.configEnvFrom }} @@ -129,13 +133,17 @@ spec: {{- end }} resources: {{- toYaml (or $s.resources $.Values.sidecarDefaults.resources) | nindent 8 }} - {{- if .env }} env: + - name: APPLICATION_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .env }} {{- range $k, $v := .env }} - name: {{ $k }} value: {{ $v | quote }} {{- end }} - {{- end }} + {{- end }} {{- if (or $s.configEnvFrom $s.secretEnvFrom )}} envFrom: {{- range $c := $s.configEnvFrom }} @@ -247,11 +255,15 @@ spec: - secretRef: name: {{ include "secret" . }} {{- end }} - {{- if .Values.serviceAccount.secretName }} env: + - name: APPLICATION_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.serviceAccount.secretName }} - name: "GOOGLE_APPLICATION_CREDENTIALS" value: "{{- .Values.serviceAccount.mountPath -}}/key.json" - {{- end }} + {{- end }} ports: - name: http containerPort: {{ .Values.container.port }}