fix: weight can not set to 0#137
Conversation
Signed-off-by: MregXN <mregxn@gmail.com>
|
Welcome @MregXN! |
|
Hi @MregXN. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Thanks @MregXN ! |
|
looks good to me, @levikobi can you take a look? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LiorLieberman, MregXN The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@MregXN mind putting something meaningful in the release note? |
do you mean my commit message? |
|
@LiorLieberman I'll play around with this change probably tomorrow |
|
btw thank you for this PR @MregXN! |
There was a problem hiding this comment.
This looks good to me but I couldn't actually verify it. I tried to run it locally but it seems like we introduced a bug in ExtractObjectsFromReader (not related to this PR), since I can't use the tool with local files when running the nginx provider @LiorLieberman
Thanks. I have updated the release note. |
@levikobi whats the bug? can you elaborate? |
|
@LiorLieberman my mistake, it was ok, I configured the cli flags wrong. @MregXN If I have a canary deployment and want to configure one of my backends with 0 weight, I can just set the other one to weigh 100. From reading the documentation, this is how you should drain one of the backends. |
The scenatio you mentioned is exactly the example what I am using. The yaml is like: If annotation And I dont think adding annotaion to another ingress is a friendly way. When setting weight to 0 (for just turnning off canary temporarily) I should modify 2 ingresses, however in other case I can modify the annotation of the current ingress easily. |
|
OK, I understand now. Can you please add an additional test case that checks this exact situation? Once this additional test case is added and passed, I will happily accept this |
|
@MregXN let us know if there is anything else we could help with to get this done. |
Signed-off-by: MregXN <mregxn@gmail.com>
Thanks. Have added the test cases. |
Can you help to run the test? |
|
Thanks @MregXN |
* fix: weight can not set to 0 Signed-off-by: MregXN <mregxn@gmail.com> * add unit tests Signed-off-by: MregXN <mregxn@gmail.com> --------- Signed-off-by: MregXN <mregxn@gmail.com>
* fix: weight can not set to 0 Signed-off-by: MregXN <mregxn@gmail.com> * add unit tests Signed-off-by: MregXN <mregxn@gmail.com> --------- Signed-off-by: MregXN <mregxn@gmail.com>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixed the issue where canary weight cannot be set to 0.
During testing or debugging, it is common practice to temporarily set the weight of a specific backend to 0 but it is not supported currently in this project
Which issue(s) this PR fixes:
Fixes #136
Does this PR introduce a user-facing change?: