init helm charts

This commit is contained in:
2025-01-10 13:45:35 +01:00
commit 0ab0d5facc
50 changed files with 2249 additions and 0 deletions

View File

@ -0,0 +1,84 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "qbittorrent.fullname" . }}
labels:
{{- include "qbittorrent.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "qbittorrent.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "qbittorrent.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: TZ
value: {{ .Values.env.TZ | quote }}
- name: PUID
value: {{ .Values.securityContext.PUID | quote }}
- name: PGID
value: {{ .Values.securityContext.PGID | quote }}
- name: WEBUI_PORT
value: {{ .Values.env.WEBUI_PORT | quote }}
ports:
- name: webui
containerPort: {{ .Values.service.webui.port }}
protocol: TCP
- name: bittorrent
containerPort: {{ .Values.service.bittorrent.port }}
protocol: {{ .Values.service.bittorrent.protocol }}
volumeMounts:
- name: config
mountPath: {{ .Values.persistence.config.mountPath }}
- name: downloads
mountPath: {{ .Values.persistence.downloads.mountPath }}
livenessProbe:
httpGet:
path: /
port: webui
readinessProbe:
httpGet:
path: /
port: webui
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: config
{{- if .Values.persistence.config.enabled }}
persistentVolumeClaim:
claimName: {{ include "qbittorrent.fullname" . }}-config
{{- else }}
emptyDir: {}
{{- end }}
- name: downloads
{{- if .Values.persistence.downloads.enabled }}
persistentVolumeClaim:
claimName: {{ include "qbittorrent.fullname" . }}-downloads
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}