diff --git a/kubernetes-ingress/ci/daemonset-customconfig-templated-values.yaml b/kubernetes-ingress/ci/daemonset-customconfig-templated-values.yaml new file mode 100644 index 0000000..621842a --- /dev/null +++ b/kubernetes-ingress/ci/daemonset-customconfig-templated-values.yaml @@ -0,0 +1,6 @@ +controller: + kind: DaemonSet + config: | + rate-limit: "{{ .Values.controller.configVars.rateLimit | required "controller.configVars.rateLimit is required" }}" + configVars: + rateLimit: "ON" diff --git a/kubernetes-ingress/ci/deployment-customconfig-templated-values.yaml b/kubernetes-ingress/ci/deployment-customconfig-templated-values.yaml new file mode 100644 index 0000000..e06384a --- /dev/null +++ b/kubernetes-ingress/ci/deployment-customconfig-templated-values.yaml @@ -0,0 +1,5 @@ +controller: + config: | + rate-limit: "{{ .Values.controller.configVars.rateLimit | required "controller.configVars.rateLimit is required" }}" + configVars: + rateLimit: "ON" diff --git a/kubernetes-ingress/templates/controller-configmap.yaml b/kubernetes-ingress/templates/controller-configmap.yaml index d50399b..bec7f2b 100644 --- a/kubernetes-ingress/templates/controller-configmap.yaml +++ b/kubernetes-ingress/templates/controller-configmap.yaml @@ -34,5 +34,9 @@ data: syslog-server: {{ include "kubernetes-ingress.syslogServer" . }} {{- end }} {{- if .Values.controller.config }} +{{- if eq "string" (printf "%T" .Values.controller.config) }} +{{ tpl .Values.controller.config . | indent 2 }} +{{- else }} {{ toYaml .Values.controller.config | indent 2 }} {{- end }} +{{- end }}