refactor: rename S3_PROVIDER to S3_HOST_BUCKET
- Update cm-script.yaml to use S3_HOST_BUCKET - Modify daemonset.yaml to reference S3_HOST_BUCKET - Change secret.yaml to include agz-host-bucket This refactor enhances the clarity of the configuration by using a more descriptive variable name. It ensures that all references to the S3 host bucket are consistent across the configuration files.
This commit is contained in:
parent
9d4e008747
commit
874c99b455
@ -13,7 +13,7 @@ data:
|
||||
S3_ACCESS_KEY="${S3_ACCESS_KEY}"
|
||||
S3_SECRET_KEY="${S3_SECRET_KEY}"
|
||||
S3_BUCKET="${S3_BUCKET}"
|
||||
S3_PROVIDER="${S3_PROVIDER}"
|
||||
S3_HOST_BUCKET="${S3_HOST_BUCKET}"
|
||||
S3_SUBPATH="${S3_SUBPATH:-backups}"
|
||||
BACKUPS_TO_KEEP="${BACKUPS_TO_KEEP:-7}"
|
||||
|
||||
@ -29,12 +29,11 @@ data:
|
||||
# 配置 s3cmd
|
||||
cat > ~/.s3cfg << EOF
|
||||
[default]
|
||||
type = s3
|
||||
provider = ${S3_PROVIDER}
|
||||
access_key = ${S3_ACCESS_KEY}
|
||||
secret_key = ${S3_SECRET_KEY}
|
||||
host_base = ${S3_ENDPOINT}
|
||||
host_bucket = ${S3_ENDPOINT}
|
||||
#host_bucket = ${S3_ENDPOINT}
|
||||
host_bucket = ${S3_HOST_BUCKET}
|
||||
use_https = ${USE_HTTPS:-True}
|
||||
signature_v2 = ${SIGNATURE_V2:-False}
|
||||
EOF
|
||||
|
@ -77,11 +77,11 @@ spec:
|
||||
secretKeyRef:
|
||||
name: s3-credentials
|
||||
key: bucket
|
||||
- name: S3_PROVIDER
|
||||
- name: S3_HOST_BUCKET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: s3-credentials
|
||||
key: provider
|
||||
key: host-bucket
|
||||
- name: S3_SUBPATH
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -205,12 +205,11 @@ spec:
|
||||
secretKeyRef:
|
||||
name: s3-credentials
|
||||
key: agz-bucket
|
||||
- name: S3_PROVIDER
|
||||
- name: S3_HOST_BUCKET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: s3-credentials
|
||||
key: agz-provider
|
||||
|
||||
key: agz-host-bucket
|
||||
- name: S3_SUBPATH
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
|
@ -6,13 +6,14 @@ metadata:
|
||||
type: Opaque
|
||||
data:
|
||||
# 这些值需要使用base64编码替换
|
||||
provider: TWluaW8= # Minio
|
||||
host-bucket: YXBpLm1pbmlvLnNreWJ5dGUubWUvJShidWNrZXQp # api.minio.skybyte.me/%(bucket)
|
||||
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-host-bucket: ZnJ5dGVhLWJhY2t1cHMub3NzLWNuLWd1YW5nemhvdS1pbnRlcm5hbC5hbGl5dW5jcy5jb20= # frytea-backups.oss-cn-guangzhou-internal.aliyuncs.com
|
||||
agz-endpoint: ZnJ5dGVhLWJhY2t1cHMub3NzLWNuLWd1YW5nemhvdS1pbnRlcm5hbC5hbGl5dW5jcy5jb20= # https://oss-cn-guangzhou-internal.aliyuncs.com
|
||||
#agz-endpoint: b3NzLWNuLWd1YW5nemhvdS1pbnRlcm5hbC5hbGl5dW5jcy5jb20= # https://oss-cn-guangzhou-internal.aliyuncs.com
|
||||
agz-access-key: TFRBSTV0QnU3VmppOEh6Z3NyZFN1dlhx # LTAI5tBu7Vji8HzgsrdSuvXq
|
||||
agz-secret-key: S0REcGZpUWlRSzY5em9taTVYTEpuNUlUTDZtc3l0 # KDDpfiQiQK69zomi5XLJn5ITL6msyt
|
||||
agz-bucket: ZnJ5dGVhLWJhY2t1cHM= # frytea-backups
|
||||
|
Loading…
Reference in New Issue
Block a user