diff --git a/charts/incubator/meshcentral/Chart.yaml b/charts/incubator/meshcentral/Chart.yaml index 5a9a373e8f2..02010c73a6a 100644 --- a/charts/incubator/meshcentral/Chart.yaml +++ b/charts/incubator/meshcentral/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: meshcentral -version: 5.0.1 appVersion: "1.0.89" +version: 5.0.2 description: MeshCentral is a full computer management web site type: application deprecated: false diff --git a/charts/incubator/meshcentral/questions.yaml b/charts/incubator/meshcentral/questions.yaml index 44aae5d89a2..27b5534f1e5 100644 --- a/charts/incubator/meshcentral/questions.yaml +++ b/charts/incubator/meshcentral/questions.yaml @@ -224,7 +224,7 @@ questions: additional_attrs: true type: dict attrs: - - variable: '""' + - variable: tcdefaultdomain label: 'Section <"">' schema: additional_attrs: true diff --git a/charts/incubator/meshcentral/templates/_secret.tpl b/charts/incubator/meshcentral/templates/_secret.tpl index 31094ccfd9f..fb5b0d96904 100644 --- a/charts/incubator/meshcentral/templates/_secret.tpl +++ b/charts/incubator/meshcentral/templates/_secret.tpl @@ -86,15 +86,27 @@ data: {{/* Prunes int and float equal to -99 */}} {{/* Prunes empty strings (Does not prune empty strings in lists) */}} {{/* Prunes keys that start with _ */}} +{{/* Renames tcdefaultdomain variable to "" as this is the key used by MeshCentral */}} +{{/* but SCALE GUI does not handle it well */}} {{- define "prune.keys.scale" }} {{- $values := . }} + {{- if (hasKey $values "domains") }} + {{- if (hasKey $values.domains "tcdefaultdomain") }} + {{- $defaultDomain := $values.domains.tcdefaultdomain }} + {{- $_ := set $values.domains "" $defaultDomain }} + {{- $_ := unset $values.domains "tcdefaultdomain" }} + {{- end }} + {{- end }} {{- range $k, $v := $values }} {{- if eq (kindOf $v) "string" }} {{- if not $v }} {{- $_ := unset $values $k }} {{- end }} {{- end }} + {{- if eq $k "browserPing" }} + {{- $_ := set $values "__browserPing" (printf "%v-%v" (kindOf $v) (typeOf $v)) }} + {{- end }} {{- if or (eq (kindOf $v) "float64") (eq (kindOf $v) "int64") }} {{- if eq (int $v) -99 }} {{- $_ := unset $values $k }}