From ab7073818d52ba80c28ab0db02c0b969d6d8ba02 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Tue, 25 Apr 2023 00:08:11 +0200 Subject: [PATCH] feat(hedgedoc): Add automatic restart on config update --- charts/hedgedoc/Chart.yaml | 2 +- charts/hedgedoc/README.md | 2 +- charts/hedgedoc/templates/deployment.yaml | 7 +++++-- .../hedgedoc/tests/__snapshot__/98_snapshot_test.yaml.snap | 4 ++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/charts/hedgedoc/Chart.yaml b/charts/hedgedoc/Chart.yaml index 4e14569e0..31f0e4b59 100644 --- a/charts/hedgedoc/Chart.yaml +++ b/charts/hedgedoc/Chart.yaml @@ -14,7 +14,7 @@ keywords: sources: - https://github.com/hedgedoc/hedgedoc/tree/master - https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/charts/hedgedoc -version: 0.3.0 +version: 0.3.1 # renovate: image=quay.io/hedgedoc/hedgedoc appVersion: 1.9.7 maintainers: diff --git a/charts/hedgedoc/README.md b/charts/hedgedoc/README.md index 56a2864ce..b25fd0c63 100644 --- a/charts/hedgedoc/README.md +++ b/charts/hedgedoc/README.md @@ -1,6 +1,6 @@ # hedgedoc -   +   A platform to write and share markdown. diff --git a/charts/hedgedoc/templates/deployment.yaml b/charts/hedgedoc/templates/deployment.yaml index 6fc63d86e..6d524eb75 100644 --- a/charts/hedgedoc/templates/deployment.yaml +++ b/charts/hedgedoc/templates/deployment.yaml @@ -13,10 +13,13 @@ spec: {{- include "hedgedoc.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/config-file: {{ include (print $.Template.BasePath "/configmap-config.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "hedgedoc.selectorLabels" . | nindent 8 }} spec: diff --git a/charts/hedgedoc/tests/__snapshot__/98_snapshot_test.yaml.snap b/charts/hedgedoc/tests/__snapshot__/98_snapshot_test.yaml.snap index ffd96ee40..be8579cd6 100644 --- a/charts/hedgedoc/tests/__snapshot__/98_snapshot_test.yaml.snap +++ b/charts/hedgedoc/tests/__snapshot__/98_snapshot_test.yaml.snap @@ -53,6 +53,10 @@ should match basic snapshot: type: Recreate template: metadata: + annotations: + checksum/config: 0e1a1adf160f3fcd20e855d82408506085eedd859609b97406b8c3c4a085d8df + checksum/config-file: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + checksum/secret: 01de24789eacad789d51ab7b8e4987c034609b47cec2f6db41ff940f904fd252 labels: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/name: hedgedoc -- GitLab