Open dhohengassner opened 4 years ago
You should remove the Kubernetes service from Git and let Flagger create it, this way the GitOps operator would ignore it.
Thanks Stefan,
we did that but we have the same templates for multiple deployments where some of them use Flagger and some not.
It is possible to template that but we would prefer to manage the service using kapp.
We created this issue because it seems Flagger adjusts the service more than needed.
Is it possible to adjust Flagger here a bit to handle an update better?
Think it would help if Flagger at least would not touch user specified labels/annotations in metadata.
The metadata can be set in the canary object, that's why Flagger overrides it every time. To improve this we could implement a 3-way-merge like kubectl does... I've been avoiding this as it complicated the code by a lot.
Think the 3-way-merge is exactly what this issue is about :+1:
We are using flagger together with kapp.
Our Deployments and Services are managed with Kapp.
When I define a service that already exists it seems Flagger recreates it instead of just updating the selector (which would make sense to me).
Example:
In the Canary definition:
kapp is detecting changes after the Canary updated the service:
When I understand that correctly Flagger builds the resource new every time: https://github.com/weaveworks/flagger/blob/master/pkg/canary/service_controller.go#L80
Think it would help if Flagger at least would not touch user specified labels/annotations in metadata.
Any help or background is appreciated.
Thanks!