{{/* Make sure all variables are set properly */}} {{- include "tc.common.loader.init" . }} {{/* Render secret */}} {{- include "authentik.secret" . }} {{/* Render config */}} {{- include "authentik.config" . }} {{- if hasKey .Values "metrics" -}} {{- if .Values.metrics.enabled -}} {{- $_ := set .Values.podAnnotations "prometheus.io/scrape" "true" -}} {{- $_ := set .Values.podAnnotations "prometheus.io/path" "/metrics" -}} {{- $_ := set .Values.podAnnotations "prometheus.io/port" (.Values.service.metrics.ports.metrics.targetPort | default 9301 | quote) -}} {{- end -}} {{- end -}} {{- if .Values.workerContainer.enabled -}} {{- $_ := set .Values.additionalContainers "worker" (include "authentik.worker" . | fromYaml) -}} {{- end -}} {{- if .Values.geoip.enabled -}} {{- $_ := set .Values.additionalContainers "geoip" (include "authentik.geoip" . | fromYaml) -}} {{- end -}} {{- if .Values.outposts.ldap.enabled -}} {{- $_ := set .Values.additionalContainers "ldap-outpost" (include "authentik.ldap" . | fromYaml) -}} {{/* - if .Values.metrics.enabled - */}} {{/* https://github.com/prometheus/prometheus/issues/3756 */}} {{/* TODO: Figure how the pipe works to connect it to prometheus operator */}} {{/* We can't define multiple ports/endpoints with annotations */}} {{/* - end - */}} {{- end -}} {{- if .Values.outposts.proxy.enabled -}} {{- $_ := set .Values.additionalContainers "proxy-outpost" (include "authentik.proxy" . | fromYaml) -}} {{/* - if .Values.metrics.enabled - */}} {{/* https://github.com/prometheus/prometheus/issues/3756 */}} {{/* TODO: Figure how the pipe works to connect it to prometheus operator */}} {{/* We can't define multiple ports/endpoints with annotations */}} {{/* - end - */}} {{- end -}} {{/* Render the templates */}} {{ include "tc.common.loader.apply" . }}