{{- if and .Values.configFile (not .Values.configFileSecret) }}
{{- include "common.values.setup" . -}}
---
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "common.names.fullname" . }}-otelconfig
  labels:
    configsecret: otelcollector
    {{- include "common.labels" $ | nindent 4 }}
stringData:
  {{- with .Values.configFile }}
  otelConfigFile: |-
    {{- . | nindent 4}}
  {{- end }}
{{- end -}}
