mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
e7ee503cbe
* refactoring rtorrent-flood chart
124 lines
4.0 KiB
YAML
124 lines
4.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "rtorrent-flood.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
|
|
helm.sh/chart: {{ include "rtorrent-flood.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: {{ .Values.strategyType }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "rtorrent-flood.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}-rtorrent
|
|
image: "{{ .Values.rtorrent.image.repository }}:{{ .Values.rtorrent.image.tag }}"
|
|
imagePullPolicy: {{ .Values.rtorrent.image.pullPolicy }}
|
|
ports:
|
|
- name: bt
|
|
containerPort: 49161
|
|
protocol: TCP
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: bt
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: bt
|
|
env:
|
|
- name: TZ
|
|
value: "{{ .Values.timezone }}"
|
|
- name: PUID
|
|
value: "{{ .Values.uid }}"
|
|
- name: PGID
|
|
value: "{{ .Values.gid }}"
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: config
|
|
- mountPath: /data
|
|
name: data
|
|
{{- if .Values.persistence.data.subPath }}
|
|
subPath: {{ .Values.persistence.data.subPath }}
|
|
{{ end }}
|
|
- mountPath: /session
|
|
name: data
|
|
subPath: .session
|
|
- mountPath: /tmp
|
|
name: socket
|
|
resources:
|
|
- name: {{ .Chart.Name }}-flood
|
|
image: "{{ .Values.flood.image.repository }}:{{ .Values.flood.image.tag }}"
|
|
imagePullPolicy: {{ .Values.flood.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
failureThreshold: 5
|
|
timeoutSeconds: 15
|
|
readinessProbe:
|
|
httpGet:
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
failureThreshold: 5
|
|
timeoutSeconds: 20
|
|
tty: true
|
|
env:
|
|
- name: TZ
|
|
value: "{{ .Values.timezone }}"
|
|
- name: FLOOD_SECRET
|
|
value: "{{ .Values.floodSecret }}"
|
|
- name: RTORRENT_SOCK
|
|
value: "true"
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: data
|
|
{{- if .Values.persistence.data.subPath }}
|
|
subPath: {{ .Values.persistence.data.subPath }}
|
|
{{ end }}
|
|
- mountPath: /tmp
|
|
name: socket
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
volumes:
|
|
- name: config
|
|
{{- if .Values.persistence.config.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "rtorrent-flood.fullname" . }}-config{{- end }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{ end }}
|
|
- name: data
|
|
{{- if .Values.persistence.data.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ if .Values.persistence.data.existingClaim }}{{ .Values.persistence.data.existingClaim }}{{- else }}{{ template "rtorrent-flood.fullname" . }}-data{{- end }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{ end }}
|
|
- name: socket
|
|
emptyDir: {}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }} |