Skip to content

Commit

Permalink
helm: Enable setting engine pod annotations (dagger#9623)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaffet authored Feb 20, 2025
1 parent 5859b9b commit 9903699
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions helm/dagger/.changes/unreleased/Added-20250219-113502.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Added
body: 'helm: Enable setting engine pod annotations'
time: 2025-02-19T11:35:02.695824Z
custom:
Author: vmaffet
PR: "9623"
5 changes: 4 additions & 1 deletion helm/dagger/templates/engine-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ spec:
name: {{ include "dagger.fullname" . }}-engine
template:
metadata:
{{- if (or .Values.engine.config .Values.magicache.enabled) }}
{{- if (or .Values.engine.config .Values.magicache.enabled .Values.engine.annotations) }}
annotations:
{{- if .Values.engine.config }}
checksum/config: {{ include (print $.Template.BasePath "/engine-config.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.magicache.enabled }}
checksum/secret: {{ include (print $.Template.BasePath "/magicache-secret.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.engine.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
name: {{ include "dagger.fullname" . }}-engine
Expand Down
5 changes: 4 additions & 1 deletion helm/dagger/templates/engine-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ spec:
name: {{ include "dagger.fullname" . }}-engine
template:
metadata:
{{- if (or .Values.engine.config .Values.magicache.enabled) }}
{{- if (or .Values.engine.config .Values.magicache.enabled .Values.engine.annotations) }}
annotations:
{{- if .Values.engine.config }}
checksum/config: {{ include (print $.Template.BasePath "/engine-config.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.magicache.enabled }}
checksum/secret: {{ include (print $.Template.BasePath "/magicache-secret.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.engine.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
name: {{ include "dagger.fullname" . }}-engine
Expand Down
3 changes: 3 additions & 0 deletions helm/dagger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ engine:
# mirrors = ["mirror.gcr.io"]
# [log]
# format = "json"

annotations: {}

labels: {}

### `DaemonSet` guarantees a single Engine per K8s node (default behaviour)
Expand Down

0 comments on commit 9903699

Please sign in to comment.