Skip to content

Commit

Permalink
Set environment variables via annotation (istio#16594)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilmour authored and istio-testing committed Aug 29, 2019
1 parent f1ba4e1 commit 5379131
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install/kubernetes/helm/istio/files/injection-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,18 @@ containers:
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
{{ if eq .Values.global.proxy.tracer "datadog" }}
{{- if eq .Values.global.proxy.tracer "datadog" }}
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
{{ end }}
{{- if isset .ObjectMeta.Annotations `apm.datadoghq.com/env` }}
{{- range $key, $value := fromJSON (index .ObjectMeta.Annotations `apm.datadoghq.com/env`) }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- end }}
- name: ISTIO_META_POD_NAME
valueFrom:
fieldRef:
Expand Down

0 comments on commit 5379131

Please sign in to comment.