Skip to content

Commit

Permalink
Merge pull request #36 from keephq/feature/tpl5
Browse files Browse the repository at this point in the history
feat: more tpl
  • Loading branch information
shahargl authored Sep 8, 2024
2 parents 6f44c9c + f7bc16a commit 8613f73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/keep/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.1.8
description: Keep Helm Chart
type: application
icon: https://platform.keephq.dev/_next/image?url=%2Fkeep.png&w=48&q=75
appVersion: 0.23.0
appVersion: 0.24.0
deprecated: false
annotations:
app: keep
Expand Down
16 changes: 12 additions & 4 deletions charts/keep/templates/keep-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ spec:
metadata:
{{- with .Values.backend.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- if .Values.backend.podAnnotations }}
{{- range $key, $value := .Values.backend.podAnnotations }}
{{- if kindIs "string" $value }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- else }}
{{ $key }}: {{ $value | toYaml | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
labels:
{{- include "keep.selectorLabels" . | nindent 8 }}
Expand Down Expand Up @@ -52,8 +60,8 @@ spec:
{{- else if .configMapKeyRef }}
valueFrom:
configMapKeyRef:
name: {{ tpl (.configMapName | toString) $ }}
key: {{ tpl (.configMapKey | toString) $ }}
name: {{ tpl (.configMapKeyRef.name | toString) $ }}
key: {{ tpl (.configMapKeyRef.key | toString) $ }}
{{- else if .fieldRef }}
valueFrom:
fieldRef:
Expand Down Expand Up @@ -134,4 +142,4 @@ spec:
{{- with .Values.backend.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 8613f73

Please sign in to comment.