You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was wondering if the ability to set primary labels/annotations as per this comment was implemented, and if not, would you accept a PR to add it?
I see it’s possible to set labels/annotations on the primary Service kinds but I don’t see a way to do this on a primary Deployment.metatdata.labels/annotations or HorizontalPodAutoscaler.metatdata.labels/annotations
This is a problem because we have governance rules for Kube object metadata, and it doesn't seem possible currently to update labels/annotations on the primary deployment/hpa if they change after the first successful canary rollout. They are correctly copied during first time deployment, but they remain static for any subsequent rollout.
Proposed solution
I want flagger to allow annotations and labels override on the primary deployment and hpa. This would be a change to the Canary Spec in a form similar to how service overrides work today:
to copy the labels and annotations maps from the canary counterparts. Care might need to be taken to respect the include-label-prefix filter for labels. Currently this function only seems to copy the Pod Spec labels/annotations.
This is probably easiest from a consumer point of view since it doesn't require any changes.
Is there another way to solve this problem that isn't as good a solution?
The text was updated successfully, but these errors were encountered:
Describe the feature
Hi, I was wondering if the ability to set primary labels/annotations as per this comment was implemented, and if not, would you accept a PR to add it?
I see it’s possible to set labels/annotations on the primary
Service
kinds but I don’t see a way to do this on a primaryDeployment.metatdata.labels/annotations
orHorizontalPodAutoscaler.metatdata.labels/annotations
This is a problem because we have governance rules for Kube object metadata, and it doesn't seem possible currently to update labels/annotations on the primary deployment/hpa if they change after the first successful canary rollout. They are correctly copied during first time deployment, but they remain static for any subsequent rollout.
Proposed solution
I want flagger to allow annotations and labels override on the primary deployment and hpa. This would be a change to the Canary Spec in a form similar to how service overrides work today:
For example:
Then it would be the responsibility of the consumer to pass along the updated map of labels/annotations to the Canary.
Any alternatives you've considered?
It would be possible to update the
Promote
function from e.g.flagger/pkg/canary/deployment_controller.go
Line 83 in 01d4780
include-label-prefix
filter for labels. Currently this function only seems to copy the Pod Spec labels/annotations.This is probably easiest from a consumer point of view since it doesn't require any changes.
Is there another way to solve this problem that isn't as good a solution?
The text was updated successfully, but these errors were encountered: