Migrated PVR toolset successfully w/ API passthrough

This commit is contained in:
Danny Bessems 2020-10-16 09:10:23 +02:00
parent f2863849fa
commit 323bc54f3e
3 changed files with 146 additions and 11 deletions

View File

@ -20,7 +20,7 @@ curl -sfL https://get.k3s.io | K3S_URL=https://<fqdn or ip>:6443 K3S_TOKEN=<valu
Install Rancher's [System Upgrade Controller](https://rancher.com/docs/k3s/latest/en/upgrades/automated/):
```
kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.4.0/system-upgrade-controller.yaml
kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.6.2/system-upgrade-controller.yaml
```
Apply a [server (master node)](https://code.spamasaurus.com/djpbessems/Kubernetes.K3s.installLog/src/branch/master/system/UpgradeController/plan-Server.yml) and [agent (worker node)](https://code.spamasaurus.com/djpbessems/Kubernetes.K3s.installLog/src/branch/master/system/UpgradeController/plan-Agent.yml) plan:
```
@ -229,24 +229,47 @@ kubectl apply -f services/Lighttpd/configMap_lighttpd.yml
kubectl apply -f services/Lighttpd/deploy_Lighttpd.yml
kubectl apply -f services/Lighttpd/cronJob-Spotweb.yml
```
##### 4.9) [Shaarli](https://github.com/shaarli/Shaarli) <small>(bookmarks/notes)</small>
##### 4.9) PVR `namespace` <small>(automated media management)</small>
*Containers use shared resources to be able to interact with downloaded files*
```
kubectl apply -f services/PVR/persistentVolumeClaim-PVR.yml
kubectl apply -f services/PVR/storageClass-PVR.yml
```
###### 4.9.1) [NZBHydra]() <small>(index aggregator)</small>
```
kubectl apply -f services/PVR/deploy-NZBHydra.yml
```
###### 4.9.2) [Plex]() <small>(media library)</small>
~kubectl apply -f services/PVR/deploy-Plex.yml~
###### 4.9.3) [Radarr]() <small>(movie management)</small>
```
kubectl apply -f services/PVR/deploy-Radarr.yml
```
###### 4.9.4) [Readarr]() <small>(book management)</small>
```
kubectl apply -f services/PVR/deploy-Readarr.yml
```
###### 4.9.5) [SABnzbd]() <small>(download client)</small>
```
kubectl apply -f services/PVR/deploy-SABnzbd.yml
```
###### 4.9.6) [Sonarr]() <small>(tv management)</small>
```
kubectl apply -f services/PVR/deploy-Sonarr.yml
```
##### 4.10) [Shaarli](https://github.com/shaarli/Shaarli) <small>(bookmarks/notes)</small>
```
kubectl apply -f services/Shaarli/deploy_Shaarli.yml
```
##### 4.10) [Theia](https://theia-ide.org/) <small>(web IDE)</small>
##### 4.11) [Theia](https://theia-ide.org/) <small>(web IDE)</small>
```
kubectl apply -f services/Theia/deploy_Theia.yml
```
##### 4.11) [Traefik-Certs-Dumper](https://github.com/ldez/traefik-certs-dumper) <small>(certificate tooling)</small>
##### 4.12) [Traefik-Certs-Dumper](https://github.com/ldez/traefik-certs-dumper) <small>(certificate tooling)</small>
```
kubectl apply -f services/TraefikCertsDumper/deploy-TraefikCertsDumper.yml
```
##### 4.12) External `Endpoint`s
###### 4.12.1) NZBHydra, Plex, Radarr, SABnzbd & Sonarr <small>(automated media management)</small>
*Running externally, due to connectivity requirements*
```
kubectl apply -f services/PVR/deploy-PVR.yml
```
### 5) Miscellaneous
*Various notes/useful links*

View File

@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: radarr
image: linuxserver/radarr
image: linuxserver/radarr:nightly
ports:
- name: web
containerPort: 7878

View File

@ -0,0 +1,112 @@
apiVersion: v1
kind: Service
metadata:
name: readarr
namespace: pvr
spec:
ports:
- protocol: TCP
name: web
port: 8787
selector:
app: readarr
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: readarr
namespace: pvr
labels:
app: readarr
spec:
replicas: 1
selector:
matchLabels:
app: readarr
template:
metadata:
labels:
app: readarr
spec:
containers:
- name: readarr
image: hotio/readarr:nightly
env:
- name: DEBUG
value: 'yes'
ports:
- name: web
containerPort: 8787
volumeMounts:
- mountPath: /config
name: flexvolsmb-readarr-config
- mountPath: /downloads
name: smb-pvr-volatile
subPath: downloads
volumes:
- name: flexvolsmb-readarr-config
persistentVolumeClaim:
claimName: flexvolsmb-readarr-config
- name: smb-pvr-volatile
persistentVolumeClaim:
claimName: smb-pvr-volatile
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: readarr
namespace: pvr
spec:
entryPoints:
- websecure
routes:
- match: Host(`books.pvr.spamasaurus.com`)
kind: Rule
services:
- name: readarr
port: 8787
middlewares:
- name: 2fa-authentication@file
- name: security-headers@file
- name: compression@file
tls:
options:
name: defaults@file
certResolver: default
domains:
- main: '*.pvr.spamasaurus.com'
sans:
- 'pvr.spamasaurus.com'
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-readarr-config
namespace: pvr
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-readarr-config
flexVolume:
driver: mount/smb
secretRef:
name: smb-secret
options:
opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,iocharset=utf8,nobrl
server: 192.168.11.225
share: /K3s.Volumes/readarr/config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-readarr-config
namespace: pvr
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-readarr-config
resources:
requests:
storage: 1Gi