{{- $namespace := .Release.Namespace }}
{{- if .Values.configMaps.airflow }}
apiVersion: azconfig.io/v1
kind: AzureAppConfigurationProvider
metadata:
  name: {{ include "config-maps.fullname" . }}-software
  namespace: {{ $namespace }}
spec:
  endpoint: {{ .Values.azure.configEndpoint }}
  target:
    configMapName: airflow-configmap
    configMapData:
      type: yaml
      key: value.yaml
      separator: "."
  auth:
    workloadIdentity:
      serviceAccountName: workload-identity-sa
  configuration:
    selectors:
      - keyFilter: "*"
        labelFilter: "configmap-airflow-values"
    refresh:
      enabled: true
      interval: 1m
      monitoring:
        keyValues:
          - key: "osdu_sentinel"
            label: "common"
{{- end }}