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

Signed-off-by: hongming <coder.scala@gmail.com>
This commit is contained in:
hongming
2025-02-28 16:48:44 +08:00
committed by GitHub
parent 018f6045ee
commit c1259aff8b
8 changed files with 318 additions and 48 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" }}