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

Added support for ephemeral volumes #153

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.7.0
version: 0.8.0
11 changes: 2 additions & 9 deletions charts/common/templates/_pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "common.pvc.tpl" -}}
{{- range .Values.volumes }}
{{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap) }}
{{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap .ephemeral) }}
{{- $robustName := include "common.robustName" $.Release.Name }}
---
apiVersion: v1
Expand All @@ -13,14 +13,7 @@ metadata:
{{- toYaml .pvcAnnotations | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .accessMode | default "ReadWriteOnce" }}
{{- if .storageClass }}
storageClassName: {{ .storageClass }}
{{- end }}
resources:
requests:
storage: {{ .size | default "1Gi" }}
{{- include "common.volumeClaimSpec.tpl" . | nindent 2 }}
{{- end }}
{{- end }}
{{- end -}}
13 changes: 13 additions & 0 deletions charts/common/templates/_volumeClaimSpec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- define "common.volumeClaimSpec.tpl" -}}
accessModes:
- {{ .accessMode | default "ReadWriteOnce" }}
{{- with .storageClass }}
storageClassName: {{ . }}
{{- end }}
resources:
requests:
storage: {{ .size | default "1Gi" }}
{{- with .volumeMode }}
volumeMode: {{ . }}
{{- end }}
{{- end -}}
5 changes: 5 additions & 0 deletions charts/common/templates/_volumesRef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ volumes:
{{- if .hostPath.type }}
type: {{ .hostPath.type }}
{{- end }}
{{- else if .ephemeral }}
ephemeral:
volumeClaimTemplate:
spec:
{{- include "common.volumeClaimSpec.tpl" . | nindent 10 }}
{{- else }}
persistentVolumeClaim:
{{- if .existingClaim }}
Expand Down
6 changes: 3 additions & 3 deletions charts/cron-job/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.7.0
digest: sha256:a97ffdc0ab67ba57b6fb03ab3f98bbbc488f0630f2160b75e937c27d19a2fa08
generated: "2024-09-09T08:36:50.170556891Z"
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2025-01-08T18:59:40.262361104+01:00"
4 changes: 2 additions & 2 deletions charts/cron-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.74.0
version: 0.75.0

dependencies:
- name: common
version: 0.7.0
version: 0.8.0
repository: file://../common
Binary file removed charts/cron-job/charts/common-0.7.0.tgz
Binary file not shown.
Binary file added charts/cron-job/charts/common-0.8.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions charts/onechart/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.7.0
digest: sha256:a97ffdc0ab67ba57b6fb03ab3f98bbbc488f0630f2160b75e937c27d19a2fa08
generated: "2024-09-09T08:36:50.067911383Z"
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2025-01-08T18:33:43.774360305+01:00"
4 changes: 2 additions & 2 deletions charts/onechart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.74.0
version: 0.75.0

dependencies:
- name: common
version: 0.7.0
version: 0.8.0
repository: file://../common
Binary file removed charts/onechart/charts/common-0.7.0.tgz
Binary file not shown.
Binary file added charts/onechart/charts/common-0.8.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions charts/static-site/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.7.0
digest: sha256:a97ffdc0ab67ba57b6fb03ab3f98bbbc488f0630f2160b75e937c27d19a2fa08
generated: "2024-09-09T08:36:50.241133151Z"
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2025-01-08T18:59:48.326338635+01:00"
4 changes: 2 additions & 2 deletions charts/static-site/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.74.0
version: 0.75.0

dependencies:
- name: common
version: 0.7.0
version: 0.8.0
repository: file://../common
Binary file removed charts/static-site/charts/common-0.7.0.tgz
Binary file not shown.
Binary file added charts/static-site/charts/common-0.8.0.tgz
Binary file not shown.
Loading