diff --git a/charts/goldpinger/Chart.yaml b/charts/goldpinger/Chart.yaml index e4f651d..85f4aa2 100644 --- a/charts/goldpinger/Chart.yaml +++ b/charts/goldpinger/Chart.yaml @@ -11,4 +11,4 @@ name: goldpinger sources: - https://github.com/bloomberg/goldpinger - https://github.com/okgolove/helm-charts -version: 5.4.3 +version: 5.4.4 diff --git a/charts/goldpinger/templates/daemonset.yaml b/charts/goldpinger/templates/daemonset.yaml index 5fbe424..f78f8c9 100644 --- a/charts/goldpinger/templates/daemonset.yaml +++ b/charts/goldpinger/templates/daemonset.yaml @@ -47,17 +47,22 @@ spec: value: "{{ .Values.goldpinger.port }}" - name: LABEL_SELECTOR value: "app.kubernetes.io/name={{ include "goldpinger.name" . }}" + {{- if .Values.extraEnv }} + {{ toYaml .Values.extraEnv | nindent 12 }} + {{- end }} {{- with .Values.containerSecurityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} -{{- if .Values.extraEnv }} -{{ toYaml .Values.extraEnv | indent 12 }} -{{- end }} ports: - name: http containerPort: {{ .Values.goldpinger.port }} protocol: TCP + {{- range $k := .Values.extraEnv }} + {{- if and (eq $k.name "USE_HOST_IP") (eq $k.value "true") }} + hostPort: {{ $.Values.goldpinger.port }} + {{- end }} + {{- end }} livenessProbe: httpGet: path: / @@ -68,6 +73,11 @@ spec: port: http resources: {{- toYaml .Values.resources | nindent 12 }} + {{- range $k := .Values.extraEnv }} + {{- if and (eq $k.name "USE_HOST_IP") (eq $k.value "true") }} + hostNetwork: true + {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}