flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Canary Output Modification Configuration

Open danielkimuipath opened this issue 2 years ago • 1 comments

Describe the feature

Hi, I am using flagger to use canary deployment. I want to ask if updating the output format of canary process description is possible. For example,


Starting canary deployment for podinfo.test
Advance podinfo.test canary weight 5
Advance podinfo.test canary weight 10
Advance podinfo.test canary weight 15
Advance podinfo.test canary weight 20
Advance podinfo.test canary weight 25
Advance podinfo.test canary weight 30
Advance podinfo.test canary weight 35
Halt podinfo.test advancement success rate 98.69% < 99%
Advance podinfo.test canary weight 40
Promotion completed! podinfo.test

above is a typical canary output.

Is it possible for me to update the output format to be like:

kubectl -n istio-system logs deployment/flagger --tail=100 | jq .msg

Starting canary deployment for podinfo.test version 1.0.0
Advance podinfo.test canary version 1.0.0 weight 5
Advance podinfo.test canary version 1.0.0 weight 10
Advance podinfo.test canary version 1.0.0 weight 15
Advance podinfo.test canary version 1.0.0 weight 20
Advance podinfo.test canary version 1.0.0 weight 25
Advance podinfo.test canary version 1.0.0 weight 30

like adding version information in the canary output.

It would be great if we have more granular and verbose log that can be helpful when we go over kubernetes event log in one log instead of checking each timestamps.

Proposed solution

Is it possible for me to update the output format to be like:

kubectl -n istio-system logs deployment/flagger --tail=100 | jq .msg

Starting canary deployment for podinfo.test version 1.0.0
Advance podinfo.test canary version 1.0.0 weight 5
Advance podinfo.test canary version 1.0.0 weight 10
Advance podinfo.test canary version 1.0.0 weight 15
Advance podinfo.test canary version 1.0.0 weight 20
Advance podinfo.test canary version 1.0.0 weight 25
Advance podinfo.test canary version 1.0.0 weight 30

like adding version information in the canary output.

Thank you for you help in advance.

danielkimuipath avatar Feb 23 '23 22:02 danielkimuipath

hi @danielkimuipath! i don't think this is possible, because a Canary run is not triggered only by version changes. Any change to the pod spec will trigger a Canary run, so it doesn't make much semantic sense to include the canary deployment version in the logs.

aryan9600 avatar Feb 27 '23 11:02 aryan9600