--- apiVersion: v1 kind: Secret metadata: name: {{ include "autopush.fullname" . }}-env annotations: "helm.sh/hook": "pre-install,pre-upgrade" type: Opaque data: {{/* GLOBAL */}} RUST_BACKTRACE: {{ ternary "1" "0" .Values.config.logs.backtrace | b64enc }} RUST_LOG: {{ .Values.config.logs.level | b64enc }} {{- with .Values.redis }} {{- if .auth.enabled }} {{- with .auth.password }} REDIS_HOST_PASSWORD: {{ . | b64enc }} {{- end }} {{- end }} {{- if .internal }} REDIS_HOST: {{ printf "%s-redis-master:%.0f/%.0f" (include "autopush.fullname" $) .master.service.port .dbid | b64enc }} {{- else }} REDIS_HOST: {{ printf "%s:%s/$.0f" .external.host .external.port .dbid | b64enc }} {{- end }} {{- end }} CRYPTO_KEY: {{ printf "[%s]" .Values.config.cryptoKey | b64enc }} {{/* autoconnect */}} {{- if .Values.ingress.tls }} AUTOCONNECT__ENDPOINT_SCHEME: {{ "https" | b64enc }} AUTOCONNECT__ENDPOINT_PORT: {{ "443" | b64enc }} {{- else }} AUTOCONNECT__ENDPOINT_SCHEME: {{ "http" | b64enc }} AUTOCONNECT__ENDPOINT_PORT: {{ "80" | b64enc }} {{- end }} AUTOCONNECT__ENDPOINT_HOSTNAME: {{ printf "updates.%s" .Values.ingress.host | b64enc }} AUTOCONNECT__ROUTER_HOSTNAME: {{ printf "%s-autoconnect" (include "autopush.fullname" .) | b64enc }} AUTOCONNECT__ROUTER_PORT: {{ toYaml .Values.autoconnect.service.ports.router | b64enc }} {{- if .Values.prometheus.enabled }} AUTOCONNECT__STATSD_HOST: {{ "127.0.0.1" | b64enc}} AUTOCONNECT__STATSD_PORT: {{ "9125" | b64enc }} {{- end }} {{/* autoendpoint */}} AUTOEND__HOST: {{ "::" | b64enc }} {{- if .Values.ingress.tls }} AUTOEND__ENDPOINT_URL: {{ printf "https://updates.%s" .Values.ingress.host | b64enc }} {{- else }} AUTOEND__ENDPOINT_URL: {{ printf "http://updates.%s" .Values.ingress.host | b64enc }} {{- end }} {{- if .Values.prometheus.enabled }} AUTOEND__STATSD_HOST: {{ "127.0.0.1" | b64enc }} AUTOEND__STATSD_PORT: {{ "9125" | b64enc }} {{- end }}