mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-05 17:16:59 +02:00
Initial support for forwarding wildcard annotations to webhook providers
This commit is contained in:
parent
c506a20de6
commit
761d6551d3
@ -60,6 +60,8 @@ const (
|
||||
controllerAnnotationValue = "dns-controller"
|
||||
// The annotation used for defining the desired hostname
|
||||
internalHostnameAnnotationKey = "external-dns.alpha.kubernetes.io/internal-hostname"
|
||||
// New annotation to support wildcard annotations for webhook providers
|
||||
webhookWildcardAnnotationKey = "external-dns.alpha.kubernetes.io/webhook-*"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -224,6 +226,13 @@ func getProviderSpecificAnnotations(annotations map[string]string) (endpoint.Pro
|
||||
Name: fmt.Sprintf("ibmcloud-%s", attr),
|
||||
Value: v,
|
||||
})
|
||||
} else if strings.HasPrefix(k, webhookWildcardAnnotationKey) {
|
||||
// Support for wildcard annotations for webhook providers
|
||||
attr := strings.TrimPrefix(k, "external-dns.alpha.kubernetes.io/webhook-")
|
||||
providerSpecificAnnotations = append(providerSpecificAnnotations, endpoint.ProviderSpecificProperty{
|
||||
Name: fmt.Sprintf("webhook/%s", attr),
|
||||
Value: v,
|
||||
})
|
||||
}
|
||||
}
|
||||
return providerSpecificAnnotations, setIdentifier
|
||||
|
Loading…
Reference in New Issue
Block a user