Ingress NGINX - Support more canary#287
Conversation
|
Hi @jgreeer. Thanks for your PR. I'm waiting for a github.com 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-sigs/prow repository. |
|
/ok-to-test |
|
/approve cancel |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgreeer, Stevenjin8 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 |
| httpRouteContext.HTTPRoute.Spec.Rules = append(httpRouteContext.HTTPRoute.Spec.Rules, newRule) | ||
|
|
||
| // Add the canary and non-canary backend sources to RuleBackendSources for the new rule | ||
| newRuleBackendSources := []providerir.BackendSource{canaryBackendSource, nonCanaryBackendSource} |
There was a problem hiding this comment.
curious why we add also nonCanaryBackendSource?
There was a problem hiding this comment.
Its subtle and hacky (my idea), but a canary ingress uses the annotations of a non-canary annotation (with a few exceptions). So the non canary ingress' annotations (header manipulation, etc) will affect the canary ingress' HTTPRoute.
|
@jgreeer thanks for working this! |
|
/lgtm |
* added canary by header * fixed providerir import * added warning message for unsupported canary annotations * update test_parseCanaryConfig for canary by header * fix default to zero test * lint * added tests for parsing headers from canary config * set weights when no isWeight or isHeader * remove weight from header backened * moved to seperate annotations folder * fixed ruleBackendSources to update for canary by header * add never header match for canary-by-header with no custom value * add canary and non-canary backend sources to always rule * fixed errors in canary file
* added canary by header * fixed providerir import * added warning message for unsupported canary annotations * update test_parseCanaryConfig for canary by header * fix default to zero test * lint * added tests for parsing headers from canary config * set weights when no isWeight or isHeader * remove weight from header backened * moved to seperate annotations folder * fixed ruleBackendSources to update for canary by header * add never header match for canary-by-header with no custom value * add canary and non-canary backend sources to always rule * fixed errors in canary file
What type of PR is this?
Fixes #267
Does this PR introduce a user-facing change?: