feat: use helper
Some checks failed
lint-test-helm / lint-helm (pull_request) Failing after 1m22s
lint-test-helm / validate-kubeconform (pull_request) Has been skipped

This commit is contained in:
2026-04-19 21:03:44 -05:00
parent 00d5109152
commit 60213a92d3
29 changed files with 234 additions and 112 deletions

View File

@@ -0,0 +1,21 @@
{{/*
Common labels
*/}}
{{- define "bazarr.labels" -}}
{{ include "bazarr.selectorLabels" $ }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "bazarr.selectorLabels" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
{{- end }}
{{/*
NFS names
*/}}
{{- define "bazarr.storageNfsName" -}}
bazarr-nfs-storage
{{- end -}}

View File

@@ -4,9 +4,8 @@ metadata:
name: bazarr-key
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Template.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
app.kubernetes.io/name: bazarr-key
{{- include "bazarr.labels" . | nindent 4 }}
spec:
secretStoreRef:
kind: ClusterSecretStore

View File

@@ -1,12 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: bazarr-nfs-storage
name: {{- include "bazarr.storageNfsName" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Template.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
app.kubernetes.io/name: {{- include "bazarr.storageNfsName" . }}
{{- include "bazarr.labels" . | nindent 4 }}
spec:
volumeName: {{ .Template.Name }}
storageClassName: nfs-client

View File

@@ -1,12 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: bazarr-nfs-storage
name: {{- include "bazarr.storageNfsName" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Template.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
app.kubernetes.io/name: {{- include "bazarr.storageNfsName" . }}
{{- include "bazarr.labels" . | nindent 4 }}
spec:
persistentVolumeReclaimPolicy: Retain
storageClassName: nfs-client