From af0b471c59c30724cff818c32c7febef40f2172e Mon Sep 17 00:00:00 2001 From: Igor Date: Sat, 12 Feb 2022 15:18:09 +0200 Subject: [PATCH] Version upgrades (#43) --- helm/Makefile | 3 ++ helm/base/templates/deployment.yaml | 3 ++ helm/base/values.yaml | 2 ++ helm/code-server.yaml | 2 +- helm/grafana.yaml | 2 +- helm/httpbin.yaml | 10 +++--- helm/jackett.yaml | 2 +- helm/messenger.yaml | 41 ++++++++++++++++++++++++ helm/plex.yaml | 2 +- helm/prometheus.yaml | 9 +++++- helm/qbittorrent.yaml | 2 +- helm/radarr.yaml | 2 +- helm/rsnapshot.yaml | 48 +++++++++++++++++++---------- helm/sonarr.yaml | 2 +- helm/syncthing.yaml | 2 +- helm/tautulli.yaml | 2 +- helm/traefik/Chart.lock | 6 ++-- helm/traefik/Chart.yaml | 2 +- helm/traefik/values.yaml | 6 ++++ helm/webdav.yaml | 2 +- 20 files changed, 113 insertions(+), 37 deletions(-) create mode 100644 helm/messenger.yaml diff --git a/helm/Makefile b/helm/Makefile index 0a5af7f1..d606af4a 100644 --- a/helm/Makefile +++ b/helm/Makefile @@ -26,6 +26,7 @@ update-base: ## Update apps that use base chart helm upgrade --install qbittorrent ./base/ --values qbittorrent.yaml helm upgrade --install radarr ./base/ --values radarr.yaml helm upgrade --install sonarr ./base/ --values sonarr.yaml + helm upgrade --install rsnapshot ./base/ --values rsnapshot.yaml helm upgrade --install syncthing ./base/ --values syncthing.yaml helm upgrade --install tautulli ./base/ --values tautulli.yaml helm upgrade --install wakatime-exporter ./base/ --values wakatime-exporter.yaml @@ -42,6 +43,8 @@ update-traefik: ## Update Traefik cd traefik; \ helm dependency update; \ helm upgrade --install traefik . + +update-traefik-sso: ## Update Traefik cd traefik-sso; \ helm dependency update; \ helm upgrade --install traefik-sso . diff --git a/helm/base/templates/deployment.yaml b/helm/base/templates/deployment.yaml index cb0033fc..8ede9287 100644 --- a/helm/base/templates/deployment.yaml +++ b/helm/base/templates/deployment.yaml @@ -13,6 +13,9 @@ spec: app: {{ .Release.Name }} name: {{ .Release.Name }} spec: + {{- if .Values.nodeName }} + nodeName: {{ .Values.nodeName }} + {{- end }} volumes: {{- if .Values.volumes }} {{- toYaml .Values.volumes | nindent 6}} diff --git a/helm/base/values.yaml b/helm/base/values.yaml index d2d4576a..fe73efa5 100644 --- a/helm/base/values.yaml +++ b/helm/base/values.yaml @@ -5,6 +5,8 @@ image: tag: pullPolicy: IfNotPresent +nodeName: kira-pc + services: - type: LoadBalancer suffix: diff --git a/helm/code-server.yaml b/helm/code-server.yaml index 02bb6d7c..293789fe 100644 --- a/helm/code-server.yaml +++ b/helm/code-server.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/code-server - tag: 3.12.0 + tag: 4.0.1 services: - type: LoadBalancer diff --git a/helm/grafana.yaml b/helm/grafana.yaml index dc61cf82..9d7fa66b 100644 --- a/helm/grafana.yaml +++ b/helm/grafana.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: grafana/grafana - tag: 8.2.5 + tag: 8.3.5 services: - type: LoadBalancer diff --git a/helm/httpbin.yaml b/helm/httpbin.yaml index f6d5b839..a6ed7b03 100644 --- a/helm/httpbin.yaml +++ b/helm/httpbin.yaml @@ -14,10 +14,10 @@ ingressRoutes: web: match: Host(`test.hobroker.me`) port: 8080 -# -# websecure: -# match: Host(`test.hobroker.me`) -# port: 8080 -# middlewares: + + websecure: + match: Host(`test.hobroker.me`) + port: 8080 + middlewares: # - name: traefik-sso-forward-auth # - name: traefik-sso-rate-limit diff --git a/helm/jackett.yaml b/helm/jackett.yaml index 25e0ccea..4f2d97f6 100644 --- a/helm/jackett.yaml +++ b/helm/jackett.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/jackett - tag: 0.20.63 + tag: 0.20.555 services: - type: LoadBalancer diff --git a/helm/messenger.yaml b/helm/messenger.yaml new file mode 100644 index 00000000..bf5ed7b2 --- /dev/null +++ b/helm/messenger.yaml @@ -0,0 +1,41 @@ +replicaCount: 1 + +image: + repository: ghcr.io/hobroker/messenger + tag: latest + pullPolicy: Always + +services: + - type: LoadBalancer + ports: + - port: 8182 + containerPort: 3000 + +volumes: + - name: messenger-secret + secret: + secretName: messenger-secret + +volumeMounts: + - name: messenger-secret + mountPath: "/usr/src/app/gcs-credentials.json" + subPath: gcs-credentials.json + readOnly: true + +env: + - name: PORT + value: "3000" + - name: GCS_KEY_FILENAME + value: "./gcs-credentials.json" + - name: GCS_BUCKET_NAME + value: "selfhosted-messenger" + - name: TELEGRAM_TOKEN + valueFrom: + secretKeyRef: + name: messenger-telegram-secret + key: TELEGRAM_TOKEN + - name: TELEGRAM_CHAT_ID + valueFrom: + secretKeyRef: + name: messenger-telegram-secret + key: TELEGRAM_CHAT_ID diff --git a/helm/plex.yaml b/helm/plex.yaml index 39e18d6f..4fe7d7ed 100644 --- a/helm/plex.yaml +++ b/helm/plex.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/plex - tag: 1.24.5 + tag: 1.25.3 services: - type: LoadBalancer diff --git a/helm/prometheus.yaml b/helm/prometheus.yaml index 33317028..8aca5214 100644 --- a/helm/prometheus.yaml +++ b/helm/prometheus.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: prom/prometheus - tag: v2.31.1 + tag: v2.33.3 services: - type: LoadBalancer @@ -53,3 +53,10 @@ configmaps: static_configs: - targets: - wakatime-exporter:9212 + - job_name: rclone + static_configs: + - targets: + - 192.168.29.242:5572 + basic_auth: + username: 'admin' + password: 'admin' diff --git a/helm/qbittorrent.yaml b/helm/qbittorrent.yaml index c3e48b38..3ee2e10c 100644 --- a/helm/qbittorrent.yaml +++ b/helm/qbittorrent.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/qbittorrent - tag: 20.04.1 + tag: 4.4.0 services: - type: LoadBalancer diff --git a/helm/radarr.yaml b/helm/radarr.yaml index 2f71ff9c..e187a2e2 100644 --- a/helm/radarr.yaml +++ b/helm/radarr.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/radarr - tag: version-3.2.2.5080 + tag: 4.0.4 services: - type: LoadBalancer diff --git a/helm/rsnapshot.yaml b/helm/rsnapshot.yaml index 0f1f97e8..1b5dfec4 100644 --- a/helm/rsnapshot.yaml +++ b/helm/rsnapshot.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/rsnapshot - tag: latest + tag: 1.4.3 volumes: - name: rsnapshot-config @@ -34,10 +34,18 @@ volumeMounts: - name: rsnapshot-configmap subPath: snap.sh mountPath: "/config/snap.sh" + - name: rsnapshot-configmap + subPath: add-curl + mountPath: "/config/custom-cont-init.d/31-add-curl" env: - name: TZ value: "Europe/Chisinau" + - name: MESSENGER_BASE_URL + value: "http://messenger:8182" + +waitForServices: + - messenger configmaps: rsnapshot-configmap: @@ -75,7 +83,7 @@ configmaps: loglevel 3 logfile /config/rsnapshot.log lockfile /var/run/rsnapshot.pid - link_dest 1 + link_dest 0 backup /data/photos/camera/ wdata/ backup /data/photos/pictures wdata/ @@ -86,39 +94,45 @@ configmaps: set -e - COUNTER_FILE="/config/.snap" EVERY=6 # locals - _count="" + _count=$(curl -s "$MESSENGER_BASE_URL/gcs/rsnapshot/1/increment") - if test -f "$COUNTER_FILE"; then - _count=$(cat $COUNTER_FILE) - else - _count="1" - echo "$_count" > $COUNTER_FILE - fi + log() { + echo "> $1" + curl -s -G "$MESSENGER_BASE_URL/telegram/rsnapshot" --data-urlencode "data=running backup: $1" + } - echo "$_count" + echo "$(date) - $_count" + + if [ "$(( _count % (EVERY*7*30*12) ))" -eq 0 ]; then + log yearly + rsnapshot yearly + fi if [ "$(( _count % (EVERY*7*30) ))" -eq 0 ]; then - echo "> monthly" + log monthly rsnapshot monthly fi if [ "$(( _count % (EVERY*7) ))" -eq 0 ]; then - echo "> weekly" + log weekly rsnapshot weekly fi if [ "$(( _count % EVERY ))" -eq 0 ]; then - echo "> daily" + log daily rsnapshot daily fi - echo "> hourly" + log hourly rsnapshot hourly - echo "done" + echo "$(date) - done" - echo $((_count+1)) > $COUNTER_FILE + add-curl: |- + #!/usr/bin/with-contenv bash + apk add curl + echo $MESSENGER_BASE_URL + curl -s -G "$MESSENGER_BASE_URL/telegram/rsnapshot" --data-urlencode "data=started" diff --git a/helm/sonarr.yaml b/helm/sonarr.yaml index a957338a..ef927f6d 100644 --- a/helm/sonarr.yaml +++ b/helm/sonarr.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/sonarr - tag: version-3.0.6.1342 + tag: 3.0.6 services: - type: LoadBalancer diff --git a/helm/syncthing.yaml b/helm/syncthing.yaml index d12f19d5..51da2d4e 100644 --- a/helm/syncthing.yaml +++ b/helm/syncthing.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: linuxserver/syncthing - tag: 1.18.4 + tag: 1.19.0 services: - type: LoadBalancer diff --git a/helm/tautulli.yaml b/helm/tautulli.yaml index af37305d..4c4365fc 100644 --- a/helm/tautulli.yaml +++ b/helm/tautulli.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: tautulli/tautulli - tag: v2.7.7 + tag: v2.9.3 services: - type: LoadBalancer diff --git a/helm/traefik/Chart.lock b/helm/traefik/Chart.lock index f71d2d7f..326a2fa6 100644 --- a/helm/traefik/Chart.lock +++ b/helm/traefik/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: traefik repository: https://helm.traefik.io/traefik - version: 10.3.6 -digest: sha256:0ad98c36559bc1ab6007bc9db9238a9b7ab5050abce77e4da03b179b744dda3c -generated: "2021-10-03T13:58:20.548543+03:00" + version: 10.9.1 +digest: sha256:732b0363832aee5e5fab919d302ad6d68af0cc3c107abc54e1696893904d5ed1 +generated: "2022-01-26T15:20:08.656742+02:00" diff --git a/helm/traefik/Chart.yaml b/helm/traefik/Chart.yaml index 78e91158..fa66d883 100644 --- a/helm/traefik/Chart.yaml +++ b/helm/traefik/Chart.yaml @@ -7,5 +7,5 @@ version: 0.1.0 appVersion: "v2.29.2" dependencies: - name: traefik - version: 10.3.6 + version: 10.9.1 repository: https://helm.traefik.io/traefik diff --git a/helm/traefik/values.yaml b/helm/traefik/values.yaml index 7a4900ab..427d2a4d 100644 --- a/helm/traefik/values.yaml +++ b/helm/traefik/values.yaml @@ -1,4 +1,10 @@ traefik: + service: + enabled: true + type: LoadBalancer + externalIPs: + - 192.168.29.242 + ports: traefik: expose: true diff --git a/helm/webdav.yaml b/helm/webdav.yaml index c6d312d2..fecc5df4 100644 --- a/helm/webdav.yaml +++ b/helm/webdav.yaml @@ -13,7 +13,7 @@ services: volumes: - name: webdav-data hostPath: - path: "/mnt/wdata" + path: "/storage" volumeMounts: - name: webdav-data