From 0caa188bb1c5d769a561b3d1a259cbac0725007e Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 12 Oct 2025 22:02:42 +0200 Subject: [PATCH] fix(deployment): mount additional volumes --- templates/_deployment.tpl | 3 ++- unittests/deployment/deployment.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/_deployment.tpl b/templates/_deployment.tpl index 9e12669..398c854 100644 --- a/templates/_deployment.tpl +++ b/templates/_deployment.tpl @@ -80,6 +80,7 @@ {{- define "athens-proxy.deployment.volumeMounts" -}} {{- $volumeMounts := .Values.deployment.athensProxy.volumeMounts | default (list) }} + {{- if .Values.persistence.enabled }} {{- $volumeMounts = concat $volumeMounts (list (dict "name" "data" "mountPath" .Values.persistence.data.mountPath)) }} {{- end }} @@ -129,7 +130,7 @@ {{/* volumes */}} {{- define "athens-proxy.deployment.volumes" -}} -{{- $volumes := .Values.deployment.athensProxy.volumes | default (list) }} +{{- $volumes := .Values.deployment.volumes | default (list) }} {{/* volumes (data) */}} diff --git a/unittests/deployment/deployment.yaml b/unittests/deployment/deployment.yaml index d256bf7..d64a5e0 100644 --- a/unittests/deployment/deployment.yaml +++ b/unittests/deployment/deployment.yaml @@ -463,3 +463,10 @@ tests: - name: data mountPath: /usr/lib/athens-proxy/data template: templates/deployment.yaml + - equal: + path: spec.template.spec.volumes + value: + - name: data + hostPath: + path: /usr/lib/athens-proxy/data + template: templates/deployment.yaml