wg-portal/deploy/helm/templates/secret.yaml
Dmytro Bondar f22a7e4a2e
feat: Metrics for Prometheus (#309)
* feat: prometheus metrics

* Added Prometheus resources support to helm chart
2024-09-29 22:10:50 +02:00

41 lines
1.2 KiB
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "wg-portal.fullname" . }}
labels: {{- include "wg-portal.labels" . | nindent 4 }}
stringData:
config.yml: |
advanced:
start_listen_port: {{ .Values.service.wireguard.ports | sortAlpha | first }}
{{- with .Values.config.advanced }}
{{- tpl (toYaml (omit . "start_listen_port")) $ | nindent 6 }}
{{- end }}
{{- with .Values.config.auth }}
auth: {{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
{{- with mustMerge .Values.config.core (include "wg-portal.admin" . | fromYaml) }}
core: {{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
{{- with .Values.config.database }}
database: {{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
{{- with .Values.config.mail }}
mail: {{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
statistics:
listening_address: :{{ .Values.service.metrics.port }}
{{- with .Values.config.statistics }}
{{- tpl (toYaml (omit . "listening_address")) $ | nindent 6 }}
{{- end }}
web:
listening_address: :{{ .Values.service.web.port }}
{{- with .Values.config.web }}
{{- tpl (toYaml (omit . "listening_address")) $ | nindent 6 }}
{{- end }}