From 167cb5c3bcd16f87144ce0df4f60b119726294d1 Mon Sep 17 00:00:00 2001 From: Spinestars Date: Tue, 7 May 2024 18:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=A8=EF=BC=9Aarchery=20=E5=92=8C?= =?UTF-8?q?=20goinception=20=E5=89=A9=E4=BD=99=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=8F=98=E9=87=8F=EF=BC=8C=E4=BC=98=E5=8C=96=20archer?= =?UTF-8?q?y=20=E7=9A=84=E4=B8=80=E4=BA=9B=E6=B3=A8=E9=87=8A=20(#45)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 补全:goinception 剩余的数据库变量 * update --------- Co-authored-by: 张阳华 Co-authored-by: Leo Q --- charts/archery/values.yaml | 15 +++++++++++---- charts/goinception/templates/deployment.yaml | 2 +- charts/goinception/values.yaml | 16 ++++++++++------ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/charts/archery/values.yaml b/charts/archery/values.yaml index 0d01a9f..eea1d65 100644 --- a/charts/archery/values.yaml +++ b/charts/archery/values.yaml @@ -42,10 +42,10 @@ ingress: # subcharts redis redis: embedded: true - # url: "redis://127.0.0.1:6379/0" + # url: "redis://@:6379/0" # urlSecret: "" # urlSecretKey: "CACHE_URL" - # dingdingUrl: "redis://127.0.0.1:6379/1" + # dingdingUrl: "redis://@:6379/1" # dingdingUrlSecret: "" # dingdingUrlSecretKey: "DINGDING_CACHE_URL" # embedded 为 false, 会使用外部的 redis, 下方的 redis 就不会生效 @@ -61,7 +61,7 @@ redis: # subcharts mysql mysql: embedded: true - # url: "mysql://root:@127.0.0.1:3306/archery" + # url: "mysql://:@:3306/archery" # urlSecret: "" # urlSecretKey: "DATABASE_URL" # embedded 为 false时, 会使用外部的 mysql, 下方的 mysql 配置不会生效 @@ -142,8 +142,15 @@ goinception: targetPort: 4000 initEnv: + - name: BACKUP_HOST + value: "" + - name: BACKUP_PORT + value: "" + # mysql superuser + - name: BACKUP_USER + value: "" - name: BACKUP_PASSWORD - value: "my-password" + value: "" # you can override more options , please see goinception chart readme and values # https://github.com/douban/charts/blob/master/charts/goinception/values.yaml diff --git a/charts/goinception/templates/deployment.yaml b/charts/goinception/templates/deployment.yaml index 560828d..600b12c 100644 --- a/charts/goinception/templates/deployment.yaml +++ b/charts/goinception/templates/deployment.yaml @@ -34,7 +34,7 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} command: ['sh', '-c', - 'sed "s/BACKUP_PASSWORD_PLACEHOLDER/${BACKUP_PASSWORD}/g" /etc/goinception-template/config.toml.template > /etc/goinception/config.toml'] + 'sed "s/BACKUP_HOST_PLACEHOLDER/${BACKUP_HOST}/g;s/BACKUP_PORT_PLACEHOLDER/${BACKUP_PORT}/g;s/BACKUP_USER_PLACEHOLDER/${BACKUP_USER}/g;s/BACKUP_PASSWORD_PLACEHOLDER/${BACKUP_PASSWORD}/g" /etc/goinception-template/config.toml.template > /etc/goinception/config.toml; cat /etc/goinception/config.toml'] volumeMounts: - name: goinception-config-volume mountPath: /etc/goinception diff --git a/charts/goinception/values.yaml b/charts/goinception/values.yaml index f5f5a77..d759f36 100644 --- a/charts/goinception/values.yaml +++ b/charts/goinception/values.yaml @@ -22,10 +22,14 @@ deployment: annotations: {} initEnv: + - name: BACKUP_HOST + value: "" + - name: BACKUP_PORT + value: "" + - name: BACKUP_USER + value: "" - name: BACKUP_PASSWORD - value: "my-password" -# - name: xxx -# value: xxx + value: "" resources: {} @@ -85,9 +89,9 @@ configMap: check_float_double=true support_charset="utf8,utf8mb4" support_collation="utf8_general_ci,utf8mb4_general_ci" - backup_host="archery-mysql" - backup_port=3306 - backup_user="root" + backup_host="BACKUP_HOST_PLACEHOLDER" + backup_port=BACKUP_PORT_PLACEHOLDER + backup_user="BACKUP_USER_PLACEHOLDER" backup_password="BACKUP_PASSWORD_PLACEHOLDER" #安全更新是否开启. #-1表示不做操作,基于远端数据库[默认值]