feat: platform config API (#6391)

feat: platform config API (#2052) (#6303)



(cherry picked from commit c1259aff8b)

Signed-off-by: hongming <coder.scala@gmail.com>
Signed-off-by: peng wu <2030047311@qq.com>
Co-authored-by: hongming <hongming@kubesphere.io>
This commit is contained in:
smartcat999
2025-03-05 11:09:41 +08:00
committed by GitHub
parent db7a21e754
commit c0bf77e541
8 changed files with 319 additions and 45 deletions

View File

@@ -103,6 +103,19 @@ Create the name of the secret of sa token.
{{- end }}
{{- end }}
{{- define "telemetry.enabled" -}}
{{- $config := lookup "v1" "Secret" (printf "%s" .Release.Namespace) "io.kubesphere.config.platformconfig.telemetry" }}
{{- if $config }}
{{- with $config }}
{{- with (fromYaml ((index .data "configuration.yaml") | b64dec)) }}
{{- .enabled }}
{{- end }}
{{- end }}
{{- else }}
{{- true }}
{{- end }}
{{- end }}
{{- define "role" -}}
{{- if eq .Values.role "" }}
{{- with lookup "v1" "ConfigMap" (printf "%s" .Release.Namespace) "kubesphere-config" }}