{{- if (and (not .Values.useExternalConfig) (not .Values.useConfigMap)) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "cortex.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "cortex.labels" . | nindent 4 }}
data:
  cortex.yaml: {{ tpl (toYaml .Values.config) . | b64enc }}
{{- end }}
