From 883ca98a3ff6d4c7547a40802bdd84b6ea1c8bf2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 26 Jan 2026 13:31:39 +0100 Subject: [PATCH] Add mini helm chart --- helm/alpine/Chart.yaml | 6 +++++ helm/alpine/templates/deployment.yaml | 36 +++++++++++++++++++++++++++ helm/alpine/templates/pvc.yaml | 11 ++++++++ helm/alpine/values.yaml | 4 +++ 4 files changed, 57 insertions(+) create mode 100644 helm/alpine/Chart.yaml create mode 100644 helm/alpine/templates/deployment.yaml create mode 100644 helm/alpine/templates/pvc.yaml create mode 100644 helm/alpine/values.yaml diff --git a/helm/alpine/Chart.yaml b/helm/alpine/Chart.yaml new file mode 100644 index 0000000..171f7aa --- /dev/null +++ b/helm/alpine/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: alpine +description: Understanding helm with alpine Linux +type: application +version: 1.0.0 +appVersion: "3.22" diff --git a/helm/alpine/templates/deployment.yaml b/helm/alpine/templates/deployment.yaml new file mode 100644 index 0000000..0cbed55 --- /dev/null +++ b/helm/alpine/templates/deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-alpine + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: alpine +spec: + selector: + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: alpine +{{ if .Values.suspend }} + replicas: 0 +{{ else }} + replicas: 1 +{{ end }} + strategy: + type: Recreate + template: + metadata: + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: alpine + spec: + containers: + - name: alpine + image: alpine:{{ .Chart.AppVersion }} + volumeMounts: + - name: data + mountPath: "/data" + subPath: alpine + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ .Release.Name }}-data diff --git a/helm/alpine/templates/pvc.yaml b/helm/alpine/templates/pvc.yaml new file mode 100644 index 0000000..7793856 --- /dev/null +++ b/helm/alpine/templates/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.pvc.size }} + storageClassName: {{ .Values.pvc.storageClassName }} diff --git a/helm/alpine/values.yaml b/helm/alpine/values.yaml new file mode 100644 index 0000000..4bd9025 --- /dev/null +++ b/helm/alpine/values.yaml @@ -0,0 +1,4 @@ +suspend: false +pvc: + size: 1Gi + storageClassName: ""