From 5f7a9e21120f65430227a435988e6c25ff1f27c2 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 9 Nov 2022 11:43:38 +0100 Subject: [PATCH] Trilium++;Lidarr--;Readarr--;Update Traefik configuration --- ingress/Traefik2.x/chart-values.yml | 8 ++--- ingress/Traefik2.x/configMap-Traefik.yml | 4 --- services/PVR/{ => decom}/deploy-Lidarr.yml | 0 services/PVR/{ => decom}/deploy-Readarr.yml | 0 services/PVR/deploy-SABnzbd.yml | 4 --- services/Trilium/_namespace-Trilium.yml | 4 +++ services/Trilium/deployment-Trilium.yml | 36 +++++++++++++++++++ services/Trilium/ingressRoute-Trilium.yml | 18 ++++++++++ services/Trilium/persistentVolume-Trilium.yml | 19 ++++++++++ .../Trilium/persistentVolumeClaim-Trilium.yml | 13 +++++++ services/Trilium/sealedSecret-SMBSecret.yml | 18 ++++++++++ services/Trilium/service-Trilium.yml | 13 +++++++ 12 files changed, 123 insertions(+), 14 deletions(-) rename services/PVR/{ => decom}/deploy-Lidarr.yml (100%) rename services/PVR/{ => decom}/deploy-Readarr.yml (100%) create mode 100644 services/Trilium/_namespace-Trilium.yml create mode 100644 services/Trilium/deployment-Trilium.yml create mode 100644 services/Trilium/ingressRoute-Trilium.yml create mode 100644 services/Trilium/persistentVolume-Trilium.yml create mode 100644 services/Trilium/persistentVolumeClaim-Trilium.yml create mode 100644 services/Trilium/sealedSecret-SMBSecret.yml create mode 100644 services/Trilium/service-Trilium.yml diff --git a/ingress/Traefik2.x/chart-values.yml b/ingress/Traefik2.x/chart-values.yml index c385f51..e7cd07d 100644 --- a/ingress/Traefik2.x/chart-values.yml +++ b/ingress/Traefik2.x/chart-values.yml @@ -3,10 +3,6 @@ image: # tag: '2.4.8' ports: - rtmp: - port: 1935 - exposedPort: 1935 - expose: true web: redirectTo: websecure @@ -27,12 +23,12 @@ persistence: env: - name: CF_API_EMAIL - valueFrom: + valueFrom: secretKeyRef: name: traefik-cloudflare key: CF_API_EMAIL - name: CF_API_KEY - valueFrom: + valueFrom: secretKeyRef: name: traefik-cloudflare key: CF_API_KEY diff --git a/ingress/Traefik2.x/configMap-Traefik.yml b/ingress/Traefik2.x/configMap-Traefik.yml index 19a674b..8b4ea8b 100644 --- a/ingress/Traefik2.x/configMap-Traefik.yml +++ b/ingress/Traefik2.x/configMap-Traefik.yml @@ -9,8 +9,6 @@ data: checkNewVersion: true sendAnonymousUsage: true entryPoints: - rtmp: - address: :1935 web: address: :8000 websecure: @@ -73,8 +71,6 @@ data: resolvers: - 1.1.1.1:53 - 1.0.0.1:53 - pilot: - dashboard: false serversTransport: insecureSkipVerify: true dynamic.yml: | diff --git a/services/PVR/deploy-Lidarr.yml b/services/PVR/decom/deploy-Lidarr.yml similarity index 100% rename from services/PVR/deploy-Lidarr.yml rename to services/PVR/decom/deploy-Lidarr.yml diff --git a/services/PVR/deploy-Readarr.yml b/services/PVR/decom/deploy-Readarr.yml similarity index 100% rename from services/PVR/deploy-Readarr.yml rename to services/PVR/decom/deploy-Readarr.yml diff --git a/services/PVR/deploy-SABnzbd.yml b/services/PVR/deploy-SABnzbd.yml index 18ba831..db052a0 100644 --- a/services/PVR/deploy-SABnzbd.yml +++ b/services/PVR/deploy-SABnzbd.yml @@ -31,10 +31,6 @@ spec: containers: - name: sabnzbd image: bv11-cr01.bessems.eu/proxy/linuxserver/sabnzbd - command: ["/bin/sh"] - args: - - -c - - "sed -e '/-server/c\ --config-file /config --server \":8080\"' -i /etc/services.d/sabnzbd/run;/init" ports: - name: web containerPort: 8080 diff --git a/services/Trilium/_namespace-Trilium.yml b/services/Trilium/_namespace-Trilium.yml new file mode 100644 index 0000000..0de267e --- /dev/null +++ b/services/Trilium/_namespace-Trilium.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: trilium diff --git a/services/Trilium/deployment-Trilium.yml b/services/Trilium/deployment-Trilium.yml new file mode 100644 index 0000000..c22c5f4 --- /dev/null +++ b/services/Trilium/deployment-Trilium.yml @@ -0,0 +1,36 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: trilium + name: trilium + namespace: trilium +spec: +# strategy: +# type: Recreate + replicas: 1 + selector: + matchLabels: + app: trilium + template: + metadata: + labels: + app: trilium + spec: + containers: + - image: bv11-cr01.bessems.eu/proxy/zadam/trilium:0.56-latest + name: trilium + env: + - name: TRILIUM_PORT + value: '8080' + ports: + - containerPort: 8080 + name: web + volumeMounts: + - mountPath: /home/node/trilium-data + name: flexvolsmb-trilium-data + volumes: + - name: flexvolsmb-trilium-data + persistentVolumeClaim: + claimName: flexvolsmb-trilium-data diff --git a/services/Trilium/ingressRoute-Trilium.yml b/services/Trilium/ingressRoute-Trilium.yml new file mode 100644 index 0000000..795bb81 --- /dev/null +++ b/services/Trilium/ingressRoute-Trilium.yml @@ -0,0 +1,18 @@ +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: trilium + namespace: trilium +spec: + entryPoints: + - websecure + routes: + - match: Host(`mindmap.spamasaurus.com`) + kind: Rule + services: + - name: trilium + port: 8080 + middlewares: + - name: security-headers@file + - name: compression@file diff --git a/services/Trilium/persistentVolume-Trilium.yml b/services/Trilium/persistentVolume-Trilium.yml new file mode 100644 index 0000000..5b42463 --- /dev/null +++ b/services/Trilium/persistentVolume-Trilium.yml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: flexvolsmb-trilium-data +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + storageClassName: flexvolsmb-trilium-data + flexVolume: + driver: mount/smb + secretRef: + name: smb-secret + options: + opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,iocharset=utf8,nobrl + server: 192.168.11.225 + share: /K3s.Volumes/trilium/data diff --git a/services/Trilium/persistentVolumeClaim-Trilium.yml b/services/Trilium/persistentVolumeClaim-Trilium.yml new file mode 100644 index 0000000..0f4e13e --- /dev/null +++ b/services/Trilium/persistentVolumeClaim-Trilium.yml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: flexvolsmb-trilium-data + namespace: trilium +spec: + accessModes: + - ReadWriteMany + storageClassName: flexvolsmb-trilium-data + resources: + requests: + storage: 1Gi diff --git a/services/Trilium/sealedSecret-SMBSecret.yml b/services/Trilium/sealedSecret-SMBSecret.yml new file mode 100644 index 0000000..b8c6d38 --- /dev/null +++ b/services/Trilium/sealedSecret-SMBSecret.yml @@ -0,0 +1,18 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: smb-secret + namespace: trilium +spec: + encryptedData: + password: AgCNyrvo4UUhMiKBSft6AFQKdKhmBnmVydvJkOEQ3z04AG/gwZXB1lgSk6dcV5q/ssLD5qmgdBoqqJBf5bvSyJHoQxckNwL8OqOrq+61BUnV4HI+d1mEHDpn3NklOJC7FayluIwy9p5hIpfsWWopcVz9C+bantPxzMw6cjlGDvdA4JmKgJxOabL46YhwTDLxKhUA6Xtq/5j3Yv/osDSDN5pNmblZOR7fQnO9XRZFFjAuigqAC5JYxpRbN0nc5NdA2oym8T6t2IHlBHQ0LEPpoqm+K2ZwHbe+viTeUuMtxOjl32E5OsnoU4gxgXT8qgo6dnppT6PRUICenzFU9mO1MCVXYuo9c4LAUtAqil6bGlehL1XGcWkwE+/ZT/8PjADdds1DD/cAyTl/cSF23RB1eoNmAYcXKxhq30hrI0ewuSeQT7FJTuou+hnA9EiqH3O5En2LHAlmWFBznokzYu0MZWmPC0dvkzy5A4SafVSduc//DfDRjBwoNNnjddN1hu32dKfQHJdyCR2fWtuwC8qUUXIPtkmCgbgPI7riJB2pt2cpDkuznogdAFV25+NagPG+2MhSGKYRMAnsykmN8wPGm5TM6Xl4toooNd74Auc3XIhN/6B9uTMKEF+3w8d77z3uBUK38NfCCrR8J/Rh2JfHMqbu9a4HqchCijfsND4y/0Oe9cUBY34J/aRgz6FTSpTf3vcTEOYPFX1cmTSCy9osksc/ + username: AgBibFjLQhkklrFJMAW58kKSfenBXOyL302FabKzyAf3xWGVx2BSUohxdKbs1dVrjeOxU6A5kxQ9RyuNCHmSRcq1Kq6hcbt3S2ZJkdakE9BXw1iFIUPPcFRvW2Vv4IsZEdOZDyYajug4EzqAZueCyKXZPpsYyRzHGiXSdGqG9StIq06Z32c6fuzND3QNpyD5VZuKi4Q5Geikj+kG0LoHPKRcOq+rAVd1qScL53C/Qi3j2jm5nb51d4brsG+qllQkWUcUn1t/f1iSL2buhvLVhZ/qeb1UtJ3Ribk9v20nJQetE9h5e73CGOhUfT82DWaCT9Mzz5Ciiv+e8VNEXU8/uR6cyS79d1v+X4LYuDYsSupBzdizbmlM25XjVKGlt/MLkWmVY1QN3UDO6aBwF6SVp3coDXGoceKrDl5cZxkPhnUo0whoHPCLs3Qrfj0vlyzZUMW9f+uSC0nIoru9u9znHoEB8AEkLlDBYrXpY9DO5L1CMymp63pVt7Ts6YzynAD3Ak8noVksIULRgJaCqbnGRPqzWkzHG8eMmujXx4kDqaS+gWV8wfj3rzpWbr+oIVtYgE3q1fBj0V+L8D3UUzRVV27jYGgUV9UiIkND2GLDgAbLVq6TAIi3rur3WkF08NXYfOqEaLGrXjX7Q/V3l/sW6RME8hQi20hB7w/4+p3d79EHtWOKmKV77mbFYUne7ylbOPOK13SOeX8= + template: + data: null + metadata: + creationTimestamp: null + name: smb-secret + namespace: trilium + type: mount/smb + diff --git a/services/Trilium/service-Trilium.yml b/services/Trilium/service-Trilium.yml new file mode 100644 index 0000000..cf34d2c --- /dev/null +++ b/services/Trilium/service-Trilium.yml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: trilium + namespace: trilium +spec: + ports: + - protocol: TCP + name: web + port: 8080 + selector: + app: trilium