From 5fa0c11557661c8ae85f8150b52583e214601ec3 Mon Sep 17 00:00:00 2001 From: "azykov@mail.ru" Date: Tue, 11 Aug 2026 21:34:21 +0300 Subject: [PATCH] rclone s3 proxy --- .../longhorn/s3-backup-proxy/helmrelease.yaml | 97 +++++++++++++++++++ .../s3-backup-proxy/helmrepository.yaml | 10 ++ .../s3-backup-proxy/kustomization.yaml | 6 ++ .../longhorn/s3-backup-proxy/secret.enc.yaml | 27 ++++++ clusters/home/infra/kustomization.yaml | 1 + .../home/infra/longhorn/s3-backup-proxy.yaml | 18 ++++ 6 files changed, 159 insertions(+) create mode 100644 clusters/base/infra/longhorn/s3-backup-proxy/helmrelease.yaml create mode 100644 clusters/base/infra/longhorn/s3-backup-proxy/helmrepository.yaml create mode 100644 clusters/base/infra/longhorn/s3-backup-proxy/kustomization.yaml create mode 100644 clusters/base/infra/longhorn/s3-backup-proxy/secret.enc.yaml create mode 100644 clusters/home/infra/longhorn/s3-backup-proxy.yaml diff --git a/clusters/base/infra/longhorn/s3-backup-proxy/helmrelease.yaml b/clusters/base/infra/longhorn/s3-backup-proxy/helmrelease.yaml new file mode 100644 index 0000000..426d318 --- /dev/null +++ b/clusters/base/infra/longhorn/s3-backup-proxy/helmrelease.yaml @@ -0,0 +1,97 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: s3-backup-proxy + namespace: longhorn-system +spec: + interval: 10m + chartRef: + kind: OCIRepository + name: s3-backup-proxy + driftDetection: + mode: enabled + values: + controllers: + app: + containers: + app: + image: + repository: rclone/rclone + tag: "1.75.0" + command: + - sh + - -c + - | + set -eu + # crypt's password/password2 must be stored "obscured" (rclone's + # reversible obfuscation, not real encryption on its own - the + # actual protection is the passphrase's entropy). Generating it + # here at startup from the plaintext secret env vars means the + # real secret only ever needs to exist as one sops-encrypted + # k8s Secret, never hand-obscured and pasted into git. + CRYPT_PASSWORD_OBS=$(rclone obscure "$CRYPT_PASSWORD") + CRYPT_PASSWORD2_OBS=$(rclone obscure "$CRYPT_PASSWORD2") + cat > /tmp/rclone.conf <