-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metadata annotations to generated apex objects #1034
Add metadata annotations to generated apex objects #1034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @jonnylangefeld 🏅
Some third party software relies on annotations and labels on istios VirtualServices. For instance external-dns makes use of the `external-dns.alpha.kubernetes.io/controller` annotation. Currently there is no way to set labels and annotations on the VirtualService resource. This change takes the metadata from the `canary.Spec.Service.Apex` property to replicate exactly what is already possible for a traefik resource: https://github.com/fluxcd/flagger/blob/c36a13ccffefbda1502bf02e8cac2f1b3ca9d027/pkg/router/traefik.go#L59-L68 Fix #854 Signed-off-by: Jonny Langefeld <jonny.langefeld@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #1034 +/- ##
==========================================
+ Coverage 56.88% 57.15% +0.26%
==========================================
Files 76 76
Lines 6093 6138 +45
==========================================
+ Hits 3466 3508 +42
- Misses 2102 2103 +1
- Partials 525 527 +2
Continue to review full report at Codecov.
|
If I am not mistaken this will add annotations to both the Kubernetes services and Istio virtualservices, not sure what happens with Also this new feature/behavior should be mentioned in the docs? |
@Misteur-Z my understanding is that external-dns doesn't look at VirtualServices by default, you need to enable it with |
Thanks! I've added a note to docs here 6f65907 |
It's fine if you only use the virtual service source for External DNS, but you could also enable multiple ones (service + ingress + virtualservice), there is no limitations. |
@Misteur-Z could you please make a PR and add a warning on external-dns? Thanks for raising this, I think users should be made aware that enabling both Istio and Service sources would result in conflicts. |
An alternative would be to create a new field on the canary to propagate metadata just to a specific apex (like only VirtualServiec or only Service). But that obviously would overload the canary object quite a bit |
Some third party software relies on annotations and labels on istios VirtualServices. For instance external-dns makes use of the
external-dns.alpha.kubernetes.io/controller
annotation. Currently there is no way to set labels and annotations on the VirtualService resource.This change takes the metadata from the
canary.Spec.Service.Apex
property to replicate exactly what is already possible for a traefik resource:flagger/pkg/router/traefik.go
Lines 59 to 68 in c36a13c
Fix #854
Signed-off-by: Jonny Langefeld jonny.langefeld@gmail.com