From 78927a98eed958770ac72925a786b1c9a355fe1b Mon Sep 17 00:00:00 2001 From: Franco Viotti Date: Thu, 17 Oct 2024 13:08:46 -0300 Subject: [PATCH] added check for persistance: enabled --- charts/ocsinventory/templates/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/ocsinventory/templates/deployment.yaml b/charts/ocsinventory/templates/deployment.yaml index 4c11e42..d5b8904 100644 --- a/charts/ocsinventory/templates/deployment.yaml +++ b/charts/ocsinventory/templates/deployment.yaml @@ -58,6 +58,7 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: + {{- if .Values.persistence.enabled }} - mountPath: /etc/ocsinventory-server name: {{ template "ocsinventory.fullname" . }}-data subPath: perlcomdata @@ -70,6 +71,7 @@ spec: - mountPath: /etc/apache2/conf-available name: {{ template "ocsinventory.fullname" . }}-data subPath: httpdconfdata + {{- end }} - mountPath: /etc/php/8.1/apache2/conf.d/ocsinventory.ini name: {{ template "ocsinventory.fullname" . }}-config subPath: phpconfig @@ -86,6 +88,7 @@ spec: {{- end }} volumes: + {{- if .Values.persistence.enabled }} - name: {{ template "ocsinventory.fullname" . }}-data persistentVolumeClaim: {{- if .Values.persistence.existingClaim }} @@ -93,6 +96,7 @@ spec: {{- else }} claimName: {{ template "ocsinventory.fullname" . }}-data {{- end }} + {{- end }} - name: {{ template "ocsinventory.fullname" . }}-config configMap: name: {{ template "ocsinventory.fullname" . }}-config