TrueChartsClone/charts/incubator/terraria-tshock/templates/_secret.tpl

33 lines
1.3 KiB
Smarty
Raw Normal View History

fix(terraria) code clean up + gui overhaul (#5948) * fix(terraria) code clean up + gui overhaul * Update charts/incubator/terraria-tshock/values.yaml Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/terraria-tshock/templates/_secret.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/terraria-tshock/templates/_secret.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/terraria-tshock/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/terraria-tshock/templates/_secret.tpl Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * bug fixes * fix * fix * Apply suggestions from code review Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/terraria-tshock/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * add required to string variables * Update charts/incubator/terraria-tshock/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/terraria-tshock/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/terraria-tshock/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2023-01-04 08:23:31 +00:00
{{/* Define the secret */}}
{{- define "terraria.secret" -}}
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }}
{{- $params := list }}
{{- $params = mustAppend $params (printf "-port %v" .Values.service.main.ports.main.port) -}}
{{- $params = mustAppend $params (printf "-password %v" .Values.terraria.pass) -}}
{{- $params = mustAppend $params (printf "-autocreate %v" .Values.terraria.autocreate) -}}
{{- $params = mustAppend $params (printf "-seed %v" .Values.terraria.seed) -}}
{{- $params = mustAppend $params (printf "-worldname %v" .Values.terraria.worldname) -}}
{{- $params = mustAppend $params (printf "-motd %v" .Values.terraria.motd) -}}
{{- $params = mustAppend $params (printf "-maxplayers %v" .Values.terraria.maxplayers) -}}
{{- $params = mustAppend $params (printf "-lang %v" .Values.terraria.lang) -}}
{{- range $key, $value := .Values.terraria.easy_game_params -}}
{{- if $value -}}
{{- $params = mustAppend $params (printf "-%s" $key) -}}
{{- end -}}
{{- end -}}
{{- $params = mustAppend $params .Values.terraria.game_params }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
stringData:
GAME_PARAMS: {{ join " " $params | quote }}
{{- end -}}