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

Commit 1d1ccb5

Browse files
committed
Added support for ephemeral volumes
1 parent e041bb4 commit 1d1ccb5

File tree

8 files changed

+26
-15
lines changed

8 files changed

+26
-15
lines changed

charts/common/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type: library
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.7.0
18+
version: 0.8.0

charts/common/templates/_pvc.yaml

+2-9
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 .ephemeral) }}
44
{{- $robustName := include "common.robustName" $.Release.Name }}
55
---
66
apiVersion: v1
@@ -13,14 +13,7 @@ metadata:
1313
{{- toYaml .pvcAnnotations | nindent 4 }}
1414
{{- end }}
1515
spec:
16-
accessModes:
17-
- {{ .accessMode | default "ReadWriteOnce" }}
18-
{{- if .storageClass }}
19-
storageClassName: {{ .storageClass }}
20-
{{- end }}
21-
resources:
22-
requests:
23-
storage: {{ .size | default "1Gi" }}
16+
{{- include "common.volumeClaimSpec.tpl" . | nindent 2 }}
2417
{{- end }}
2518
{{- end }}
2619
{{- end -}}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- define "common.volumeClaimSpec.tpl" -}}
2+
accessModes:
3+
- {{ .accessMode | default "ReadWriteOnce" }}
4+
{{- with .storageClass }}
5+
storageClassName: {{ . }}
6+
{{- end }}
7+
resources:
8+
requests:
9+
storage: {{ .size | default "1Gi" }}
10+
{{- with .volumeMode }}
11+
volumeMode: {{ . }}
12+
{{- end }}
13+
{{- end -}}

charts/common/templates/_volumesRef.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ volumes:
2020
{{- if .hostPath.type }}
2121
type: {{ .hostPath.type }}
2222
{{- end }}
23+
{{- else if .ephemeral }}
24+
ephemeral:
25+
volumeClaimTemplate:
26+
spec:
27+
{{- include "common.volumeClaimSpec.tpl" . | nindent 10 }}
2328
{{- else }}
2429
persistentVolumeClaim:
2530
{{- if .existingClaim }}

charts/onechart/Chart.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: common
33
repository: file://../common
4-
version: 0.7.0
5-
digest: sha256:a97ffdc0ab67ba57b6fb03ab3f98bbbc488f0630f2160b75e937c27d19a2fa08
6-
generated: "2024-09-09T08:36:50.067911383Z"
4+
version: 0.8.0
5+
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
6+
generated: "2025-01-08T18:33:43.774360305+01:00"

charts/onechart/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.74.0
18+
version: 0.75.0
1919

2020
dependencies:
2121
- name: common
22-
version: 0.7.0
22+
version: 0.8.0
2323
repository: file://../common
-3.02 KB
Binary file not shown.
3.12 KB
Binary file not shown.

0 commit comments

Comments
 (0)