TrueChartsClone/charts/dev/restreamer/templates/common.yaml

23 lines
857 B
YAML

{{- include "tc.v1.common.loader.init" . }}
{{/* Render secrets for restreamer */}}
{{- $secrets := include "restreamer.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := set .Values.secret "restreamer-secret" $secrets -}}
{{- end -}}
{{/* Render configmap for restreamer */}}
{{- $configmap := include "restreamer.configmap" . | fromYaml -}}
{{- if $configmap -}}
{{- $_ := set .Values.configmap "restreamer-configmap" $configmap -}}
{{- end -}}
{{- if .Values.restreamer.metrics.prometheus_enabled -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/scrape" "true" -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/path" "/metrics" -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/port" (.Values.service.main.ports.main.port | quote) -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}