Added initial commit files

This commit is contained in:
atusa-bw
2022-09-24 12:30:14 -06:00
commit 3faa49b7ef
24 changed files with 2378 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
apiVersion: v1
kind: Service
metadata:
name: sonarr
spec:
ports:
- port: 8989
protocol: TCP
targetPort: 8989
name: webui
selector:
run: sonarr
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: sonarr
name: sonarr
spec:
replicas: 1
selector:
matchLabels:
run: sonarr
template:
metadata:
labels:
run: sonarr
spec:
securityContext:
# runAsUser: 1000
# runAsGroup: 1000
fsGroup: 1000
initContainers:
- name: chown
image: busybox
command: ["sh", "-c", "chown -R 1000:1000 /config && chown -R 1000:1000 /tv"]
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: sonarr
- mountPath: /tv
name: htpc-home
subPath: media/tv
- name: config
image: busybox
command: ["sh", "-c"]
securityContext:
runAsUser: 1000
runAsGroup: 1000
args:
- "echo start;[[ ! -f /config/config.xml ]] && echo '<Config><UrlBase>/$(SONARR)</UrlBase></Config>'> /config/config.xml;echo end;"
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: sonarr
containers:
- env:
- name: TZ
value: America/Denver
- name: PUID
value: "1000"
- name: PGID
value: "1000"
image: linuxserver/sonarr
name: sonarr
ports:
- containerPort: 8989
name: webui
# livenessProbe:
# exec:
# command:
# - /bin/sh
# - -c
# - curl "http://localhost:8989/sonarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
# initialDelaySeconds: 30
# periodSeconds: 10
# readinessProbe:
# exec:
# command:
# - /bin/sh
# - -c
# - curl "http://localhost:8989/sonarr/api/system/status?ApiKey=$(sed -ne '/ApiKey/{s/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p;q;}' </config/config.xml)"
# initialDelaySeconds: 30
# periodSeconds: 10
volumeMounts:
- mountPath: /config
name: htpc-home
subPath: sonarr
- mountPath: /tv
name: htpc-home
subPath: media/tv
- mountPath: /downloads
name: htpc-home
subPath: downloads