diff --git a/charts/incubator/frigate/templates/NOTES.txt b/charts/incubator/frigate/templates/NOTES.txt index 72e715a3bc5..efcb74cb772 100644 --- a/charts/incubator/frigate/templates/NOTES.txt +++ b/charts/incubator/frigate/templates/NOTES.txt @@ -1 +1 @@ -{{- include "tc.v1.common.lib.chart.notes" $ -}} +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/servas/templates/_secrets.tpl b/charts/incubator/servas/templates/_secrets.tpl index 50371087ec3..1866301c0ce 100644 --- a/charts/incubator/servas/templates/_secrets.tpl +++ b/charts/incubator/servas/templates/_secrets.tpl @@ -1,11 +1,11 @@ -{{/* Define the secrets */}} -{{- define "servas.secrets" -}} -{{- $secretName := (printf "%s-servas-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} -{{- $key := randAlphaNum 32 -}} -{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}} - {{- $key = index .data "APP_KEY" | b64dec -}} -{{- end }} -enabled: true -data: - APP_KEY: {{ $key }} -{{- end -}} +{{/* Define the secrets */}} +{{- define "servas.secrets" -}} +{{- $secretName := (printf "%s-servas-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} +{{- $key := randAlphaNum 32 -}} +{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}} + {{- $key = index .data "APP_KEY" | b64dec -}} +{{- end }} +enabled: true +data: + APP_KEY: {{ $key }} +{{- end -}} diff --git a/charts/incubator/splunk/templates/_config.tpl b/charts/incubator/splunk/templates/_config.tpl index d835620871e..a57dfef75ff 100644 --- a/charts/incubator/splunk/templates/_config.tpl +++ b/charts/incubator/splunk/templates/_config.tpl @@ -1,32 +1,32 @@ -{{/* Define the secret */}} -{{- define "splunk.secret" -}} - -{{- $splunkSecret := printf "%s-splunk-config" (include "tc.common.names.fullname" .) }} -{{- $argList := list -}} - -{{- if .Values.splunk.acceptLicense -}} - {{- $argList = append $argList "--accept-license" -}} -{{- end -}} - -{{- with .Values.splunk.extraArgs -}} - {{- range . -}} - {{- $argList = append $argList . -}} - {{- end -}} -{{- end }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ $splunkSecret }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -stringData: - {{- with $argList }} - SPLUNK_START_ARGS: {{ join " " . | quote }} - {{- end }} - - {{- with .Values.splunk.password }} - SPLUNK_PASSWORD: {{ . }} - {{- end }} -{{- end -}} +{{/* Define the secret */}} +{{- define "splunk.secret" -}} + +{{- $splunkSecret := printf "%s-splunk-config" (include "tc.common.names.fullname" .) }} +{{- $argList := list -}} + +{{- if .Values.splunk.acceptLicense -}} + {{- $argList = append $argList "--accept-license" -}} +{{- end -}} + +{{- with .Values.splunk.extraArgs -}} + {{- range . -}} + {{- $argList = append $argList . -}} + {{- end -}} +{{- end }} + +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $splunkSecret }} + labels: + {{- include "tc.common.labels" . | nindent 4 }} +stringData: + {{- with $argList }} + SPLUNK_START_ARGS: {{ join " " . | quote }} + {{- end }} + + {{- with .Values.splunk.password }} + SPLUNK_PASSWORD: {{ . }} + {{- end }} +{{- end -}} diff --git a/charts/stable/spotweb/templates/common.yaml b/charts/stable/spotweb/templates/common.yaml index 9d95f161711..b51394e00a4 100644 --- a/charts/stable/spotweb/templates/common.yaml +++ b/charts/stable/spotweb/templates/common.yaml @@ -1 +1 @@ -{{ include "tc.v1.common.loader.all" . }} +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/stable/wordpress/templates/_env.tpl b/charts/stable/wordpress/templates/_env.tpl index 7a77a6343b4..b01933b91e5 100644 --- a/charts/stable/wordpress/templates/_env.tpl +++ b/charts/stable/wordpress/templates/_env.tpl @@ -1,93 +1,93 @@ -{{/* Wordpress environment variables */}} -{{- define "wordpress.env" -}} -configmap: - env-config: - enabled: true - data: - APACHE_HTTP_PORT_NUMBER: {{ .Values.service.main.ports.main.port | quote }} - - {{/* Database */}} - WORDPRESS_DATABASE_PORT_NUMBER: "3306" - WORDPRESS_DATABASE_USER: {{ .Values.mariadb.mariadbUsername | quote }} - WORDPRESS_DATABASE_NAME: {{ .Values.mariadb.mariadbDatabase | quote }} - - {{/* Wordpress */}} - WORDPRESS_USERNAME: {{ .Values.wordpress.user | quote }} - WORDPRESS_EMAIL: {{ .Values.wordpress.email | quote }} - WORDPRESS_FIRST_NAME: {{ .Values.wordpress.first_name | quote }} - WORDPRESS_LAST_NAME: {{ .Values.wordpress.last_name | quote }} - WORDPRESS_BLOG_NAME: {{ .Values.wordpress.blog_name | quote }} - WORDPRESS_ENABLE_REVERSE_PROXY: {{ ternary "yes" "no" .Values.wordpress.enable_reverse_proxy_headers | quote }} - - {{- if .Values.smtp.enabled }} - WORDPRESS_SMTP_HOST: {{ .Values.smtp.host | quote }} - WORDPRESS_SMTP_PORT: {{ .Values.smtp.port | quote }} - {{- end }} - - {{- $php := get .Values "php-config" }} - {{/* PHP */}} - {{- with $php.PHP_ENABLE_OPCACHE }} - PHP_ENABLE_OPCACHE: {{ . | quote }} - {{- end }} - {{- with $php.PHP_EXPOSE_PHP }} - PHP_EXPOSE_PHP: {{ . | quote }} - {{- end }} - {{- with $php.PHP_MAX_EXECUTION_TIME }} - PHP_MAX_EXECUTION_TIME: {{ . | quote }} - {{- end }} - {{- with $php.PHP_MAX_INPUT_TIME }} - PHP_MAX_INPUT_TIME: {{ . | quote }} - {{- end }} - {{- with $php.PHP_MAX_INPUT_VARS }} - PHP_MAX_INPUT_VARS: {{ . | quote }} - {{- end }} - {{- with $php.PHP_MEMORY_LIMIT }} - PHP_MEMORY_LIMIT: {{ . | quote }} - {{- end }} - {{- with $php.PHP_POST_MAX_SIZE }} - PHP_POST_MAX_SIZE: {{ . | quote }} - {{- end }} - {{- with $php.PHP_UPLOAD_MAX_FILESIZE }} - PHP_UPLOAD_MAX_FILESIZE: {{ . | quote }} - {{- end }} - -{{- $secretName := printf "%s-env-secret" (include "tc.v1.common.lib.chart.names.fullname" .) }} -secret: - env-secret: - enabled: true - data: - WORDPRESS_DATABASE_HOST: {{ .Values.mariadb.creds.plainhost }} - WORDPRESS_DATABASE_PASSWORD: {{ .Values.mariadb.creds.mariadbPassword | trimAll "\"" }} - - - WORDPRESS_PASSWORD: {{ .Values.wordpress.pass }} - - {{- if .Values.smtp.enabled }} - WORDPRESS_SMTP_USER: {{ .Values.smtp.user }} - WORDPRESS_SMTP_PASSWORD: {{ .Values.smtp.pass }} - {{- end }} - - {{/* Salts */}} - WORDPRESS_AUTH_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_AUTH_KEY" "secret" $secretName) }} - WORDPRESS_SECURE_AUTH_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_SECURE_AUTH_KEY" "secret" $secretName) }} - WORDPRESS_LOGGED_IN_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_LOGGED_IN_KEY" "secret" $secretName) }} - WORDPRESS_NONCE_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_NONCE_KEY" "secret" $secretName) }} - WORDPRESS_AUTH_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_AUTH_SALT" "secret" $secretName) }} - WORDPRESS_SECURE_AUTH_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_SECURE_AUTH_SALT" "secret" $secretName) }} - WORDPRESS_LOGGED_IN_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_LOGGED_IN_SALT" "secret" $secretName) }} - WORDPRESS_NONCE_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_NONCE_SALT" "secret" $secretName) }} -{{- end }} - -{{- define "wordpress.fetch" -}} - {{- $var := .var -}} - {{- $secret := .secret -}} - {{- $ns := .ns -}} - {{- $ret := randAlphaNum 32 -}} - - {{- with (lookup "v1" "Secret" $ns $secret) -}} - {{- $ret = index .data $var | b64dec -}} - {{- end -}} - - {{- $ret -}} - -{{- end -}} +{{/* Wordpress environment variables */}} +{{- define "wordpress.env" -}} +configmap: + env-config: + enabled: true + data: + APACHE_HTTP_PORT_NUMBER: {{ .Values.service.main.ports.main.port | quote }} + + {{/* Database */}} + WORDPRESS_DATABASE_PORT_NUMBER: "3306" + WORDPRESS_DATABASE_USER: {{ .Values.mariadb.mariadbUsername | quote }} + WORDPRESS_DATABASE_NAME: {{ .Values.mariadb.mariadbDatabase | quote }} + + {{/* Wordpress */}} + WORDPRESS_USERNAME: {{ .Values.wordpress.user | quote }} + WORDPRESS_EMAIL: {{ .Values.wordpress.email | quote }} + WORDPRESS_FIRST_NAME: {{ .Values.wordpress.first_name | quote }} + WORDPRESS_LAST_NAME: {{ .Values.wordpress.last_name | quote }} + WORDPRESS_BLOG_NAME: {{ .Values.wordpress.blog_name | quote }} + WORDPRESS_ENABLE_REVERSE_PROXY: {{ ternary "yes" "no" .Values.wordpress.enable_reverse_proxy_headers | quote }} + + {{- if .Values.smtp.enabled }} + WORDPRESS_SMTP_HOST: {{ .Values.smtp.host | quote }} + WORDPRESS_SMTP_PORT: {{ .Values.smtp.port | quote }} + {{- end }} + + {{- $php := get .Values "php-config" }} + {{/* PHP */}} + {{- with $php.PHP_ENABLE_OPCACHE }} + PHP_ENABLE_OPCACHE: {{ . | quote }} + {{- end }} + {{- with $php.PHP_EXPOSE_PHP }} + PHP_EXPOSE_PHP: {{ . | quote }} + {{- end }} + {{- with $php.PHP_MAX_EXECUTION_TIME }} + PHP_MAX_EXECUTION_TIME: {{ . | quote }} + {{- end }} + {{- with $php.PHP_MAX_INPUT_TIME }} + PHP_MAX_INPUT_TIME: {{ . | quote }} + {{- end }} + {{- with $php.PHP_MAX_INPUT_VARS }} + PHP_MAX_INPUT_VARS: {{ . | quote }} + {{- end }} + {{- with $php.PHP_MEMORY_LIMIT }} + PHP_MEMORY_LIMIT: {{ . | quote }} + {{- end }} + {{- with $php.PHP_POST_MAX_SIZE }} + PHP_POST_MAX_SIZE: {{ . | quote }} + {{- end }} + {{- with $php.PHP_UPLOAD_MAX_FILESIZE }} + PHP_UPLOAD_MAX_FILESIZE: {{ . | quote }} + {{- end }} + +{{- $secretName := printf "%s-env-secret" (include "tc.v1.common.lib.chart.names.fullname" .) }} +secret: + env-secret: + enabled: true + data: + WORDPRESS_DATABASE_HOST: {{ .Values.mariadb.creds.plainhost }} + WORDPRESS_DATABASE_PASSWORD: {{ .Values.mariadb.creds.mariadbPassword | trimAll "\"" }} + + + WORDPRESS_PASSWORD: {{ .Values.wordpress.pass }} + + {{- if .Values.smtp.enabled }} + WORDPRESS_SMTP_USER: {{ .Values.smtp.user }} + WORDPRESS_SMTP_PASSWORD: {{ .Values.smtp.pass }} + {{- end }} + + {{/* Salts */}} + WORDPRESS_AUTH_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_AUTH_KEY" "secret" $secretName) }} + WORDPRESS_SECURE_AUTH_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_SECURE_AUTH_KEY" "secret" $secretName) }} + WORDPRESS_LOGGED_IN_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_LOGGED_IN_KEY" "secret" $secretName) }} + WORDPRESS_NONCE_KEY: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_NONCE_KEY" "secret" $secretName) }} + WORDPRESS_AUTH_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_AUTH_SALT" "secret" $secretName) }} + WORDPRESS_SECURE_AUTH_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_SECURE_AUTH_SALT" "secret" $secretName) }} + WORDPRESS_LOGGED_IN_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_LOGGED_IN_SALT" "secret" $secretName) }} + WORDPRESS_NONCE_SALT: {{ include "wordpress.fetch" (dict "ns" .Release.Namespace "var" "WORDPRESS_NONCE_SALT" "secret" $secretName) }} +{{- end }} + +{{- define "wordpress.fetch" -}} + {{- $var := .var -}} + {{- $secret := .secret -}} + {{- $ns := .ns -}} + {{- $ret := randAlphaNum 32 -}} + + {{- with (lookup "v1" "Secret" $ns $secret) -}} + {{- $ret = index .data $var | b64dec -}} + {{- end -}} + + {{- $ret -}} + +{{- end -}} diff --git a/templates/questions/general/global.yaml b/templates/questions/general/global.yaml index 45a005a7366..b43b4433bd3 100644 --- a/templates/questions/general/global.yaml +++ b/templates/questions/general/global.yaml @@ -1,13 +1,13 @@ - - variable: global - group: General Settings - label: "Global Settings" - schema: - additional_attrs: true - type: dict - attrs: - - variable: stopAll - label: Stop All - description: "Stops All Running pods and hibernates cnpg" - schema: - type: boolean - default: false + - variable: global + group: General Settings + label: "Global Settings" + schema: + additional_attrs: true + type: dict + attrs: + - variable: stopAll + label: Stop All + description: "Stops All Running pods and hibernates cnpg" + schema: + type: boolean + default: false