Created
February 2, 2022 19:53
-
-
Save TobiasS1402/86ec9d31f91cdbccfed6e3230fdb0c56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
labels: | |
app: sonarr | |
name: sonarr-deployment | |
spec: | |
replicas: 1 | |
serviceName: "sonarr-service" | |
selector: | |
matchLabels: | |
app: sonarr | |
template: | |
metadata: | |
labels: | |
app: sonarr | |
spec: | |
containers: | |
- image: linuxserver/sonarr:amd64-3.0.6 | |
imagePullPolicy: IfNotPresent | |
name: sonarr | |
volumeMounts: | |
- name: sonarr-volume | |
mountPath: /config | |
ports: | |
- containerPort: 8989 | |
env: | |
- name: PUID | |
value: "1000" | |
- name: PGID | |
value: "1000" | |
- name: TZ | |
value: "Europe/Amsterdam" | |
volumes: | |
- name: sonarr-volume | |
persistentVolumeClaim: | |
claimName: sonarr-data | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: sonarr-data | |
spec: | |
capacity: | |
storage: 2Gi | |
accessModes: | |
- ReadWriteOnce | |
persistentVolumeReclaimPolicy: Retain | |
storageClassName: sonarr-storageclass | |
local: | |
path: /mnt/sonarr_data | |
nodeAffinity: | |
required: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: kubernetes.io/hostname | |
operator: In | |
values: | |
- k3s | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: sonarr-data | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: sonarr-storageclass | |
resources: | |
requests: | |
storage: 2Gi | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: sonarr-service | |
spec: | |
ports: | |
- | |
port: 8989 | |
name: http | |
protocol: TCP | |
targetPort: 8989 | |
selector: | |
app: sonarr | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: sonarr-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
spec: | |
rules: | |
- host: sonarr.example.com | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: sonarr-service | |
port: | |
number: 8989 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment