From e5fd5cf83d55627471b697fd11aad8e65c3fd776 Mon Sep 17 00:00:00 2001 From: alexlebens Date: Mon, 27 May 2024 21:15:17 -0500 Subject: [PATCH] convert tubearchivist to app-template --- .../applications/tubearchivist/Chart.yaml | 31 +++- .../templates/persistent-volume-claim.yaml | 2 +- .../templates/persistent-volume.yaml | 6 +- .../applications/tubearchivist/values.yaml | 148 +++++++++++++----- 4 files changed, 134 insertions(+), 53 deletions(-) diff --git a/clusters/cl01tl/applications/tubearchivist/Chart.yaml b/clusters/cl01tl/applications/tubearchivist/Chart.yaml index deb3813ee..7c4841615 100644 --- a/clusters/cl01tl/applications/tubearchivist/Chart.yaml +++ b/clusters/cl01tl/applications/tubearchivist/Chart.yaml @@ -1,13 +1,28 @@ apiVersion: v2 name: tubearchivist -version: 0.0.7 +version: 1.0.0 +description: Tube Archivist +keywords: + - download + - video + - youtube sources: - https://github.com/tubearchivist/tubearchivist - - https://github.com/alexlebens/helm-charts/charts/tubearchivist - - https://github.com/tubearchivist/tubearchivist-jf - - https://github.com/alexlebens/helm-charts/charts/tubearchivist-to-jellyfin + - https://github.com/bitnami/charts/tree/main/bitnami/redis + - https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch + - https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens dependencies: - - name: tubearchivist - version: 0.2.9 - repository: http://alexlebens.github.io/helm-charts -appVersion: v0.4.6 + - name: app-template + alias: tubearchivist + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 + - name: redis + version: 19.3.4 + repository: https://charts.bitnami.com/bitnami + - name: elasticsearch + version: 21.0.6 + repository: https://charts.bitnami.com/bitnami +icon: https://avatars.githubusercontent.com/u/102734415?s=48&v=4 +appVersion: v0.4.8 diff --git a/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume-claim.yaml b/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume-claim.yaml index 99b7073dc..66f3958ff 100644 --- a/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume-claim.yaml +++ b/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume-claim.yaml @@ -4,7 +4,7 @@ metadata: name: tubearchivist-nfs-storage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/name: tubearchivist-nfs-storage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: storage diff --git a/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume.yaml b/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume.yaml index 042f2107f..719c64ea6 100644 --- a/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume.yaml +++ b/clusters/cl01tl/applications/tubearchivist/templates/persistent-volume.yaml @@ -4,7 +4,7 @@ metadata: name: tubearchivist-nfs-storage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ .Release.Name }} + app.kubernetes.io/name: tubearchivist-nfs-storage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: storage @@ -17,8 +17,8 @@ spec: accessModes: - ReadWriteMany nfs: - path: {{ .Values.storage.youtube.nfsPath }} - server: {{ .Values.storage.youtube.nfsServer }} + path: /volume2/Storage/YouTube + server: synologybond.alexlebens.net mountOptions: - vers=4 - minorversion=1 diff --git a/clusters/cl01tl/applications/tubearchivist/values.yaml b/clusters/cl01tl/applications/tubearchivist/values.yaml index 37fade027..7d83c7a4f 100644 --- a/clusters/cl01tl/applications/tubearchivist/values.yaml +++ b/clusters/cl01tl/applications/tubearchivist/values.yaml @@ -1,46 +1,112 @@ tubearchivist: - deployment: - env: - TZ: US/Central - envFrom: - - secretRef: - name: tubearchivist-config-secret - resources: - limits: - memory: 2Gi - cpu: 1000m + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: bbilly1/tubearchivist + tag: v0.4.8 + pullPolicy: IfNotPresent + env: + - name: TZ + value: US/Central + envFrom: + - secretRef: + name: tubearchivist-config-secret + resources: + requests: + cpu: 100m + memory: 128Mi + serviceAccount: + create: true + service: + main: + controller: main + ports: + http: + port: 8000 + targetPort: 8000 + protocol: HTTP ingress: - enabled: true - className: traefik - annotations: - traefik.ingress.kubernetes.io/router.entrypoints: websecure - traefik.ingress.kubernetes.io/router.tls: "true" - cert-manager.io/cluster-issuer: letsencrypt-issuer - host: tubearchivist.alexlebens.net + main: + className: traefik + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + cert-manager.io/cluster-issuer: letsencrypt-issuer + hosts: + - host: tubearchivist.alexlebens.net + paths: + - path: / + pathType: Prefix + service: + name: main + port: 8000 + tls: + - secretName: tubearchivist-secret-tls + hosts: + - tubearchivist.alexlebens.net persistence: cache: - enabled: true - storageClassName: ceph-block - storageSize: 80Gi + type: emptyDir + advancedMounts: + main: + main: + - path: /cache + readOnly: false youtube: - claimName: tubearchivist-nfs-storage - elasticsearch: - global: - storageClass: ceph-block - extraEnvVarsSecret: tubearchivist-elasticsearch-secret - extraConfig: - path: - repo: /usr/share/elasticsearch/data/snapshot - extraVolumes: - - name: snapshot - nfs: - path: /volume2/Storage/TubeArchivist - server: synologybond.alexlebens.net - extraVolumeMounts: - - name: snapshot - mountPath: /usr/share/elasticsearch/data/snapshot - snapshotRepoPath: /usr/share/elasticsearch/data/snapshot -storage: - youtube: - nfsPath: /volume2/Storage/YouTube - nfsServer: synologybond.alexlebens.net + existingClaim: tubearchivist-nfs-storage + advancedMounts: + main: + main: + - path: /youtube + readOnly: false +redis: + image: + repository: redis/redis-stack-server + tag: 7.2.0-v10 + architecture: standalone + auth: + enabled: false + commonConfiguration: |- + # Enable AOF https://redis.io/topics/persistence#append-only-file + appendonly yes + # Disable RDB persistence, AOF persistence already enabled. + save "" + # Enable Redis Json module + loadmodule /opt/redis-stack/lib/rejson.so +elasticsearch: + global: + storageClass: ceph-block + extraEnvVars: + - name: discovery.type + value: single-node + - name: xpack.security.enabled + value: true + extraEnvVarsSecret: tubearchivist-elasticsearch-secret + extraConfig: + path: + repo: /usr/share/elasticsearch/data/snapshot + extraVolumes: + - name: snapshot + nfs: + path: /volume2/Storage/TubeArchivist + server: synologybond.alexlebens.net + extraVolumeMounts: + - name: snapshot + mountPath: /usr/share/elasticsearch/data/snapshot + snapshotRepoPath: /usr/share/elasticsearch/data/snapshot + master: + masterOnly: false + replicaCount: 1 + data: + replicaCount: 0 + coordinating: + replicaCount: 0 + ingest: + enabled: false + replicaCount: 0