From 11c8a47c1edff12780a7a22a22e55146f1f3292d Mon Sep 17 00:00:00 2001 From: Jason Whitelock Date: Mon, 27 Nov 2023 22:09:53 +0000 Subject: [PATCH] volsync-nas remainder --- cluster/apps/media/plex/kustomization.yaml | 1 + cluster/apps/media/plex/volsync-nas.yaml | 41 +++++++++++++++++++ .../apps/media/tautulli/kustomization.yaml | 1 + cluster/apps/media/tautulli/volsync-nas.yaml | 41 +++++++++++++++++++ .../apps/networking/omada/kustomization.yaml | 5 ++- .../networking/omada/volsync-data-nas.yaml | 41 +++++++++++++++++++ .../networking/omada/volsync-logs-nas.yaml | 41 +++++++++++++++++++ .../networking/omada/volsync-work-nas.yaml | 41 +++++++++++++++++++ 8 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 cluster/apps/media/plex/volsync-nas.yaml create mode 100644 cluster/apps/media/tautulli/volsync-nas.yaml create mode 100644 cluster/apps/networking/omada/volsync-data-nas.yaml create mode 100644 cluster/apps/networking/omada/volsync-logs-nas.yaml create mode 100644 cluster/apps/networking/omada/volsync-work-nas.yaml diff --git a/cluster/apps/media/plex/kustomization.yaml b/cluster/apps/media/plex/kustomization.yaml index fa36211c..9be0fef1 100644 --- a/cluster/apps/media/plex/kustomization.yaml +++ b/cluster/apps/media/plex/kustomization.yaml @@ -3,3 +3,4 @@ kind: Kustomization resources: - helm-release.yaml - volsync.yaml + - volsync-nas.yaml diff --git a/cluster/apps/media/plex/volsync-nas.yaml b/cluster/apps/media/plex/volsync-nas.yaml new file mode 100644 index 00000000..33c798bd --- /dev/null +++ b/cluster/apps/media/plex/volsync-nas.yaml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://schemas.budimanjojo.com/volsync.backube/replicationsource_v1alpha1.json +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: plex-nas + namespace: media +spec: + sourcePVC: plex-config-pvc + trigger: + schedule: "0 */6 * * *" + restic: + copyMethod: Snapshot + pruneIntervalDays: 7 + repository: plex-restic-nas-secret + volumeSnapshotClassName: longhorn-snapshot-vsc + storageClassName: longhorn-volsync + moverSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + retain: + daily: 10 + within: 3d + +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/secret-v1.json +apiVersion: v1 +kind: Secret +metadata: + name: plex-restic-nas-secret + namespace: media + labels: + app.kubernetes.io/name: plex +type: Opaque +stringData: + RESTIC_REPOSITORY: s3:http://minio.default.svc.cluster.local:9000/restic-home-cluster/plex + RESTIC_PASSWORD: ${SECRET_RESTIC_PASSWORD} + AWS_ACCESS_KEY_ID: ${SECRET_NAS_MINIO_ACCESS_KEY} + AWS_SECRET_ACCESS_KEY: ${SECRET_NAS_MINIO_SECRET_KEY} + RESTIC_PACK_SIZE: "60" diff --git a/cluster/apps/media/tautulli/kustomization.yaml b/cluster/apps/media/tautulli/kustomization.yaml index fa36211c..9be0fef1 100644 --- a/cluster/apps/media/tautulli/kustomization.yaml +++ b/cluster/apps/media/tautulli/kustomization.yaml @@ -3,3 +3,4 @@ kind: Kustomization resources: - helm-release.yaml - volsync.yaml + - volsync-nas.yaml diff --git a/cluster/apps/media/tautulli/volsync-nas.yaml b/cluster/apps/media/tautulli/volsync-nas.yaml new file mode 100644 index 00000000..e252d091 --- /dev/null +++ b/cluster/apps/media/tautulli/volsync-nas.yaml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://schemas.budimanjojo.com/volsync.backube/replicationsource_v1alpha1.json +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: tautulli-nas + namespace: media +spec: + sourcePVC: tautulli-config-pvc + trigger: + schedule: "0 */6 * * *" + restic: + copyMethod: Snapshot + pruneIntervalDays: 7 + repository: tautulli-restic-nas-secret + volumeSnapshotClassName: longhorn-snapshot-vsc + storageClassName: longhorn-volsync + moverSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + retain: + daily: 10 + within: 3d + +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/secret-v1.json +apiVersion: v1 +kind: Secret +metadata: + name: tautulli-restic-nas-secret + namespace: media + labels: + app.kubernetes.io/name: tautulli +type: Opaque +stringData: + RESTIC_REPOSITORY: s3:http://minio.default.svc.cluster.local:9000/restic-home-cluster/tautulli + RESTIC_PASSWORD: ${SECRET_RESTIC_PASSWORD} + AWS_ACCESS_KEY_ID: ${SECRET_NAS_MINIO_ACCESS_KEY} + AWS_SECRET_ACCESS_KEY: ${SECRET_NAS_MINIO_SECRET_KEY} + RESTIC_PACK_SIZE: "60" diff --git a/cluster/apps/networking/omada/kustomization.yaml b/cluster/apps/networking/omada/kustomization.yaml index d3021a1d..60dd398e 100644 --- a/cluster/apps/networking/omada/kustomization.yaml +++ b/cluster/apps/networking/omada/kustomization.yaml @@ -4,4 +4,7 @@ resources: - helm-release.yaml - volsync-data.yaml - volsync-logs.yaml - - volsync-work.yaml \ No newline at end of file + - volsync-work.yaml + - volsync-data-nas.yaml + - volsync-logs-nas.yaml + - volsync-work-nas.yaml \ No newline at end of file diff --git a/cluster/apps/networking/omada/volsync-data-nas.yaml b/cluster/apps/networking/omada/volsync-data-nas.yaml new file mode 100644 index 00000000..9fbd51ef --- /dev/null +++ b/cluster/apps/networking/omada/volsync-data-nas.yaml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://schemas.budimanjojo.com/volsync.backube/replicationsource_v1alpha1.json +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: omada-data-nas + namespace: networking +spec: + sourcePVC: omada-data-pvc + trigger: + schedule: "0 */6 * * *" + restic: + copyMethod: Snapshot + pruneIntervalDays: 7 + repository: omada-data-restic-nas-secret + volumeSnapshotClassName: longhorn-snapshot-vsc + storageClassName: longhorn-volsync + moverSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + retain: + daily: 10 + within: 3d + +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/secret-v1.json +apiVersion: v1 +kind: Secret +metadata: + name: omada-data-restic-nas-secret + namespace: networking + labels: + app.kubernetes.io/name: omada-data +type: Opaque +stringData: + RESTIC_REPOSITORY: s3:http://minio.default.svc.cluster.local:9000/restic-home-cluster/omada-data + RESTIC_PASSWORD: ${SECRET_RESTIC_PASSWORD} + AWS_ACCESS_KEY_ID: ${SECRET_NAS_MINIO_ACCESS_KEY} + AWS_SECRET_ACCESS_KEY: ${SECRET_NAS_MINIO_SECRET_KEY} + RESTIC_PACK_SIZE: "60" diff --git a/cluster/apps/networking/omada/volsync-logs-nas.yaml b/cluster/apps/networking/omada/volsync-logs-nas.yaml new file mode 100644 index 00000000..9869001e --- /dev/null +++ b/cluster/apps/networking/omada/volsync-logs-nas.yaml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://schemas.budimanjojo.com/volsync.backube/replicationsource_v1alpha1.json +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: omada-logs-nas + namespace: networking +spec: + sourcePVC: omada-logs-pvc + trigger: + schedule: "0 */6 * * *" + restic: + copyMethod: Snapshot + pruneIntervalDays: 7 + repository: omada-logs-restic-nas-secret + volumeSnapshotClassName: longhorn-snapshot-vsc + storageClassName: longhorn-volsync + moverSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + retain: + daily: 10 + within: 3d + +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/secret-v1.json +apiVersion: v1 +kind: Secret +metadata: + name: omada-logs-restic-nas-secret + namespace: networking + labels: + app.kubernetes.io/name: omada-logs +type: Opaque +stringData: + RESTIC_REPOSITORY: s3:http://minio.default.svc.cluster.local:9000/restic-home-cluster/omada-logs + RESTIC_PASSWORD: ${SECRET_RESTIC_PASSWORD} + AWS_ACCESS_KEY_ID: ${SECRET_NAS_MINIO_ACCESS_KEY} + AWS_SECRET_ACCESS_KEY: ${SECRET_NAS_MINIO_SECRET_KEY} + RESTIC_PACK_SIZE: "60" diff --git a/cluster/apps/networking/omada/volsync-work-nas.yaml b/cluster/apps/networking/omada/volsync-work-nas.yaml new file mode 100644 index 00000000..26c91f1a --- /dev/null +++ b/cluster/apps/networking/omada/volsync-work-nas.yaml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://schemas.budimanjojo.com/volsync.backube/replicationsource_v1alpha1.json +apiVersion: volsync.backube/v1alpha1 +kind: ReplicationSource +metadata: + name: omada-work-nas + namespace: networking +spec: + sourcePVC: omada-work-pvc + trigger: + schedule: "0 */6 * * *" + restic: + copyMethod: Snapshot + pruneIntervalDays: 7 + repository: omada-work-restic-nas-secret + volumeSnapshotClassName: longhorn-snapshot-vsc + storageClassName: longhorn-volsync + moverSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + retain: + daily: 10 + within: 3d + +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/secret-v1.json +apiVersion: v1 +kind: Secret +metadata: + name: omada-work-restic-nas-secret + namespace: networking + labels: + app.kubernetes.io/name: omada-work +type: Opaque +stringData: + RESTIC_REPOSITORY: s3:http://minio.default.svc.cluster.local:9000/restic-home-cluster/omada-work + RESTIC_PASSWORD: ${SECRET_RESTIC_PASSWORD} + AWS_ACCESS_KEY_ID: ${SECRET_NAS_MINIO_ACCESS_KEY} + AWS_SECRET_ACCESS_KEY: ${SECRET_NAS_MINIO_SECRET_KEY} + RESTIC_PACK_SIZE: "60"