From ffef2d664324797515f21a98df9354547fd6501a Mon Sep 17 00:00:00 2001 From: Vittorio Canilli Date: Thu, 12 Jun 2025 12:04:30 +0200 Subject: [PATCH 1/5] Extra volumes and mounts --- Chart.yaml | 2 +- templates/deployment.yaml | 6 ++++++ values.yaml | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 2a0ec2c..823fb79 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: plausible-analytics description: A Helm Chart for Plausible Analytics - Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics. type: application -version: 0.4.0 +version: 0.4.1 appVersion: 3.0.1 keywords: - web analytics diff --git a/templates/deployment.yaml b/templates/deployment.yaml index e6853a7..8e7c76d 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -42,6 +42,9 @@ spec: - key: DATABASE_CA path: database-ca.pem {{- end }} + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.plausibleInitContainers.enabled }} initContainers: - name: wait-for-postgres @@ -104,6 +107,9 @@ spec: mountPath: /etc/ssl/certs/plausible/ readOnly: true {{- end }} + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} env: {{- if .Values.baseURL }} - name: BASE_URL diff --git a/values.yaml b/values.yaml index 6ebed9d..115dc21 100644 --- a/values.yaml +++ b/values.yaml @@ -233,3 +233,18 @@ affinity: {} ## Extra environment variables definition extraEnv: [] + +## Extra volumes definition +## Refer to ".spec.volumes" specification : https://kubernetes.io/docs/concepts/storage/volumes/ +extraVolumes: [] +# - name: my_volume +# secret: +# secretName: my_secret +# optional: false + +## Extra volumes mounts' definition +## Refer to ".spec.containers.volumeMounts" specification : https://kubernetes.io/docs/concepts/storage/volumes/ +extraVolumeMounts: [] +# - name: mounted_secret +# mountPath: "/etc/mounted_secret" +# readOnly: true From 9f26cd49393824fc8235108dc15771c94d016d0c Mon Sep 17 00:00:00 2001 From: Vittorio Canilli Date: Thu, 12 Jun 2025 14:19:16 +0200 Subject: [PATCH 2/5] DatabaseCA volume moved to wait-for-postgres init-container --- templates/deployment.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 8e7c76d..29de9a4 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -59,6 +59,11 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts + {{- if .Values.databaseCA }} + - name: database-ca + mountPath: /etc/ssl/certs/plausible/ + readOnly: true + {{- end }} {{- if not .Values.plausibleInitContainers.curl.enabled }} - name: wait-for-clickhouse image: "{{ .Values.plausibleInitContainers.clickhouse.image.repository }}:{{ .Values.plausibleInitContainers.clickhouse.image.tag | default "latest" }}" @@ -84,11 +89,6 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts - {{- if .Values.databaseCA }} - - name: database-ca - mountPath: /etc/ssl/certs/plausible/ - readOnly: true - {{- end }} {{- end }} containers: - name: {{ .Chart.Name }} From 22ff04c854fa00ddbb6859d9e251abe45976177d Mon Sep 17 00:00:00 2001 From: Vittorio Canilli Date: Thu, 12 Jun 2025 12:04:30 +0200 Subject: [PATCH 3/5] Extra volumes and mounts Signed-off-by: Vittorio Canilli --- Chart.yaml | 2 +- templates/deployment.yaml | 6 ++++++ values.yaml | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 2a0ec2c..823fb79 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: plausible-analytics description: A Helm Chart for Plausible Analytics - Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics. type: application -version: 0.4.0 +version: 0.4.1 appVersion: 3.0.1 keywords: - web analytics diff --git a/templates/deployment.yaml b/templates/deployment.yaml index e6853a7..8e7c76d 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -42,6 +42,9 @@ spec: - key: DATABASE_CA path: database-ca.pem {{- end }} + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.plausibleInitContainers.enabled }} initContainers: - name: wait-for-postgres @@ -104,6 +107,9 @@ spec: mountPath: /etc/ssl/certs/plausible/ readOnly: true {{- end }} + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} env: {{- if .Values.baseURL }} - name: BASE_URL diff --git a/values.yaml b/values.yaml index 6ebed9d..115dc21 100644 --- a/values.yaml +++ b/values.yaml @@ -233,3 +233,18 @@ affinity: {} ## Extra environment variables definition extraEnv: [] + +## Extra volumes definition +## Refer to ".spec.volumes" specification : https://kubernetes.io/docs/concepts/storage/volumes/ +extraVolumes: [] +# - name: my_volume +# secret: +# secretName: my_secret +# optional: false + +## Extra volumes mounts' definition +## Refer to ".spec.containers.volumeMounts" specification : https://kubernetes.io/docs/concepts/storage/volumes/ +extraVolumeMounts: [] +# - name: mounted_secret +# mountPath: "/etc/mounted_secret" +# readOnly: true From 26a70016c9b3c3596860c149cc5629ef60cde7d4 Mon Sep 17 00:00:00 2001 From: Vittorio Canilli Date: Thu, 12 Jun 2025 14:19:16 +0200 Subject: [PATCH 4/5] DatabaseCA volume moved to wait-for-postgres init-container --- templates/deployment.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 8e7c76d..29de9a4 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -59,6 +59,11 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts + {{- if .Values.databaseCA }} + - name: database-ca + mountPath: /etc/ssl/certs/plausible/ + readOnly: true + {{- end }} {{- if not .Values.plausibleInitContainers.curl.enabled }} - name: wait-for-clickhouse image: "{{ .Values.plausibleInitContainers.clickhouse.image.repository }}:{{ .Values.plausibleInitContainers.clickhouse.image.tag | default "latest" }}" @@ -84,11 +89,6 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts - {{- if .Values.databaseCA }} - - name: database-ca - mountPath: /etc/ssl/certs/plausible/ - readOnly: true - {{- end }} {{- end }} containers: - name: {{ .Chart.Name }} From c49cac7fc14ecdf021ed0c9b98c07be91b5c3ac4 Mon Sep 17 00:00:00 2001 From: Vittorio Canilli Date: Thu, 12 Jun 2025 14:19:16 +0200 Subject: [PATCH 5/5] DatabaseCA volume moved to wait-for-postgres init-container Signed-off-by: Vittorio Canilli --- templates/deployment.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 8e7c76d..29de9a4 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -59,6 +59,11 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts + {{- if .Values.databaseCA }} + - name: database-ca + mountPath: /etc/ssl/certs/plausible/ + readOnly: true + {{- end }} {{- if not .Values.plausibleInitContainers.curl.enabled }} - name: wait-for-clickhouse image: "{{ .Values.plausibleInitContainers.clickhouse.image.repository }}:{{ .Values.plausibleInitContainers.clickhouse.image.tag | default "latest" }}" @@ -84,11 +89,6 @@ spec: volumeMounts: - name: scripts-volume mountPath: /scripts - {{- if .Values.databaseCA }} - - name: database-ca - mountPath: /etc/ssl/certs/plausible/ - readOnly: true - {{- end }} {{- end }} containers: - name: {{ .Chart.Name }}