Skip to content

Commit

Permalink
fix: allow overriding token generator image and parse k8s version to …
Browse files Browse the repository at this point in the history
…avoid including metadata (#5)
  • Loading branch information
echozio authored Feb 10, 2024
1 parent ab0a50c commit ba195b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/token-generator/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ spec:
serviceAccountName: {{ include "jitsu.tokenGenerator.serviceAccountName" . }}
containers:
- name: token-generator
image: "alpine/k8s:{{ .Capabilities.KubeVersion.Version | trimPrefix "v"}}"
{{- if .Values.tokenGenerator.image.tag }}
image: "{{ .Values.tokenGenerator.image.repository }}:{{ .Values.tokenGenerator.image.tag }}"
{{- else }}
{{- $v := semver .Capabilities.KubeVersion.Version }}
image: "{{ .Values.tokenGenerator.image.repository }}:{{ printf "%d.%d.%d" $v.Major $v.Minor $v.Patch }}"
{{- end }}
env:
- name: FULLNAME
value: {{ include "jitsu.fullname" . }}
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ ingress:
tokenGenerator:
# Generate inter-service auth tokens automatically upon deployment.
enabled: true
image:
repository: alpine/k8s
tag: ""
serviceAccount:
create: true
annotations: {}
Expand Down

0 comments on commit ba195b5

Please sign in to comment.