From ad183f05cec61ba3c71da519c58ad7caf62f7451 Mon Sep 17 00:00:00 2001 From: dkeven <82354774+dkeven@users.noreply.github.com> Date: Tue, 12 Aug 2025 00:29:28 +0800 Subject: [PATCH] chore: get rid of unused values & ops related to ks redis (#1695) --- .../user/helm-charts/system-apps/values.yaml | 2 -- .../config/user/helm-charts/wizard/values.yaml | 2 -- .../wizard/config/os-chart-template/values.yaml | 2 -- .../files/build/ks-core-config/values.yaml | 9 +-------- .../plugins/files/build/ks-core/values.yaml | 9 +-------- cli/pkg/terminus/ossystem.go | 16 ---------------- .../config/user/helm-charts/auth/values.yaml | 2 -- .../user/helm-charts/headscale/values.yaml | 2 -- .../user/helm-charts/infisical/values.yaml | 2 -- .../user/helm-charts/systemserver/values.yaml | 2 -- .../config/user/helm-charts/fsnotify/values.yaml | 2 -- .../config/user/helm-charts/citus/values.yaml | 2 -- .../config/user/helm-charts/mongo/values.yaml | 2 -- .../config/user/helm-charts/redis/values.yaml | 2 -- .../config/user/helm-charts/tapr/values.yaml | 2 -- 15 files changed, 2 insertions(+), 56 deletions(-) diff --git a/apps/.olares/config/user/helm-charts/system-apps/values.yaml b/apps/.olares/config/user/helm-charts/system-apps/values.yaml index 2111dc231..e83ebbcbe 100644 --- a/apps/.olares/config/user/helm-charts/system-apps/values.yaml +++ b/apps/.olares/config/user/helm-charts/system-apps/values.yaml @@ -44,5 +44,3 @@ os: dashboard: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/apps/.olares/config/user/helm-charts/wizard/values.yaml b/apps/.olares/config/user/helm-charts/wizard/values.yaml index 6b55d9b64..889af31a1 100644 --- a/apps/.olares/config/user/helm-charts/wizard/values.yaml +++ b/apps/.olares/config/user/helm-charts/wizard/values.yaml @@ -34,5 +34,3 @@ os: appstore: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/build/base-package/wizard/config/os-chart-template/values.yaml b/build/base-package/wizard/config/os-chart-template/values.yaml index d250b87a4..3c62d5ef4 100644 --- a/build/base-package/wizard/config/os-chart-template/values.yaml +++ b/build/base-package/wizard/config/os-chart-template/values.yaml @@ -1,5 +1,3 @@ -kubesphere: - redis_password: "" backup: bucket: "${BACKUP_CLUSTER_BUCKET}" key_prefix: "${BACKUP_KEY_PREFIX}" diff --git a/cli/pkg/kubesphere/plugins/files/build/ks-core-config/values.yaml b/cli/pkg/kubesphere/plugins/files/build/ks-core-config/values.yaml index 8a8a75b5a..39b249328 100644 --- a/cli/pkg/kubesphere/plugins/files/build/ks-core-config/values.yaml +++ b/cli/pkg/kubesphere/plugins/files/build/ks-core-config/values.yaml @@ -59,14 +59,7 @@ securityContext: {} # Kubernetes Version shows in KubeSphere console # kube_version: "v1.19.4" # ! 这里要替换下 -env: -- name: KUBESPHERE_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: redis-secret - key: auth - -tolerations: +tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule - key: CriticalAddonsOnly diff --git a/cli/pkg/kubesphere/plugins/files/build/ks-core/values.yaml b/cli/pkg/kubesphere/plugins/files/build/ks-core/values.yaml index 6858d54c9..a8a49b377 100644 --- a/cli/pkg/kubesphere/plugins/files/build/ks-core/values.yaml +++ b/cli/pkg/kubesphere/plugins/files/build/ks-core/values.yaml @@ -58,14 +58,7 @@ securityContext: {} # Kubernetes Version shows in KubeSphere console # kube_version: "v1.19.4" # ! 这里要替换下 -env: -- name: KUBESPHERE_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: redis-secret - key: auth - -tolerations: +tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule - key: CriticalAddonsOnly diff --git a/cli/pkg/terminus/ossystem.go b/cli/pkg/terminus/ossystem.go index 4d2b8b77e..a8bf96d09 100644 --- a/cli/pkg/terminus/ossystem.go +++ b/cli/pkg/terminus/ossystem.go @@ -27,27 +27,12 @@ type InstallOsSystem struct { } func (t *InstallOsSystem) Execute(runtime connector.Runtime) error { - kubectl, err := util.GetCommand(common.CommandKubectl) - if err != nil { - return errors.Wrap(errors.WithStack(err), "kubectl not found") - } - if !runtime.GetSystemInfo().IsDarwin() { if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("mkdir -p %s && chown 1000:1000 %s", storage.OlaresSharedLibDir, storage.OlaresSharedLibDir), false, false); err != nil { return errors.Wrap(errors.WithStack(err), "failed to create shared lib dir") } } - var cmd = fmt.Sprintf("%s get secret -n kubesphere-system redis-secret -o jsonpath='{.data.auth}' |base64 -d", kubectl) - redisPwd, err := runtime.GetRunner().SudoCmd(cmd, false, false) - if err != nil { - return errors.Wrap(errors.WithStack(err), "get redis secret error") - } - - if redisPwd == "" { - return fmt.Errorf("redis secret not found") - } - config, err := ctrl.GetConfig() if err != nil { return err @@ -61,7 +46,6 @@ func (t *InstallOsSystem) Execute(runtime connector.Runtime) error { defer cancel() vals := map[string]interface{}{ - "kubesphere": map[string]interface{}{"redis_password": redisPwd}, "backup": map[string]interface{}{ "bucket": t.KubeConf.Arg.Storage.BackupClusterBucket, "key_prefix": t.KubeConf.Arg.Storage.StoragePrefix, diff --git a/framework/authelia/.olares/config/user/helm-charts/auth/values.yaml b/framework/authelia/.olares/config/user/helm-charts/auth/values.yaml index 5311b90c3..154ad2786 100644 --- a/framework/authelia/.olares/config/user/helm-charts/auth/values.yaml +++ b/framework/authelia/.olares/config/user/helm-charts/auth/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/framework/headscale/.olares/config/user/helm-charts/headscale/values.yaml b/framework/headscale/.olares/config/user/helm-charts/headscale/values.yaml index 5311b90c3..154ad2786 100644 --- a/framework/headscale/.olares/config/user/helm-charts/headscale/values.yaml +++ b/framework/headscale/.olares/config/user/helm-charts/headscale/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/framework/infisical/.olares/config/user/helm-charts/infisical/values.yaml b/framework/infisical/.olares/config/user/helm-charts/infisical/values.yaml index 5311b90c3..154ad2786 100644 --- a/framework/infisical/.olares/config/user/helm-charts/infisical/values.yaml +++ b/framework/infisical/.olares/config/user/helm-charts/infisical/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/framework/system-server/.olares/config/user/helm-charts/systemserver/values.yaml b/framework/system-server/.olares/config/user/helm-charts/systemserver/values.yaml index 5311b90c3..154ad2786 100644 --- a/framework/system-server/.olares/config/user/helm-charts/systemserver/values.yaml +++ b/framework/system-server/.olares/config/user/helm-charts/systemserver/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/platform/fs-lib/.olares/config/user/helm-charts/fsnotify/values.yaml b/platform/fs-lib/.olares/config/user/helm-charts/fsnotify/values.yaml index 5311b90c3..154ad2786 100644 --- a/platform/fs-lib/.olares/config/user/helm-charts/fsnotify/values.yaml +++ b/platform/fs-lib/.olares/config/user/helm-charts/fsnotify/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/platform/tapr/.olares/config/user/helm-charts/citus/values.yaml b/platform/tapr/.olares/config/user/helm-charts/citus/values.yaml index 5311b90c3..154ad2786 100644 --- a/platform/tapr/.olares/config/user/helm-charts/citus/values.yaml +++ b/platform/tapr/.olares/config/user/helm-charts/citus/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/platform/tapr/.olares/config/user/helm-charts/mongo/values.yaml b/platform/tapr/.olares/config/user/helm-charts/mongo/values.yaml index 5311b90c3..154ad2786 100644 --- a/platform/tapr/.olares/config/user/helm-charts/mongo/values.yaml +++ b/platform/tapr/.olares/config/user/helm-charts/mongo/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/platform/tapr/.olares/config/user/helm-charts/redis/values.yaml b/platform/tapr/.olares/config/user/helm-charts/redis/values.yaml index 5311b90c3..154ad2786 100644 --- a/platform/tapr/.olares/config/user/helm-charts/redis/values.yaml +++ b/platform/tapr/.olares/config/user/helm-charts/redis/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: "" diff --git a/platform/tapr/.olares/config/user/helm-charts/tapr/values.yaml b/platform/tapr/.olares/config/user/helm-charts/tapr/values.yaml index 5311b90c3..154ad2786 100644 --- a/platform/tapr/.olares/config/user/helm-charts/tapr/values.yaml +++ b/platform/tapr/.olares/config/user/helm-charts/tapr/values.yaml @@ -38,5 +38,3 @@ os: search2: appKey: '${ks[0]}' appSecret: test -kubesphere: - redis_password: ""