Skip to content

Commit

Permalink
Add istio to the job
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomezselles committed Mar 6, 2024
1 parent 9c62f4f commit 3aae88d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/hermes-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions charts/hermes-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/"
Expand Down

0 comments on commit 3aae88d

Please sign in to comment.