mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "nzbhydra2.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "nzbhydra2.name" . }}
|
|
helm.sh/chart: {{ include "nzbhydra2.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 "nzbhydra2.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "nzbhydra2.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
{{- if .Values.podAnnotations }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.podAnnotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 5076
|
|
protocol: TCP
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
failureThreshold: 5
|
|
timeoutSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 60
|
|
failureThreshold: 5
|
|
timeoutSeconds: 10
|
|
env:
|
|
- name: TZ
|
|
value: "{{ .Values.timezone }}"
|
|
- name: PUID
|
|
value: "{{ .Values.puid }}"
|
|
- name: PGID
|
|
value: "{{ .Values.pgid }}"
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: config
|
|
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 "nzbhydra2.fullname" . }}-config{{- end }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{ end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|