diff --git a/README.md b/README.md index b43fa73..eaa7046 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,23 @@ -![test](https://github.com/fabito/htk8s/workflows/test/badge.svg) - # HTPC powered by k3s -![htk8s diagrams](https://docs.google.com/drawings/d/e/2PACX-1vSsQfsfgHiHi0l-1w6pZhCYX-xz2xJNVwMrnKclkqYdEd6dIGJY9soY2lgtm1gyOnNSTYRbYkqvYCWU/pub?w=1373&h=612) - This is my current [HTPC](https://en.wikipedia.org/wiki/Home_theater_PC) setup. It runs on [k3s](https://k3s.io/) - a lightweight and easy to install Kubernetes distribution. It includes the following applications: -* [Sonarr](https://sonarr.tv/) for tv shows -* [Radarr](https://radarr.video/) for movies -* [Bazarr](https://github.com/morpheus65535/bazarr) for subtitles -* Transmission for torrents -* [Jackett](https://github.com/Jackett/Jackett) -* [Emby](https://emby.media/) - -Applications state (settings / db) and media files are stored in a shared volume of type `hostPath`. It does not use PVC and currently only works if the whole `htpc` namespace is deployed in the same node. +* [Sonarr](https://sonarr.tv/) - for tv shows +* [Radarr](https://radarr.video/) - for movies +* [Bazarr](https://github.com/morpheus65535/bazarr) - for subtitles +* [Transmission](https://transmissionbt.com/) - for torrents +* [Prowlarr](https://wiki.servarr.com/prowlarr) - torrent indexer that synchronizes torrent indexers between Sonarr and Radarr +* [Plex](https://www.plex.tv/) - Media server to stream shows and movies ## Getting Started -### Quickstart - -```bash -# for x86_64 -kubectl apply -f https://raw.githubusercontent.com/fabito/htk8s/v0.1/install_x86_64.yaml - -# for raspberry pi (ARM) -kubectl apply -f https://raw.githubusercontent.com/fabito/htk8s/v0.1/install_armhf.yaml -``` - -### The Gitops way - -![argocd htpc application](https://drive.google.com/uc?id=1KI_7GVcP7QFWhQEiqS9Q4azE7-gpso2M) - - -```bash -# x86_64 only -kubectl apply -f https://raw.githubusercontent.com/fabito/htk8s/v0.1/install_argocd.yaml -``` - -This alternate manifest will install [Argo CD](https://github.com/argoproj/argo-cd) along with the [htpc application](argocd/application.yaml). Then it will monitor this repo for changes and apply them to the cluster accordingly (more specifically the `overlays/x86`overlay). - -You can access the Argo CD ui at: https://localhost/argocd. - ### Verifying the installation All resources are created in the `htpc` namespace. So if you run: ```bash -k3s kubectl get all -n htpc +kubectl get all -n htpc ``` You should get something similar to: @@ -55,32 +25,32 @@ You should get something similar to: ```bash NAME READY STATUS RESTARTS AGE pod/bazarr-795f88c5c9-w75l7 1/1 Running 0 24h -pod/emby-6f457df664-fqbmc 1/1 Running 0 24h -pod/jackett-6bcf6cd8d6-lrh6j 1/1 Running 0 24h +pod/plex-6f457df664-fqbmc 1/1 Running 0 24h +pod/prowlarr-6bcf6cd8d6-lrh6j 1/1 Running 0 24h pod/radarr-5c965c7678-zt8sq 1/1 Running 0 24h pod/sonarr-b65c8956-mxng4 1/1 Running 0 24h pod/transmission-5f7fdc6cb5-nrtbb 1/1 Running 0 24h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/bazarr ClusterIP 10.43.43.224 6767/TCP 24h -service/emby ClusterIP 10.43.212.198 8096/TCP 24h -service/jackett ClusterIP 10.43.104.233 9117/TCP 24h +service/plex ClusterIP 10.43.212.198 32400/TCP 24h +service/prowlarr ClusterIP 10.43.104.233 9696/TCP 24h service/radarr ClusterIP 10.43.141.101 7878/TCP 24h service/sonarr ClusterIP 10.43.35.98 8989/TCP 24h service/transmission ClusterIP 10.43.184.198 9091/TCP 24h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/bazarr 1/1 1 1 24h -deployment.apps/emby 1/1 1 1 24h -deployment.apps/jackett 1/1 1 1 24h +deployment.apps/plex 1/1 1 1 24h +deployment.apps/prowlarr 1/1 1 1 24h deployment.apps/radarr 1/1 1 1 24h deployment.apps/sonarr 1/1 1 1 24h deployment.apps/transmission 1/1 1 1 24h NAME DESIRED CURRENT READY AGE replicaset.apps/bazarr-795f88c5c9 1 1 1 24h -replicaset.apps/emby-6f457df664 1 1 1 24h -replicaset.apps/jackett-6bcf6cd8d6 1 1 1 24h +replicaset.apps/plex-6f457df664 1 1 1 24h +replicaset.apps/prowlarr-6bcf6cd8d6 1 1 1 24h replicaset.apps/radarr-5c965c7678 1 1 1 24h replicaset.apps/sonarr-b65c8956 1 1 1 24h replicaset.apps/transmission-5f7fdc6cb5 1 1 1 24h @@ -88,31 +58,31 @@ replicaset.apps/transmission-5f7fdc6cb5 1 1 1 24h You should also be able to reach each component's ui using the links below. Don't forget to replace `localhost` by the IP or the server name running k3s. -|App|URI -|---|--- -|radarr|http://localhost/radarr -|sonarr|http://localhost/sonarr -|bazarr|http://localhost/bazarr -|jacket|http://localhost/jackett -|transmission|http://localhost/transmission -|emby|http://localhost/ +| App | URI | +|--------------|-------------------------------| +| radarr | http://localhost/radarr | +| sonarr | http://localhost/sonarr | +| bazarr | http://localhost/bazarr | +| prowlarr | http://localhost/prowlarr | +| transmission | http://localhost/transmission | +| plex | http://localhost/ | Check the [ingress.yaml](base/ingress.yaml) for more details. -Each module except for Emby is configured to respond on a custom basepath (check the init containers logic for more details). +Each module except for Plex is configured to respond on a custom basepath (check the init containers logic for more details). ## How it works (WIP) -It uses [LinuxServers](https://www.linuxserver.io/our-images/) images. +All images are provided by [LinuxServers](https://www.linuxserver.io/our-images/). -It uses a `hostPath` volume to store configuration and media files. It defaults to the `/opt/htpc` directory +The namespace uses an NFS volume to store configuration and media files. It defaults to the directory: `/nfs/htpc` ```bash -/opt/htpc +/nfs/htpc ├── bazarr ├── downloads -├── emby -├── jackett +├── plex +├── prowlarr ├── media │   ├── movies │   └── tv diff --git a/base/bazarr.yaml b/base/bazarr.yaml index 22e273d..0e1289e 100644 --- a/base/bazarr.yaml +++ b/base/bazarr.yaml @@ -3,13 +3,11 @@ kind: Service metadata: name: bazarr spec: - type: NodePort ports: - port: 6767 protocol: TCP targetPort: 6767 name: webui - nodePort: 30003 selector: run: bazarr --- @@ -30,8 +28,6 @@ spec: run: bazarr spec: securityContext: - # runAsUser: 1000 - # runAsGroup: 1000 fsGroup: 1000 initContainers: - name: wait-for-sonarr-and-radarr @@ -106,18 +102,18 @@ spec: value: "1000" image: linuxserver/bazarr name: bazarr - # livenessProbe: - # httpGet: - # path: /bazarr - # port: webui - # initialDelaySeconds: 200 - # periodSeconds: 15 - # readinessProbe: - # httpGet: - # path: /bazarr - # port: webui - # initialDelaySeconds: 200 - # periodSeconds: 15 + livenessProbe: + httpGet: + path: /bazarr + port: webui + initialDelaySeconds: 200 + periodSeconds: 15 + readinessProbe: + httpGet: + path: /bazarr + port: webui + initialDelaySeconds: 200 + periodSeconds: 15 ports: - containerPort: 6767 name: webui diff --git a/base/ingress.yaml b/base/ingress.yaml index bbc3916..e8d126d 100644 --- a/base/ingress.yaml +++ b/base/ingress.yaml @@ -16,14 +16,7 @@ spec: pathType: Prefix backend: service: - name: emby - port: - name: webui - - path: /jackett - pathType: Prefix - backend: - service: - name: jackett + name: plex port: name: webui - path: /sonarr diff --git a/base/jackett.yaml b/base/jackett.yaml deleted file mode 100644 index 88ee23b..0000000 --- a/base/jackett.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: jackett -spec: - type: NodePort - ports: - - port: 9117 - protocol: TCP - targetPort: 9117 - name: webui - nodePort: 30004 - selector: - run: jackett ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - run: jackett - name: jackett -spec: - replicas: 1 - selector: - matchLabels: - run: jackett - template: - metadata: - labels: - run: jackett - spec: - securityContext: - # runAsUser: 1000 - # runAsGroup: 1000 - fsGroup: 1000 - initContainers: - - name: config - image: busybox - command: ["sh", "-c"] - args: - - "echo start; - [[ ! -f /config/Jackett/ServerConfig.json ]] && mkdir -p /config/Jackett/ && echo '{ \"BasePathOverride\": \"/jackett\"}' > /config/Jackett/ServerConfig.json; - echo end;" - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - containers: - - env: - - name: TZ - value: America/Denver - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/jackett - name: jackett - ports: - - containerPort: 9117 - name: webui - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - - mountPath: /downloads - name: htpc-home - subPath: downloads - diff --git a/base/kustomization.yaml b/base/kustomization.yaml index d91b72c..65897df 100644 --- a/base/kustomization.yaml +++ b/base/kustomization.yaml @@ -8,12 +8,11 @@ commonLabels: resources: - namespace.yaml -- jackett.yaml - radarr.yaml - sonarr.yaml - bazarr.yaml - transmission.yaml -- emby.yaml +- plex.yaml - prowlarr.yml - ingress.yaml diff --git a/base/emby.yaml b/base/plex.yaml similarity index 61% rename from base/emby.yaml rename to base/plex.yaml index 7fb1546..f025bba 100644 --- a/base/emby.yaml +++ b/base/plex.yaml @@ -1,57 +1,53 @@ apiVersion: v1 kind: Service metadata: - name: emby + name: plex spec: - type: NodePort ports: - - port: 8096 + - port: 32400 protocol: TCP - targetPort: 8096 + targetPort: 32400 name: webui - nodePort: 30002 selector: - run: emby + run: plex --- apiVersion: apps/v1 kind: Deployment metadata: labels: - run: emby - name: emby + run: plex + name: plex spec: replicas: 1 selector: matchLabels: - run: emby + run: plex template: metadata: labels: - run: emby + run: plex spec: securityContext: fsGroup: 1000 containers: - env: - - name: TZ - value: Pacific/Auckland - - name: UID + - name: PUID value: "1000" - - name: GID + - name: PGID value: "1000" - image: emby/embyserver - name: emby + image: linuxserver/plex + name: plex ports: - - containerPort: 8096 + - containerPort: 32400 name: webui protocol: TCP - - containerPort: 8920 + - containerPort: 32400 name: webui-ssl protocol: TCP - volumeMounts: - - mountPath: /config + volumeMounts: + - mountPath: /config name: htpc-home - subPath: emby + subPath: plex - mountPath: /tv name: htpc-home subPath: media/tv diff --git a/base/prowlarr.yml b/base/prowlarr.yml index 172c3d0..e4853f7 100644 --- a/base/prowlarr.yml +++ b/base/prowlarr.yml @@ -3,13 +3,11 @@ kind: Service metadata: name: prowlarr spec: - type: NodePort ports: - port: 9696 protocol: TCP targetPort: 9696 name: webui - nodePort: 30005 selector: run: prowlarr --- @@ -42,24 +40,8 @@ spec: ports: - containerPort: 9696 name: webui - # livenessProbe: - # exec: - # command: - # - /bin/sh - # - -c - # - curl "http://localhost:7878/radarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' \(.*\)<\/ApiKey>.*/\1/p;q;}' /config/settings.json; - # echo settings.json successfully saved - # volumeMounts: - # - mountPath: /config - # name: htpc-home - # subPath: transmission + - name: setup-transmission + image: busybox + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + command: + - sh + - -c + - | + echo Saving settings.json + echo '{"download-dir": "/downloads", "rpc-whitelist-enabled": false, "rpc-host-whitelist-enabled": false}' > /config/settings.json; + echo settings.json successfully saved + volumeMounts: + - mountPath: /config + name: htpc-home + subPath: transmission containers: - name: transmission image: linuxserver/transmission diff --git a/base/volumes_patch.yaml b/base/volumes_patch.yaml index ab76f1d..7489474 100644 --- a/base/volumes_patch.yaml +++ b/base/volumes_patch.yaml @@ -40,20 +40,7 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: jackett -spec: - template: - spec: - volumes: - - hostPath: - path: /nfs/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: emby + name: plex spec: template: spec: @@ -75,8 +62,6 @@ spec: path: /nfs/htpc type: DirectoryOrCreate name: htpc-home - # persistentVolumeClaim: - # claimName: local-path-pvc --- apiVersion: apps/v1 kind: Deployment @@ -88,6 +73,6 @@ spec: volumes: - hostPath: path: /nfs/htpc - type: DirectoryOrCreate + type: DirectoryOrCreate name: htpc-home --- diff --git a/install_armhf.yaml b/install_armhf.yaml deleted file mode 100644 index bbc808f..0000000 --- a/install_armhf.yaml +++ /dev/null @@ -1,640 +0,0 @@ -# This is an auto-generated file. DO NOT EDIT -apiVersion: v1 -kind: Namespace -metadata: - labels: - app: htpc - name: htpc ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: bazarr - namespace: htpc -spec: - ports: - - name: webui - port: 6767 - protocol: TCP - targetPort: 6767 - selector: - app: htpc - run: bazarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: emby - namespace: htpc -spec: - ports: - - name: webui - port: 8096 - protocol: TCP - targetPort: 8096 - selector: - app: htpc - run: emby ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: jackett - namespace: htpc -spec: - ports: - - name: webui - port: 9117 - protocol: TCP - targetPort: 9117 - selector: - app: htpc - run: jackett ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: radarr - namespace: htpc -spec: - ports: - - name: webui - port: 7878 - protocol: TCP - targetPort: 7878 - selector: - app: htpc - run: radarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: sonarr - namespace: htpc -spec: - ports: - - name: webui - port: 8989 - protocol: TCP - targetPort: 8989 - selector: - app: htpc - run: sonarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: transmission - namespace: htpc -spec: - ports: - - name: webui - port: 9091 - protocol: TCP - targetPort: 9091 - selector: - app: htpc - run: transmission ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: bazarr - name: bazarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: bazarr - template: - metadata: - labels: - app: htpc - run: bazarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/bazarr:arm32v6-latest - name: bazarr - ports: - - containerPort: 6767 - name: webui - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: bazarr - - mountPath: /movies - name: htpc-home - subPath: media/movies - - mountPath: /tv - name: htpc-home - subPath: media/tv - initContainers: - - command: - - sh - - -c - - until wget -qO- sonarr:8989/sonarr &> /dev/null && wget -qO- radarr:7878/radarr - &> /dev/null; do echo waiting for sonarr and radarr; sleep 2; done; - image: busybox - name: wait-for-sonarr-and-radarr - - command: - - sh - - -c - - "mkdir -p /htpc/bazarr/config\nexport RADARR_API_KEY=$(cat /htpc/radarr/config.xml - | sed -ne \"/ApiKey/{s/.*\\(.*\\)<\\/ApiKey>.*/\\1/p;q;}\")\nexport - SONARR_API_KEY=$(cat /htpc/sonarr/config.xml | sed -ne \"/ApiKey/{s/.*\\(.*\\)<\\/ApiKey>.*/\\1/p;q;}\")\ncat - << EOF > /htpc/bazarr/config/config.ini\n[sonarr]\napikey = ${SONARR_API_KEY}\nfull_update - = Daily\nip = sonarr\nonly_monitored = False\nbase_url = /sonarr\nssl = - False\nport = 8989\n\n[radarr]\napikey = ${RADARR_API_KEY}\nfull_update - = Daily\nip = radarr\nonly_monitored = False\nbase_url = /radarr\nssl = - False\nport = 7878\n\n[general]\nmovie_default_hi = False\nmovie_default_language - = []\nip = 0.0.0.0\nuse_scenename = True\nuse_postprocessing = False\nenabled_providers - = subscene,tvsubtitles\nauto_update = True\nport = 6767\nuse_radarr = True\nbase_url - = /bazarr/\npage_size = 25\nminimum_score_movie = 70\nbranch = master\nsingle_language - = False\nuse_sonarr = True\nserie_default_hi = False\npath_mappings_movie - = [['/movies', '/movies'], ['', ''], ['', ''], ['', ''], ['', '']]\nserie_default_enabled - = False\nmovie_default_enabled = False\nserie_default_language = []\npath_mappings - = [['/tv', '/tv'], ['', ''], ['', ''], ['', ''], ['', '']]\npostprocessing_cmd - = \nminimum_score = 90\ndebug = False\nuse_embedded_subs = True\nadaptive_searching - = False\nEOF\n" - image: busybox - name: config - volumeMounts: - - mountPath: /htpc - name: htpc-home - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: emby - name: emby - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: emby - template: - metadata: - labels: - app: htpc - run: emby - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: UID - value: "1000" - - name: GID - value: "1000" - image: emby/embyserver_arm32v7:latest - name: emby - ports: - - containerPort: 8096 - name: webui - protocol: TCP - - containerPort: 8920 - name: webui-ssl - protocol: TCP - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: emby - - mountPath: /tv - name: htpc-home - subPath: media/tv - - mountPath: /movies - name: htpc-home - subPath: media/movies - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: jackett - name: jackett - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: jackett - template: - metadata: - labels: - app: htpc - run: jackett - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/jackett:arm32v6-latest - name: jackett - ports: - - containerPort: 9117 - name: webui - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - - mountPath: /downloads - name: htpc-home - subPath: downloads - initContainers: - - args: - - 'echo start; [[ ! -f /config/Jackett/ServerConfig.json ]] && mkdir -p /config/Jackett/ - && echo ''{ "BasePathOverride": "/jackett"}'' > /config/Jackett/ServerConfig.json; - echo end;' - command: - - sh - - -c - image: busybox - name: config - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: radarr - name: radarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: radarr - template: - metadata: - labels: - app: htpc - run: radarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/radarr:arm32v6-latest - livenessProbe: - exec: - command: - - /bin/sh - - -c - - curl "http://localhost:7878/radarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' - \(.*\)<\/ApiKey>.*/\1/p;q;}' /radarr'> - /config/config.xml;echo end; - command: - - sh - - -c - image: busybox - name: config - securityContext: - runAsGroup: 1000 - runAsUser: 1000 - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: radarr - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: sonarr - name: sonarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: sonarr - template: - metadata: - labels: - app: htpc - run: sonarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/sonarr:arm32v6-latest - livenessProbe: - exec: - command: - - /bin/sh - - -c - - curl "http://localhost:8989/sonarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' - \(.*\)<\/ApiKey>.*/\1/p;q;}' /sonarr'> - /config/config.xml;echo end; - command: - - sh - - -c - image: busybox - name: config - securityContext: - runAsGroup: 1000 - runAsUser: 1000 - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: sonarr - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: transmission - name: transmission - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: transmission - template: - metadata: - labels: - app: htpc - run: transmission - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: WHITELIST - value: "" - - name: HOST_WHITELIST - value: "" - image: linuxserver/transmission:arm32v6-latest - name: transmission - ports: - - containerPort: 9091 - name: webui - protocol: TCP - - containerPort: 51413 - name: torrent-tcp - protocol: TCP - - containerPort: 51413 - name: torrent-udp - protocol: UDP - resources: {} - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: transmission - - mountPath: /downloads - name: htpc-home - subPath: downloads - - mountPath: /watch - name: htpc-home - subPath: watch - initContainers: - - command: - - sh - - -c - - chown -R 1000:1000 /config - image: busybox - name: chown - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: transmission - - mountPath: /downloads - name: htpc-home - subPath: downloads - - mountPath: /watch - name: htpc-home - subPath: watch - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - labels: - app: htpc - name: htpc - namespace: htpc -spec: - rules: - - http: - paths: - - backend: - service: - name: emby - port: - number: 8096 - path: / - pathType: Exact - - backend: - service: - name: jackett - port: - number: 9117 - path: /jackett - pathType: Exact - - backend: - service: - name: sonarr - port: - number: 8989 - path: /sonarr - pathType: Exact - - backend: - service: - name: radarr - port: - number: 7878 - path: /radarr - pathType: Exact - - backend: - service: - name: bazarr - port: - number: 6767 - path: /bazarr - pathType: Exact - - backend: - service: - name: transmission - port: - number: 9091 - path: /transmission - pathType: Exact diff --git a/install_x86_64.yaml b/install_x86_64.yaml deleted file mode 100644 index dd11b66..0000000 --- a/install_x86_64.yaml +++ /dev/null @@ -1,640 +0,0 @@ -# This is an auto-generated file. DO NOT EDIT -apiVersion: v1 -kind: Namespace -metadata: - labels: - app: htpc - name: htpc ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: bazarr - namespace: htpc -spec: - ports: - - name: webui - port: 6767 - protocol: TCP - targetPort: 6767 - selector: - app: htpc - run: bazarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: emby - namespace: htpc -spec: - ports: - - name: webui - port: 8096 - protocol: TCP - targetPort: 8096 - selector: - app: htpc - run: emby ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: jackett - namespace: htpc -spec: - ports: - - name: webui - port: 9117 - protocol: TCP - targetPort: 9117 - selector: - app: htpc - run: jackett ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: radarr - namespace: htpc -spec: - ports: - - name: webui - port: 7878 - protocol: TCP - targetPort: 7878 - selector: - app: htpc - run: radarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: sonarr - namespace: htpc -spec: - ports: - - name: webui - port: 8989 - protocol: TCP - targetPort: 8989 - selector: - app: htpc - run: sonarr ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: htpc - name: transmission - namespace: htpc -spec: - ports: - - name: webui - port: 9091 - protocol: TCP - targetPort: 9091 - selector: - app: htpc - run: transmission ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: bazarr - name: bazarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: bazarr - template: - metadata: - labels: - app: htpc - run: bazarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/bazarr:1.1.0 - name: bazarr - ports: - - containerPort: 6767 - name: webui - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: bazarr - - mountPath: /movies - name: htpc-home - subPath: media/movies - - mountPath: /tv - name: htpc-home - subPath: media/tv - initContainers: - - command: - - sh - - -c - - until wget -qO- sonarr:8989/sonarr &> /dev/null && wget -qO- radarr:7878/radarr - &> /dev/null; do echo waiting for sonarr and radarr; sleep 2; done; - image: busybox - name: wait-for-sonarr-and-radarr - - command: - - sh - - -c - - "mkdir -p /htpc/bazarr/config\nexport RADARR_API_KEY=$(cat /htpc/radarr/config.xml - | sed -ne \"/ApiKey/{s/.*\\(.*\\)<\\/ApiKey>.*/\\1/p;q;}\")\nexport - SONARR_API_KEY=$(cat /htpc/sonarr/config.xml | sed -ne \"/ApiKey/{s/.*\\(.*\\)<\\/ApiKey>.*/\\1/p;q;}\")\ncat - << EOF > /htpc/bazarr/config/config.ini\n[sonarr]\napikey = ${SONARR_API_KEY}\nfull_update - = Daily\nip = sonarr\nonly_monitored = False\nbase_url = /sonarr\nssl = - False\nport = 8989\n\n[radarr]\napikey = ${RADARR_API_KEY}\nfull_update - = Daily\nip = radarr\nonly_monitored = False\nbase_url = /radarr\nssl = - False\nport = 7878\n\n[general]\nmovie_default_hi = False\nmovie_default_language - = []\nip = 0.0.0.0\nuse_scenename = True\nuse_postprocessing = False\nenabled_providers - = subscene,tvsubtitles\nauto_update = True\nport = 6767\nuse_radarr = True\nbase_url - = /bazarr/\npage_size = 25\nminimum_score_movie = 70\nbranch = master\nsingle_language - = False\nuse_sonarr = True\nserie_default_hi = False\npath_mappings_movie - = [['/movies', '/movies'], ['', ''], ['', ''], ['', ''], ['', '']]\nserie_default_enabled - = False\nmovie_default_enabled = False\nserie_default_language = []\npath_mappings - = [['/tv', '/tv'], ['', ''], ['', ''], ['', ''], ['', '']]\npostprocessing_cmd - = \nminimum_score = 90\ndebug = False\nuse_embedded_subs = True\nadaptive_searching - = False\nEOF\n" - image: busybox - name: config - volumeMounts: - - mountPath: /htpc - name: htpc-home - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: emby - name: emby - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: emby - template: - metadata: - labels: - app: htpc - run: emby - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: UID - value: "1000" - - name: GID - value: "1000" - image: emby/embyserver:4.8.0.5 - name: emby - ports: - - containerPort: 8096 - name: webui - protocol: TCP - - containerPort: 8920 - name: webui-ssl - protocol: TCP - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: emby - - mountPath: /tv - name: htpc-home - subPath: media/tv - - mountPath: /movies - name: htpc-home - subPath: media/movies - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: jackett - name: jackett - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: jackett - template: - metadata: - labels: - app: htpc - run: jackett - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/jackett:0.20.1307 - name: jackett - ports: - - containerPort: 9117 - name: webui - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - - mountPath: /downloads - name: htpc-home - subPath: downloads - initContainers: - - args: - - 'echo start; [[ ! -f /config/Jackett/ServerConfig.json ]] && mkdir -p /config/Jackett/ - && echo ''{ "BasePathOverride": "/jackett"}'' > /config/Jackett/ServerConfig.json; - echo end;' - command: - - sh - - -c - image: busybox - name: config - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: jackett - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: radarr - name: radarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: radarr - template: - metadata: - labels: - app: htpc - run: radarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/radarr:4.1.0 - livenessProbe: - exec: - command: - - /bin/sh - - -c - - curl "http://localhost:7878/radarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' - \(.*\)<\/ApiKey>.*/\1/p;q;}' /radarr'> - /config/config.xml;echo end; - command: - - sh - - -c - image: busybox - name: config - securityContext: - runAsGroup: 1000 - runAsUser: 1000 - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: radarr - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: sonarr - name: sonarr - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: sonarr - template: - metadata: - labels: - app: htpc - run: sonarr - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - image: linuxserver/sonarr:3.0.8.1507-ls149 - livenessProbe: - exec: - command: - - /bin/sh - - -c - - curl "http://localhost:8989/sonarr/api/health?ApiKey=$(sed -ne '/ApiKey/{s/.*\(.*\)<\/ApiKey>.*/\1/p;q;}' - \(.*\)<\/ApiKey>.*/\1/p;q;}' /sonarr'> - /config/config.xml;echo end; - command: - - sh - - -c - image: busybox - name: config - securityContext: - runAsGroup: 1000 - runAsUser: 1000 - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: sonarr - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: htpc - run: transmission - name: transmission - namespace: htpc -spec: - replicas: 1 - selector: - matchLabels: - app: htpc - run: transmission - template: - metadata: - labels: - app: htpc - run: transmission - spec: - containers: - - env: - - name: TZ - value: Pacific/Auckland - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: WHITELIST - value: "" - - name: HOST_WHITELIST - value: "" - image: linuxserver/transmission:3.00-r5-ls127 - name: transmission - ports: - - containerPort: 9091 - name: webui - protocol: TCP - - containerPort: 51413 - name: torrent-tcp - protocol: TCP - - containerPort: 51413 - name: torrent-udp - protocol: UDP - resources: {} - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: transmission - - mountPath: /downloads - name: htpc-home - subPath: downloads - - mountPath: /watch - name: htpc-home - subPath: watch - initContainers: - - command: - - sh - - -c - - chown -R 1000:1000 /config - image: busybox - name: chown - volumeMounts: - - mountPath: /config - name: htpc-home - subPath: transmission - - mountPath: /downloads - name: htpc-home - subPath: downloads - - mountPath: /watch - name: htpc-home - subPath: watch - securityContext: - fsGroup: 1000 - volumes: - - hostPath: - path: /opt/htpc - type: DirectoryOrCreate - name: htpc-home ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - labels: - app: htpc - name: htpc - namespace: htpc -spec: - rules: - - http: - paths: - - backend: - service: - name: emby - port: - number: 8096 - path: / - pathType: Exact - - backend: - service: - name: jackett - port: - number: 9117 - path: /jackett - pathType: Exact - - backend: - service: - name: sonarr - port: - number: 8989 - path: /sonarr - pathType: Exact - - backend: - service: - name: radarr - port: - number: 7878 - path: /radarr - pathType: Exact - - backend: - service: - name: bazarr - port: - number: 6767 - path: /bazarr - pathType: Exact - - backend: - service: - name: transmission - port: - number: 9091 - path: /transmission - pathType: Exact diff --git a/overlays/armhf/kustomization.yaml b/overlays/armhf/kustomization.yaml index 1de50e3..403a9f6 100644 --- a/overlays/armhf/kustomization.yaml +++ b/overlays/armhf/kustomization.yaml @@ -15,8 +15,8 @@ images: newTag: arm32v7-latest - name: linuxserver/transmission newTag: arm32v7-latest - - name: emby/embyserver - newName: emby/embyserver_arm32v7 + - name: linuxserver/plex + newTag: arm32v7-latest newTag: latest - name: linuxserver/prowlarr newTag: arm32v7-nightly diff --git a/overlays/x86/kustomization.yaml b/overlays/x86/kustomization.yaml deleted file mode 100644 index cebbe4f..0000000 --- a/overlays/x86/kustomization.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- ../../base - -images: - - name: linuxserver/jackett - newTag: "0.20.1307" - - name: linuxserver/sonarr - newTag: 3.0.8.1507-ls149 - - name: linuxserver/radarr - newTag: "4.1.0" - - name: linuxserver/bazarr - newTag: "1.1.0" - - name: linuxserver/transmission - newTag: 3.00-r5-ls127 - - name: emby/embyserver - newTag: "4.8.0.5" diff --git a/overlays/x86_64-with-argocd/kustomization.yaml b/overlays/x86_64-with-argocd/kustomization.yaml deleted file mode 100644 index 197e530..0000000 --- a/overlays/x86_64-with-argocd/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- ../../argocd -- ../x86 diff --git a/update-manifests.sh b/update-manifests.sh deleted file mode 100755 index 14b8bd5..0000000 --- a/update-manifests.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -x - -SRCROOT="$( CDPATH='' cd -- "$(dirname "$0")" && pwd -P )" -AUTOGENMSG="# This is an auto-generated file. DO NOT EDIT" - -echo "${AUTOGENMSG}" > "${SRCROOT}/install_x86_64.yaml" -kustomize build "${SRCROOT}/overlays/x86" >> "${SRCROOT}/install_x86_64.yaml" - -echo "${AUTOGENMSG}" > "${SRCROOT}/install_armhf.yaml" -kustomize build "${SRCROOT}/overlays/armhf" >> "${SRCROOT}/install_armhf.yaml" - -echo "${AUTOGENMSG}" > "${SRCROOT}/install_argocd.yaml" -kustomize build "${SRCROOT}/argocd" >> "${SRCROOT}/install_argocd.yaml"