From b10920bd8a0aa798b5e5db7bbcc5f018a390fa78 Mon Sep 17 00:00:00 2001 From: TrueCharts-Bot Date: Wed, 28 Dec 2022 09:34:29 +0000 Subject: [PATCH] Commit new Chart releases for TrueCharts Signed-off-by: TrueCharts-Bot --- stable/meshcentral/9.0.23/app-changelog.md | 4 - .../meshcentral/9.0.23/templates/_secret.tpl | 172 ----------------- .../{9.0.23 => 9.0.24}/CHANGELOG.md | 18 +- .../meshcentral/{9.0.23 => 9.0.24}/Chart.yaml | 2 +- .../meshcentral/{9.0.23 => 9.0.24}/README.md | 0 stable/meshcentral/9.0.24/app-changelog.md | 9 + .../{9.0.23 => 9.0.24}/app-readme.md | 0 .../charts/common-11.1.2.tgz | Bin .../charts/mongodb-4.0.20.tgz | Bin .../{9.0.23 => 9.0.24}/ix_values.yaml | 0 .../{9.0.23 => 9.0.24}/questions.yaml | 8 +- .../meshcentral/9.0.24/templates/_secret.tpl | 178 ++++++++++++++++++ .../{9.0.23 => 9.0.24}/templates/common.yaml | 0 .../{9.0.23 => 9.0.24}/values.yaml | 0 14 files changed, 200 insertions(+), 191 deletions(-) delete mode 100644 stable/meshcentral/9.0.23/app-changelog.md delete mode 100644 stable/meshcentral/9.0.23/templates/_secret.tpl rename stable/meshcentral/{9.0.23 => 9.0.24}/CHANGELOG.md (90%) rename stable/meshcentral/{9.0.23 => 9.0.24}/Chart.yaml (98%) rename stable/meshcentral/{9.0.23 => 9.0.24}/README.md (100%) create mode 100644 stable/meshcentral/9.0.24/app-changelog.md rename stable/meshcentral/{9.0.23 => 9.0.24}/app-readme.md (100%) rename stable/meshcentral/{9.0.23 => 9.0.24}/charts/common-11.1.2.tgz (100%) rename stable/meshcentral/{9.0.23 => 9.0.24}/charts/mongodb-4.0.20.tgz (100%) rename stable/meshcentral/{9.0.23 => 9.0.24}/ix_values.yaml (100%) rename stable/meshcentral/{9.0.23 => 9.0.24}/questions.yaml (99%) create mode 100644 stable/meshcentral/9.0.24/templates/_secret.tpl rename stable/meshcentral/{9.0.23 => 9.0.24}/templates/common.yaml (100%) rename stable/meshcentral/{9.0.23 => 9.0.24}/values.yaml (100%) diff --git a/stable/meshcentral/9.0.23/app-changelog.md b/stable/meshcentral/9.0.23/app-changelog.md deleted file mode 100644 index a67a2cb1a88..00000000000 --- a/stable/meshcentral/9.0.23/app-changelog.md +++ /dev/null @@ -1,4 +0,0 @@ - - -## [meshcentral-9.0.23](https://github.com/truecharts/charts/compare/meshcentral-9.0.22...meshcentral-9.0.23) (2022-12-27) - diff --git a/stable/meshcentral/9.0.23/templates/_secret.tpl b/stable/meshcentral/9.0.23/templates/_secret.tpl deleted file mode 100644 index 7b284354132..00000000000 --- a/stable/meshcentral/9.0.23/templates/_secret.tpl +++ /dev/null @@ -1,172 +0,0 @@ -{{/* Define the secret */}} -{{- define "meshcentral.secret" -}} - -{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }} -{{- $secretStorageName := printf "%s-storage-secret" (include "tc.common.names.fullname" .) }} - -{{- $config := .Values.meshcentral }} -{{- $mc_custom := .Values.additional_meshcentral }} - -{{- $isScale := false }} -{{- if hasKey .Values.global "isSCALE" }} - {{- $isScale = .Values.global.isSCALE }} -{{- else }} - {{- $isScale = false }} -{{- end }} - -{{- if $isScale }} - {{- if .Values.additional_meshcentral }} - {{- $mc_custom = (include "render.custom.scale.values" $mc_custom) }} - {{- $mc_custom_merged := dict }} - {{/* We created a new unique section# for each key we parsed */}} - {{/* And we merge them here, as without it we would have multiple */}} - {{/* same top level keys */}} - {{- range $section := (fromYaml $mc_custom) }} - {{- $mc_custom_merged = mergeOverwrite $mc_custom_merged $section }} - {{- end }} - {{- $config = mergeOverwrite $config $mc_custom_merged }} - {{- end }} -{{- end }} - -{{- $sessionKey := "" }} -{{- with (lookup "v1" "Secret" .Release.Namespace $secretStorageName) }} - {{- $sessionKey = (index .data "session_key") | b64dec }} -{{- else }} - {{- $sessionKey = randAlphaNum 32 | b64enc }} -{{- end }} - -{{/* Inject some values */}} -{{- $_ := set $config "$schema" "http://info.meshcentral.com/downloads/meshcentral-config-schema.json" }} - -{{- if not (hasKey $config "settings") }} - {{- $_ := set $config "settings" dict }} -{{- end }} - -{{- $_ := set $config.settings "mongoDB" (.Values.mongodb.url.complete | trimAll "\"") }} -{{- $_ := set $config.settings "mongoDbName" .Values.mongodb.mongodbDatabase }} -{{- $_ := set $config.settings "sessionKey" $sessionKey }} -{{- $_ := set $config.settings "port" .Values.service.main.ports.main.port }} - -{{/* Force disable some functions that are not appliable in docker */}} -{{- $_ := set $config.settings "selfUpdate" false }} -{{- $_ := set $config.settings "cleanNpmCacheOnUpdate" false }} - -{{/* Disallows administrators to update the server from the My Server tab. For ANY domains defined */}} -{{- range $domain := $config.domains }} - {{- if not (hasKey $domain "myServer") }} - {{- $_ := set $domain "myServer" dict }} - {{- end }} - {{- $_ := set $domain.myServer "Upgrade" false }} -{{- end }} - -{{- if $isScale }} - {{- $config = (include "mergeAndrenameDefaultDomain" $config) }} - {{- $config = (include "prune.keys.scale" (fromYaml $config)) }} -{{- else }} - {{- $config = (include "prune.keys" $config) }} -{{- end }} - ---- - -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretStorageName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: - {{/* Store session_key to reuse */}} - session_key: {{ $sessionKey | b64enc }} - ---- - -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -data: - {{/* The actual config */}} - config.json: | - {{- toPrettyJson (fromYaml $config) | b64enc | nindent 4 }} -{{- end }} - -{{/* Prunes keys that start with _ */}} -{{- define "prune.keys" }} - {{- $values := . }} - {{- range $k, $v := $values }} - {{- if (hasPrefix "_" $k) }} - {{- $_ := unset $values $k }} - {{- else }} - {{- if eq (kindOf $v) "map" }} - {{- $v := (include "prune.keys" $v) }} - {{- end }} - {{- end }} - {{- end }} - {{- toYaml $values }} -{{- end }} - -{{/* Only on TrueNAS Scale */}} -{{/* Prunes empty lists */}} -{{/* Prunes int and float equal to -99 */}} -{{/* Prunes empty strings (Does not prune empty strings in lists) */}} -{{/* Prunes keys that start with _ */}} -{{- define "prune.keys.scale" }} - {{- $values := . }} - {{- range $k, $v := $values }} - {{- if eq (kindOf $v) "string" }} - {{- if not $v }} - {{- $_ := unset $values $k }} - {{- end }} - {{- end }} - {{- if or (eq (kindOf $v) "float64") (eq (kindOf $v) "int64") }} - {{- if eq (int $v) -99 }} - {{- $_ := unset $values $k }} - {{- end }} - {{- end }} - {{- if eq (kindOf $v) "slice" }} - {{- if not $v }} - {{- $_ := unset $values $k }} - {{- end }} - {{- end }} - {{- if (hasPrefix "_" $k) }} - {{- $_ := unset $values $k }} - {{- else }} - {{- if eq (kindOf $v) "map" }} - {{- $v := (include "prune.keys.scale" $v) }} - {{- end }} - {{- end }} - {{- end }} - {{- toYaml $values }} -{{- end }} - -{{/* Renames tcdefaultdomain variable to "" as this is the key used by MeshCentral */}} -{{/* but SCALE GUI does not handle it well */}} -{{- define "mergeAndrenameDefaultDomain" }} - {{- $values := . }} - {{- $defaultDomain := index $values.domains "" }} - {{- $computedDomain := mergeOverwrite $defaultDomain $values.domains.tcdefaultdomain }} - {{- $_ := set $values.domains "" $computedDomain }} - {{- $_ := unset $values.domains "tcdefaultdomain" }} - {{- toYaml $values }} -{{- end }} - -{{/* Takes a list of dicts with a value and a */}} -{{/* key formatted in dot notaion and converts it to yaml */}} -{{- define "render.custom.scale.values" }} - {{- $values := . }} - {{- $section := 1 }} - {{- range $item := $values }} - {{- $indent := 2 }} - {{- printf "section%v" $section | nindent 0 }}: - {{- $section = (add 1 (int $section)) }} - {{- range (split "." $item.key) }} - {{- . | nindent (int $indent) }}: - {{- $indent = (add 2 (int $indent)) }} - {{- end -}} - {{- printf " %v" $item.value }} - {{- end }} -{{- end }} diff --git a/stable/meshcentral/9.0.23/CHANGELOG.md b/stable/meshcentral/9.0.24/CHANGELOG.md similarity index 90% rename from stable/meshcentral/9.0.23/CHANGELOG.md rename to stable/meshcentral/9.0.24/CHANGELOG.md index a9ac8fdca91..f397f7b228e 100644 --- a/stable/meshcentral/9.0.23/CHANGELOG.md +++ b/stable/meshcentral/9.0.24/CHANGELOG.md @@ -4,6 +4,15 @@ +## [meshcentral-9.0.24](https://github.com/truecharts/charts/compare/meshcentral-9.0.23...meshcentral-9.0.24) (2022-12-28) + +### Fix + +- allow for bool values in strings ([#5862](https://github.com/truecharts/charts/issues/5862)) + + + + ## [meshcentral-9.0.23](https://github.com/truecharts/charts/compare/meshcentral-9.0.22...meshcentral-9.0.23) (2022-12-27) @@ -88,12 +97,3 @@ ## [meshcentral-9.0.13](https://github.com/truecharts/charts/compare/meshcentral-9.0.12...meshcentral-9.0.13) (2022-12-11) - - - -## [meshcentral-9.0.12](https://github.com/truecharts/charts/compare/meshcentral-9.0.11...meshcentral-9.0.12) (2022-12-11) - -### Fix - -- decode keys before reencode ([#5258](https://github.com/truecharts/charts/issues/5258)) - diff --git a/stable/meshcentral/9.0.23/Chart.yaml b/stable/meshcentral/9.0.24/Chart.yaml similarity index 98% rename from stable/meshcentral/9.0.23/Chart.yaml rename to stable/meshcentral/9.0.24/Chart.yaml index 631b9914e14..98405ee5245 100644 --- a/stable/meshcentral/9.0.23/Chart.yaml +++ b/stable/meshcentral/9.0.24/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 kubeVersion: ">=1.16.0-0" name: meshcentral -version: 9.0.23 +version: 9.0.24 appVersion: "1.1.2" description: MeshCentral is a full computer management web site type: application diff --git a/stable/meshcentral/9.0.23/README.md b/stable/meshcentral/9.0.24/README.md similarity index 100% rename from stable/meshcentral/9.0.23/README.md rename to stable/meshcentral/9.0.24/README.md diff --git a/stable/meshcentral/9.0.24/app-changelog.md b/stable/meshcentral/9.0.24/app-changelog.md new file mode 100644 index 00000000000..97abe3a0b74 --- /dev/null +++ b/stable/meshcentral/9.0.24/app-changelog.md @@ -0,0 +1,9 @@ + + +## [meshcentral-9.0.24](https://github.com/truecharts/charts/compare/meshcentral-9.0.23...meshcentral-9.0.24) (2022-12-28) + +### Fix + +- allow for bool values in strings ([#5862](https://github.com/truecharts/charts/issues/5862)) + + \ No newline at end of file diff --git a/stable/meshcentral/9.0.23/app-readme.md b/stable/meshcentral/9.0.24/app-readme.md similarity index 100% rename from stable/meshcentral/9.0.23/app-readme.md rename to stable/meshcentral/9.0.24/app-readme.md diff --git a/stable/meshcentral/9.0.23/charts/common-11.1.2.tgz b/stable/meshcentral/9.0.24/charts/common-11.1.2.tgz similarity index 100% rename from stable/meshcentral/9.0.23/charts/common-11.1.2.tgz rename to stable/meshcentral/9.0.24/charts/common-11.1.2.tgz diff --git a/stable/meshcentral/9.0.23/charts/mongodb-4.0.20.tgz b/stable/meshcentral/9.0.24/charts/mongodb-4.0.20.tgz similarity index 100% rename from stable/meshcentral/9.0.23/charts/mongodb-4.0.20.tgz rename to stable/meshcentral/9.0.24/charts/mongodb-4.0.20.tgz diff --git a/stable/meshcentral/9.0.23/ix_values.yaml b/stable/meshcentral/9.0.24/ix_values.yaml similarity index 100% rename from stable/meshcentral/9.0.23/ix_values.yaml rename to stable/meshcentral/9.0.24/ix_values.yaml diff --git a/stable/meshcentral/9.0.23/questions.yaml b/stable/meshcentral/9.0.24/questions.yaml similarity index 99% rename from stable/meshcentral/9.0.23/questions.yaml rename to stable/meshcentral/9.0.24/questions.yaml index b81cb176bee..8b8450f0b92 100644 --- a/stable/meshcentral/9.0.23/questions.yaml +++ b/stable/meshcentral/9.0.24/questions.yaml @@ -111,17 +111,15 @@ questions: default: "" - variable: tlsOffload label: tlsOffload - description: When true, indicates that a TLS offloader is in front of the MeshCentral server. More typically, set this to the IP address of the reverse proxy or TLS offloader so that IP forwarding headers will be trusted. For example traefik.ix-traefik.svc.cluster.local + description: When true, indicates that a TLS offloader is in front of the MeshCentral server. More typically, set this to the IP address of the reverse proxy or TLS offloader so that IP forwarding headers will be trusted. For example 172.16.0.0/16 schema: type: string - required: true - default: "" + default: "172.16.0.0/16" - variable: trustedProxy label: trustedProxy - description: Trust forwarded headers from these IPs or domains. Providing the magic string "CloudFlare" will cause the server to download the IP address list of trusted CloudFlare proxies directly from CloudFlare on each server start. For example traefik.ix-traefik.svc.cluster.local + description: Trust forwarded headers from these IPs or domains. Providing the magic string "CloudFlare" will cause the server to download the IP address list of trusted CloudFlare proxies directly from CloudFlare on each server start. For example 172.16.0.0/16. This should be left empty if traefik is used. schema: type: string - required: true default: "" - variable: WANonly label: WANonly diff --git a/stable/meshcentral/9.0.24/templates/_secret.tpl b/stable/meshcentral/9.0.24/templates/_secret.tpl new file mode 100644 index 00000000000..002192eb66c --- /dev/null +++ b/stable/meshcentral/9.0.24/templates/_secret.tpl @@ -0,0 +1,178 @@ +{{/* Define the secret */}} +{{- define "meshcentral.secret" -}} + +{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) -}} +{{- $secretStorageName := printf "%s-storage-secret" (include "tc.common.names.fullname" .) -}} + +{{- $config := .Values.meshcentral -}} +{{- $mc_custom := .Values.additional_meshcentral -}} + +{{- $isScale := false -}} +{{- if hasKey .Values.global "isSCALE" -}} + {{- $isScale = .Values.global.isSCALE -}} +{{- else -}} + {{- $isScale = false -}} +{{- end -}} + +{{- if $isScale -}} + {{- if .Values.additional_meshcentral -}} + {{- $mc_custom = (include "render.custom.scale.values" $mc_custom) -}} + {{- $mc_custom_merged := dict -}} + {{/* We created a new unique section# for each key we parsed */}} + {{/* And we merge them here, as without it we would have multiple */}} + {{/* same top level keys */}} + {{- range $section := (fromYaml $mc_custom) -}} + {{- $mc_custom_merged = mergeOverwrite $mc_custom_merged $section -}} + {{- end -}} + {{- $config = mergeOverwrite $config $mc_custom_merged -}} + {{- end -}} +{{- end -}} + +{{- $sessionKey := "" -}} +{{- with (lookup "v1" "Secret" .Release.Namespace $secretStorageName) -}} + {{- $sessionKey = (index .data "session_key") | b64dec -}} +{{- else -}} + {{- $sessionKey = randAlphaNum 32 | b64enc -}} +{{- end -}} + +{{/* Inject some values */}} +{{- $_ := set $config "$schema" "http://info.meshcentral.com/downloads/meshcentral-config-schema.json" -}} + +{{- if not (hasKey $config "settings") -}} + {{- $_ := set $config "settings" dict -}} +{{- end -}} + +{{- $_ := set $config.settings "mongoDB" (.Values.mongodb.url.complete | trimAll "\"") -}} +{{- $_ := set $config.settings "mongoDbName" .Values.mongodb.mongodbDatabase -}} +{{- $_ := set $config.settings "sessionKey" $sessionKey -}} +{{- $_ := set $config.settings "port" .Values.service.main.ports.main.port -}} + +{{/* Force disable some functions that are not appliable in docker */}} +{{- $_ := set $config.settings "selfUpdate" false -}} +{{- $_ := set $config.settings "cleanNpmCacheOnUpdate" false -}} + +{{/* Disallows administrators to update the server from the My Server tab. For ANY domains defined */}} +{{- range $domain := $config.domains -}} + {{- if not (hasKey $domain "myServer") -}} + {{- $_ := set $domain "myServer" dict -}} + {{- end -}} + {{- $_ := set $domain.myServer "Upgrade" false -}} +{{- end -}} + +{{- if $isScale -}} + {{- $config = (include "mergeAndrenameDefaultDomain" $config) -}} + {{- $config = (include "prune.keys.scale" (fromYaml $config)) -}} +{{- else -}} + {{- $config = (include "prune.keys" $config) -}} +{{- end }} + +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secretStorageName }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +data: + {{/* Store session_key to reuse */}} + session_key: {{ $sessionKey | b64enc }} + +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secretName }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +data: + {{/* The actual config */}} + config.json: | + {{- toPrettyJson (fromYaml $config) | b64enc |nindent 4 }} +{{- end -}} + +{{/* Prunes keys that start with _ */}} +{{- define "prune.keys" -}} + {{- $values := . -}} + {{- range $k, $v := $values -}} + {{- if (hasPrefix "_" $k) -}} + {{- $_ := unset $values $k -}} + {{- else -}} + {{- if eq (kindOf $v) "map" -}} + {{- $v := (include "prune.keys" $v) -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- toYaml $values -}} +{{- end -}} + +{{/* Only on TrueNAS Scale */}} +{{/* Prunes empty lists */}} +{{/* Prunes int and float equal to -99 */}} +{{/* Prunes empty strings (Does not prune empty strings in lists) */}} +{{/* Prunes keys that start with _ */}} +{{/* There are cases you want to pass strings or bools on the same field */}} +{{/* So if eq string, and eq true/false/null convert to the real values */}} +{{- define "prune.keys.scale" -}} + {{- $values := . -}} + {{- range $k, $v := $values -}} + {{- if eq (kindOf $v) "string" -}} + {{- if not $v -}} + {{- $_ := unset $values $k -}} + {{- else if or (eq $v "true") -}} + {{- $_ := set $values $k true -}} + {{- else if or (eq $v "false") -}} + {{- $_ := set $values $k false -}} + {{- else if or (eq $v "null") -}} + {{- $_ := set $values $k nil -}} {{/* nil == null on helm */}} + {{- end -}} + {{- end -}} + {{- if or (eq (kindOf $v) "float64") (eq (kindOf $v) "int64") -}} + {{- if eq (int $v) -99 -}} + {{- $_ := unset $values $k -}} + {{- end -}} + {{- end -}} + {{- if eq (kindOf $v) "slice" -}} + {{- if not $v -}} + {{- $_ := unset $values $k -}} + {{- end -}} + {{- end -}} + {{- if (hasPrefix "_" $k) -}} + {{- $_ := unset $values $k -}} + {{- else -}} + {{- if eq (kindOf $v) "map" -}} + {{- $v := (include "prune.keys.scale" $v) -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- toYaml $values -}} +{{- end -}} + +{{/* Renames tcdefaultdomain variable to "" as this is the key used by MeshCentral */}} +{{/* but SCALE GUI does not handle it well */}} +{{- define "mergeAndrenameDefaultDomain" -}} + {{- $values := . -}} + {{- $defaultDomain := index $values.domains "" -}} + {{- $computedDomain := mergeOverwrite $defaultDomain $values.domains.tcdefaultdomain -}} + {{- $_ := set $values.domains "" $computedDomain -}} + {{- $_ := unset $values.domains "tcdefaultdomain" -}} + {{- toYaml $values -}} +{{- end -}} + +{{/* Takes a list of dicts with a value and a */}} +{{/* key formatted in dot notaion and converts it to yaml */}} +{{- define "render.custom.scale.values" -}} + {{- $values := . }} + {{- $section := 1 }} + {{- range $item := $values }} + {{- $indent := 2 }} + {{- printf "section%v" $section | nindent 0 }}: + {{- $section = (add 1 (int $section)) }} + {{- range (split "." $item.key) }} + {{- . | nindent (int $indent) }}: + {{- $indent = (add 2 (int $indent)) }} + {{- end }} + {{- printf " %v" $item.value }} + {{- end }} +{{- end -}} diff --git a/stable/meshcentral/9.0.23/templates/common.yaml b/stable/meshcentral/9.0.24/templates/common.yaml similarity index 100% rename from stable/meshcentral/9.0.23/templates/common.yaml rename to stable/meshcentral/9.0.24/templates/common.yaml diff --git a/stable/meshcentral/9.0.23/values.yaml b/stable/meshcentral/9.0.24/values.yaml similarity index 100% rename from stable/meshcentral/9.0.23/values.yaml rename to stable/meshcentral/9.0.24/values.yaml