Allow multiple provider specific annotations of same type #4734
+246
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
External DNS already supports exposing a single K8s service behind multiple hostnames by using the
external-dns.alpha.kubernetes.io/hostname
annotation with a comma-seperated list of hostnames in its value. One would do this for example for making a service availible with a technical, static hostname and a DNS load-balancer, like Route53 can act as, at the same time.However, when defining additonal annotations on the service, e.g.
external-dns.alpha.kubernetes.io/aws-weight
this always applies to all the hostnames of the service. This makes it impossible to define different weights for different hostnames on the same service. At the same time it is not possible that an annotation only applies to a single one and not all the hostnames of a service.This PR implements a solution to make exactly the described configuration possible by introducing a kind of "string map" notation in the annotations' values.
For example:
would define the two hostname
my.foo.app
andmy.foo.internal
, whereas a load balancing weight is only set formy.foo.app
.Checklist
Jan Roehrich jan.roehrich@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, legal info/Impressum