From 19f33bc491c1d99dda58fa3a0680dd6cddfca2f3 Mon Sep 17 00:00:00 2001 From: srliao <906239+srliao@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:43:47 -0400 Subject: [PATCH] remove paperless (forget it) --- kubernetes/apps/services/kustomization.yaml | 1 - .../services/paperless-ngx/app/bootstrap.yaml | 24 --- .../paperless-ngx/app/externalsecret.yaml | 32 ---- .../paperless-ngx/app/helmrelease.yaml | 143 ------------------ .../paperless-ngx/app/kustomization.yaml | 14 -- .../app/minio/externalsecret.yaml | 25 --- .../app/minio/kustomization.yaml | 6 - .../app/minio/replicationsource.yaml | 28 ---- .../paperless-ngx/app/pvc-paperless-ngx.yaml | 17 --- .../apps/services/paperless-ngx/ks.yaml | 26 ---- 10 files changed, 316 deletions(-) delete mode 100644 kubernetes/apps/services/paperless-ngx/app/bootstrap.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/externalsecret.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/helmrelease.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/kustomization.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/minio/externalsecret.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/minio/kustomization.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/minio/replicationsource.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/app/pvc-paperless-ngx.yaml delete mode 100644 kubernetes/apps/services/paperless-ngx/ks.yaml diff --git a/kubernetes/apps/services/kustomization.yaml b/kubernetes/apps/services/kustomization.yaml index 1e0b0187..95a2f873 100644 --- a/kubernetes/apps/services/kustomization.yaml +++ b/kubernetes/apps/services/kustomization.yaml @@ -6,4 +6,3 @@ resources: - ./namespace.yaml # Flux Kustomizations - ./hajimari/ks.yaml - - ./paperless-ngx/ks.yaml diff --git a/kubernetes/apps/services/paperless-ngx/app/bootstrap.yaml b/kubernetes/apps/services/paperless-ngx/app/bootstrap.yaml deleted file mode 100644 index 802864c9..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/bootstrap.yaml +++ /dev/null @@ -1,24 +0,0 @@ -## Attempts to restore the newly created PVC during its initial creation ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/volsync.backube/replicationdestination_v1alpha1.json -apiVersion: volsync.backube/v1alpha1 -kind: ReplicationDestination -metadata: - name: paperless-ngx-bootstrap -spec: - trigger: - manual: restore-once-bootstrap - restic: - repository: paperless-ngx-volsync-minio - copyMethod: Snapshot - volumeSnapshotClassName: local-hostpath - storageClassName: local-hostpath - cacheStorageClassName: local-hostpath - cacheCapacity: 50Gi - cacheAccessModes: ["ReadWriteMany"] - capacity: 50Gi - accessModes: ["ReadWriteMany"] - moverSecurityContext: - runAsUser: 105000 - runAsGroup: 105000 - fsGroup: 105000 diff --git a/kubernetes/apps/services/paperless-ngx/app/externalsecret.yaml b/kubernetes/apps/services/paperless-ngx/app/externalsecret.yaml deleted file mode 100644 index cc4e3262..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/externalsecret.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: paperless-ngx -spec: - secretStoreRef: - kind: ClusterSecretStore - name: onepassword-connect - target: - name: paperless-ngx-secret - template: - engineVersion: v2 - data: - PAPERLESS_DBENGINE: postgresql - PAPERLESS_DBHOST : &dbHost postgres-rw.database.svc.cluster.local - PAPERLESS_DBPORT: "5432" - PAPERLESS_DBNAME: &dbName paperless - PAPERLESS_DBUSER: &dbUser "{{ .PAPERLESS_NGX_POSTGRES_USER }}" - PAPERLESS_DBPASS: &dbPass "{{ .PAPERLESS_NGX_POSTGRES_PASSWORD }}" - PAPERLESS_SECRET_KEY: "{{ .PAPERLESS_SECRET_KEY }}" - INIT_POSTGRES_DBNAME: *dbName - INIT_POSTGRES_HOST: *dbHost - INIT_POSTGRES_USER: *dbUser - INIT_POSTGRES_PASS: *dbPass - INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}" - dataFrom: - - extract: - key: paperless-ngx - - extract: - key: cloudnative-pg diff --git a/kubernetes/apps/services/paperless-ngx/app/helmrelease.yaml b/kubernetes/apps/services/paperless-ngx/app/helmrelease.yaml deleted file mode 100644 index 1c10ef26..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/helmrelease.yaml +++ /dev/null @@ -1,143 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.4/charts/library/common/values.schema.json -apiVersion: helm.toolkit.fluxcd.io/v2beta2 -kind: HelmRelease -metadata: - name: paperless-ngx -spec: - interval: 30m - chart: - spec: - chart: app-template - version: 3.0.4 - sourceRef: - kind: HelmRepository - name: bjw-s - namespace: flux-system - install: - remediation: - retries: 3 - upgrade: - cleanupOnFail: true - remediation: - retries: 3 - uninstall: - keepHistory: false - values: - controllers: - paperless-ngx: - annotations: - reloader.stakater.com/auto: "true" - initContainers: - init-db: - image: - repository: ghcr.io/onedr0p/postgres-init - tag: 16 - envFrom: &envFrom - - secretRef: - name: paperless-ngx-secret - - containers: - app: - image: - repository: ghcr.io/paperless-ngx/paperless-ngx - tag: 2.6.3@sha256:101f3cbfd1e15f9dc3303f2eeb64dd4a9489f121accb31612c9ff8be93ba8094 - env: - COMPOSE_PROJECT_NAME: paperless-ngx - PAPERLESS_TIME_ZONE: America/Toronto - PAPERLESS_URL: https://paperless.winterspring.ca - # PAPERLESS_REDIS: redis://paperless-ngx-redis-master:6379 - PAPERLESS_REDIS: redis://redis-node-0.redis-headless.database.svc.cluster.local:26379 - # need this to place nice with nfs - # USERMAP_UID: 105000 - # USERMAP_GID: 105000 - PAPERLESS_CONSUMPTION_DIR: /pp/scans - PAPERLESS_DATA_DIR: /paperless/data - PAPERLESS_MEDIA_ROOT: /pp/media - PAPERLESS_TRASH_DIR: /pp/trash - # to change these settings accordignly - PAPERLESS_FILENAME_FORMAT: "{created_year}/{correspondent}/{title}" - PAPERLESS_FILENAME_FORMAT_REMOVE_NONE: true - PAPERLESS_CONSUMER_POLLING: 60 - PAPERLESS_CONSUMER_DELETE_DUPLICATES: true - PAPERLESS_CONSUMER_RECURSIVE: true - PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS: true - envFrom: *envFrom - probes: - liveness: &probes - enabled: true - custom: true - spec: - httpGet: - path: /ping - port: &port 8000 - initialDelaySeconds: 0 - periodSeconds: 10 - timeoutSeconds: 1 - failureThreshold: 3 - readiness: *probes - startup: - enabled: false - resources: - requests: - cpu: 20m - limits: - memory: 1Gi - - pod: - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - fsGroup: 1000 - fsGroupChangePolicy: OnRootMismatch - supplementalGroups: - - 1000 - - service: - app: - controller: paperless-ngx - ports: - http: - port: *port - - ingress: - app: - enabled: true - className: internal - annotations: - hajimari.io/icon: simple-icons:paperlessngx - hosts: - - host: &host "paperless.winterspring.ca" - paths: - - path: / - service: - identifier: app - port: http - tls: - - hosts: - - *host - - persistence: - data: - existingClaim: paperless-ngx-data - globalMounts: - - path: /paperless/data - # media: - # type: nfs - # server: 192.168.100.5 - # path: storage/documents/paperless/media - # globalMounts: - # - path: /paperless/media - # consume: - # type: nfs - # server: 192.168.100.5 - # path: /storage/documents - # globalMounts: - # - path: /documents - pp: - type: nfs - server: 192.168.100.5 - path: /storage/documents/paperless - globalMounts: - - path: /pp - diff --git a/kubernetes/apps/services/paperless-ngx/app/kustomization.yaml b/kubernetes/apps/services/paperless-ngx/app/kustomization.yaml deleted file mode 100644 index c2b09e07..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# yaml-language-server: $schema=https://json.schemastore.org/kustomization -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ./helmrelease.yaml - - ./externalsecret.yaml - - ./pvc-paperless-ngx.yaml - - ./bootstrap.yaml - - ./minio - - # we don't need backup for redis pvc.. probably - # - ./redis.yaml - # - ./pvc-redis.yaml diff --git a/kubernetes/apps/services/paperless-ngx/app/minio/externalsecret.yaml b/kubernetes/apps/services/paperless-ngx/app/minio/externalsecret.yaml deleted file mode 100644 index fc5fac27..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/minio/externalsecret.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/external-secrets.io/externalsecret_v1beta1.json -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: &name paperless-ngx-volsync-minio -spec: - secretStoreRef: - kind: ClusterSecretStore - name: onepassword-connect - target: - name: *name - template: - engineVersion: v2 - data: - RESTIC_REPOSITORY: "s3:http://minio.lan/persistent-snapshots/paperless-ngx" - RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}" - AWS_ACCESS_KEY_ID: "{{ .AWS_ACCESS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "{{ .AWS_SECRET_ACCESS_KEY }}" - - dataFrom: - - extract: - key: paperless-ngx - - extract: - key: minio-secrets diff --git a/kubernetes/apps/services/paperless-ngx/app/minio/kustomization.yaml b/kubernetes/apps/services/paperless-ngx/app/minio/kustomization.yaml deleted file mode 100644 index 1f84e3c9..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/minio/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - ./externalsecret.yaml - - ./replicationsource.yaml diff --git a/kubernetes/apps/services/paperless-ngx/app/minio/replicationsource.yaml b/kubernetes/apps/services/paperless-ngx/app/minio/replicationsource.yaml deleted file mode 100644 index aef1ec22..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/minio/replicationsource.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/volsync.backube/replicationsource_v1alpha1.json -apiVersion: volsync.backube/v1alpha1 -kind: ReplicationSource -metadata: - name: paperless-ngx-minio -spec: - sourcePVC: paperless-ngx-data - trigger: - schedule: 0 * * * * # At the top of every hour - restic: - copyMethod: Snapshot - repository: paperless-ngx-volsync-minio - cacheCapacity: 50Gi - volumeSnapshotClassName: local-hostpath - storageClassName: local-hostpath - cacheStorageClassName: local-hostpath - cacheAccessModes: ["ReadWriteMany"] - accessModes: ["ReadWriteMany"] - moverSecurityContext: - runAsUser: 105000 - runAsGroup: 105000 - fsGroup: 105000 - pruneIntervalDays: 7 - retain: # keep 24 hourly, 7 daily, and 5 weekly backups - hourly: 24 - daily: 7 - weekly: 5 diff --git a/kubernetes/apps/services/paperless-ngx/app/pvc-paperless-ngx.yaml b/kubernetes/apps/services/paperless-ngx/app/pvc-paperless-ngx.yaml deleted file mode 100644 index 4c8f8639..00000000 --- a/kubernetes/apps/services/paperless-ngx/app/pvc-paperless-ngx.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: paperless-ngx-data -spec: - storageClassName: local-hostpath - accessModes: - - ReadWriteMany - volumeMode: Filesystem - resources: - requests: - storage: 50Gi - dataSourceRef: - apiGroup: volsync.backube - kind: ReplicationDestination - name: paperless-ngx-bootstrap diff --git a/kubernetes/apps/services/paperless-ngx/ks.yaml b/kubernetes/apps/services/paperless-ngx/ks.yaml deleted file mode 100644 index 0227dd13..00000000 --- a/kubernetes/apps/services/paperless-ngx/ks.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: &app paperless-ngx - namespace: flux-system -spec: - targetNamespace: services - commonMetadata: - labels: - app.kubernetes.io/name: *app - dependsOn: - - name: cloudnative-pg-cluster - - name: external-secrets-stores - - name: democratic-csi-local-path - - name: volsync - path: ./kubernetes/apps/services/paperless-ngx/app - prune: true - sourceRef: - kind: GitRepository - name: home-kubernetes - wait: false - interval: 30m - retryInterval: 1m - timeout: 5m