Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 4f92b5f

Browse files
committed
fix: pvc should not be generated with .existingSecret
1 parent e041bb4 commit 4f92b5f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: charts/common/templates/_pvc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- define "common.pvc.tpl" -}}
22
{{- range .Values.volumes }}
3-
{{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap) }}
3+
{{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap .existingSecret) }}
44
{{- $robustName := include "common.robustName" $.Release.Name }}
55
---
66
apiVersion: v1

Diff for: charts/onechart/tests/pvc_test.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,12 @@ tests:
4646
asserts:
4747
- hasDocuments:
4848
count: 0
49+
- it: Should not generate a claim when using existingSecret
50+
set:
51+
volumes:
52+
- name: data
53+
path: /var/lib/1clickinfra/data
54+
existingSecret: my-existing-secret
55+
asserts:
56+
- hasDocuments:
57+
count: 0

0 commit comments

Comments
 (0)