summaryrefslogtreecommitdiff
path: root/apps/heimdall/templates
diff options
context:
space:
mode:
authorR-man3000 <rasmus.luha@gmail.com>2026-05-31 13:53:25 +0300
committerR-man3000 <rasmus.luha@gmail.com>2026-05-31 13:53:25 +0300
commit46beed24543994a465e5449acc1bb987e5368441 (patch)
tree9f7a3be1065f5e39069e6f8fa8f942027340ce47 /apps/heimdall/templates
parent974d4457148e9a9ff3a0231eece663d04faaf16d (diff)
move Heimdall deployment to helm chart
Diffstat (limited to 'apps/heimdall/templates')
-rw-r--r--apps/heimdall/templates/_helpers.tpl19
-rw-r--r--apps/heimdall/templates/deployment.yaml46
-rw-r--r--apps/heimdall/templates/ingress.yaml22
-rw-r--r--apps/heimdall/templates/pvc.yaml16
-rw-r--r--apps/heimdall/templates/service.yaml15
5 files changed, 117 insertions, 1 deletions
diff --git a/apps/heimdall/templates/_helpers.tpl b/apps/heimdall/templates/_helpers.tpl
index 1333ed7..b0376aa 100644
--- a/apps/heimdall/templates/_helpers.tpl
+++ b/apps/heimdall/templates/_helpers.tpl
@@ -1 +1,18 @@
-TODO
+{{- define "heimdall.name" -}}
+{{- .Chart.Name }}
+{{- end }}
+
+{{- define "heimdall.labels" -}}
+helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+app.kubernetes.io/name: {{ include "heimdall.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+
+{{/* Stable subset only — selector labels cannot change after first deploy. */}}
+
+{{- define "heimdall.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "heimdall.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
diff --git a/apps/heimdall/templates/deployment.yaml b/apps/heimdall/templates/deployment.yaml
new file mode 100644
index 0000000..97a4f5f
--- /dev/null
+++ b/apps/heimdall/templates/deployment.yaml
@@ -0,0 +1,46 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "heimdall.name" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "heimdall.labels" . | nindent 4 }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ {{- include "heimdall.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ {{- include "heimdall.selectorLabels" . | nindent 8 }}
+ spec:
+ containers:
+ - name: {{ .Chart.Name }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - containerPort: 80
+ protocol: TCP
+ env:
+ - name: PUID
+ value: {{ .Values.env.puid | quote }}
+ - name: PGID
+ value: {{ .Values.env.pgid | quote }}
+ - name: APP_URL
+ value: {{ .Values.env.appUrl | quote }}
+ volumeMounts:
+ - name: config
+ mountPath: /config
+ {{- with .Values.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ volumes:
+ - name: config
+ {{- if .Values.persistence.enabled }}
+ persistentVolumeClaim:
+ claimName: {{ include "heimdall.name" . }}-pvc
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
diff --git a/apps/heimdall/templates/ingress.yaml b/apps/heimdall/templates/ingress.yaml
new file mode 100644
index 0000000..cd07205
--- /dev/null
+++ b/apps/heimdall/templates/ingress.yaml
@@ -0,0 +1,22 @@
+{{- if .Values.ingress.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: {{ include "heimdall.name" . }}-ingress
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "heimdall.labels" . | nindent 4 }}
+spec:
+ ingressClassName: {{ .Values.ingress.className }}
+ rules:
+ - host: {{ .Values.ingress.host }}
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: {{ include "heimdall.name" . }}-service
+ port:
+ number: {{ .Values.service.port }}
+{{- end }}
diff --git a/apps/heimdall/templates/pvc.yaml b/apps/heimdall/templates/pvc.yaml
new file mode 100644
index 0000000..dc376ef
--- /dev/null
+++ b/apps/heimdall/templates/pvc.yaml
@@ -0,0 +1,16 @@
+{{- if .Values.persistence.enabled }}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: {{ include "heimdall.name" . }}-pvc
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "heimdall.labels" . | nindent 4 }}
+spec:
+ accessModes:
+ - ReadWriteOnce
+ storageClassName: {{ .Values.persistence.storageClass }}
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
+{{- end }}
diff --git a/apps/heimdall/templates/service.yaml b/apps/heimdall/templates/service.yaml
new file mode 100644
index 0000000..7743097
--- /dev/null
+++ b/apps/heimdall/templates/service.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "heimdall.name" . }}-service
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "heimdall.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ selector:
+ {{- include "heimdall.selectorLabels" . | nindent 4 }}
+ ports:
+ - protocol: TCP
+ port: {{ .Values.service.port }}
+ targetPort: 80