I had many dns records in my dns-zone in azure and i need to use External-dns to automate dns record creation/deletion but i need to filter by labels whene external-dns found other label in the aks ingrees than this one below he musn't touch it :
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sample-rule
labels:
ingress: externaldns
annotations:
kubernetes.io/ingress.class: "nginx"
ingress: "externaldns"
the Helm command :
helm install external-dns-frontend-sint bitnami/external-dns \
--wait \
--namespace externaldns \
--set txtOwnerId=az-frontend-aks\
--set provider=azure \
--set azure.resourceGroup=az-tools \
--set txtOwnerId=az-frontend-ak \
--set azure.tenantId=xxxxxxxxxxxxxxxxxxxxxxx \
--set azure.subscriptionId=xxxxxxxxxxxxxxxxxxxxxxxx \
--set azure.aadClientId=xxxxxxxxxxxxxxxxx \
--set azure.aadClientSecret=xxxxxxxxxxxxxxx \
--set azure.cloud=AzurePublicCloud \
--set policy=sync \
--set labelfilter=”ingre=externaldns” \
--set annotationfilter=”ingress=externaldns” \
--set domainFilters={azdns.test.com}
i need to know how can i use this argument with Bitnami/external-dns chart to activate the label filter please. any help please
Last : the filter doesn't work he created all record from the ingress in the same namespace
• You can use the label filter command with bitnami external dns charts as below to filter out the labels which are not passed as aks ingress in external dns.
In the values.yaml file, specify the label filter and annotation filter parameters as below: -
OR
Also, please take into consideration that ‘annotation filter’ filters sources managed by external-dns via annotation using label selector while the ‘label filter’ only selects sources managed by external-dns using the label selector. Thus, filtering based on annotation means that the external-dns controller will receive all resources of that kind and then filter on the client-side. In larger clusters with many resources which change frequently this can cause performance issues. If only some resources need to be managed by an instance of external-dns then label filtering can be used instead of annotation filtering. This means that only those resources which match the selector specified in ‘--label-filter’ will be passed to the controller.
Please find the below links for reference: -
https://github.com/kubernetes-sigs/external-dns/blob/master/docs/faq.md#running-an-internal-and-external-dns-service
https://github.com/bitnami/charts/tree/master/bitnami/external-dns/#external-dns-parameters