# grafana_charts_secret-gateway.yaml
{{- $root := . -}}
{{- $dict := dict "ctx" . "component" "gateway" -}}
{{- with .Values.gateway }}
{{- if and .enabled .basicAuth.enabled (not .basicAuth.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "tempo.resourceName" $dict }}
  namespace: {{ $root.Release.Namespace | quote }}
  labels:
    {{- include "tempo.labels" $dict | nindent 4 }}
stringData:
  .htpasswd: |
    {{- tpl .basicAuth.htpasswd $dict.ctx | nindent 4 }}
{{- end }}
{{- end }}