From 31c0176813fde79ec174b7a9ba59bec804ecccd8 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 26 Apr 2025 11:07:57 +0800 Subject: [PATCH] feat: add S3_PROVIDER to daemonset and secret - Introduce S3_PROVIDER environment variable in daemonset.yaml - Update secret.yaml to include provider information This change allows the application to specify the S3 provider type, improving flexibility in storage configuration. The new variable is sourced from the existing s3-credentials secret, ensuring secure access to the provider information. --- backups/daemonset+cronjob/daemonset.yaml | 12 ++++++++++++ backups/daemonset+cronjob/secret.yaml | 2 ++ 2 files changed, 14 insertions(+) diff --git a/backups/daemonset+cronjob/daemonset.yaml b/backups/daemonset+cronjob/daemonset.yaml index 054233b..5e51701 100644 --- a/backups/daemonset+cronjob/daemonset.yaml +++ b/backups/daemonset+cronjob/daemonset.yaml @@ -75,6 +75,11 @@ spec: secretKeyRef: name: s3-credentials key: bucket + - name: S3_PROVIDER + valueFrom: + secretKeyRef: + name: s3-credentials + key: provider - name: S3_SUBPATH valueFrom: configMapKeyRef: @@ -195,6 +200,12 @@ spec: secretKeyRef: name: s3-credentials key: agz-bucket + - name: S3_PROVIDER + valueFrom: + secretKeyRef: + name: s3-credentials + key: agz-provider + - name: S3_SUBPATH valueFrom: configMapKeyRef: @@ -239,3 +250,4 @@ spec: secret: secretName: feishu-webhook + diff --git a/backups/daemonset+cronjob/secret.yaml b/backups/daemonset+cronjob/secret.yaml index be62a01..6c2e377 100644 --- a/backups/daemonset+cronjob/secret.yaml +++ b/backups/daemonset+cronjob/secret.yaml @@ -6,10 +6,12 @@ metadata: type: Opaque data: # 这些值需要使用base64编码替换 + provider: TWluaW8= # Minio endpoint: aHR0cHM6Ly9hcGkubWluaW8uc2t5Ynl0ZS5tZQ== # https://api.minio.skybyte.me access-key: RVZuWFViR2xld2t0dFF0em9XUWs= # EVnXUbGlewkttQtzoWQk secret-key: THNxVFRmc0VEVzBFY3Buc09aOUxyTnhwc21zajdIMGxlR2R0WHBwRg== # LsqTTfsEDW0EcpnsOZ9LrNxpsmsj7H0leGdtXppF bucket: YmFja3Vwcw== # backups + agz-provider: QWxpYmFiYQ== # Alibaba agz-endpoint: b3NzLWNuLWd1YW5nemhvdS1pbnRlcm5hbC5hbGl5dW5jcy5jb20= # https://oss-cn-guangzhou-internal.aliyuncs.com agz-access-key: TFRBSTV0QnU3VmppOEh6Z3NyZFN1dlhx # LTAI5tBu7Vji8HzgsrdSuvXq agz-secret-key: S0REcGZpUWlRSzY5em9taTVYTEpuNUlUTDZtc3l0 # KDDpfiQiQK69zomi5XLJn5ITL6msyt