diff --git a/charts/hermes-job/Chart.yaml b/charts/hermes-job/Chart.yaml index 5fd09fb..84d1e26 100644 --- a/charts/hermes-job/Chart.yaml +++ b/charts/hermes-job/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: Hermes job helm chart for Kubernetes name: hermes-job -version: 0.0.2 +version: 0.0.3 diff --git a/charts/hermes-job/templates/job.yaml b/charts/hermes-job/templates/job.yaml index 2812f59..89abe56 100644 --- a/charts/hermes-job/templates/job.yaml +++ b/charts/hermes-job/templates/job.yaml @@ -15,6 +15,8 @@ spec: labels: app.kubernetes.io/name: {{ include "hermes.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + annotations: + sidecar.istio.io/inject: {{ .Values.global.istio.sidecar.inject | default false | quote }} spec: template: @@ -27,11 +29,18 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.global.hermes.repo | default .Values.image.repository }}:{{ .Values.global.hermes.tag | default .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} +{{ if not .Values.global.istio.sidecar.inject }} command: - hermes - -r{{ .Values.global.hermes.rate | default .Values.rate }} - -p{{ .Values.global.hermes.print | default .Values.print }} - -t{{ .Values.global.hermes.time | default .Values.time }} +{{ else }} + command: ["/bin/bash", "-c"] + args: + - | + hermes -r{{ .Values.global.hermes.rate | default .Values.rate }} -p{{ .Values.global.hermes.print | default .Values.print }} -t{{ .Values.global.hermes.time | default .Values.time }}; curl -sf -XPOST http://localhost:15020/quitquitquit; +{{ end }} volumeMounts: - name: {{ .Values.global.hermes.cm | default .Values.script.cm }}-volume mountPath: "/etc/scripts/"