Skip to content

Ingress NGINX - Support more canary#287

Merged
k8s-ci-robot merged 17 commits intokubernetes-sigs:mainfrom
jgreeer:ingress-nginx/canary-by-header-2
Feb 11, 2026
Merged

Ingress NGINX - Support more canary#287
k8s-ci-robot merged 17 commits intokubernetes-sigs:mainfrom
jgreeer:ingress-nginx/canary-by-header-2

Conversation

@jgreeer
Copy link
Copy Markdown
Contributor

@jgreeer jgreeer commented Jan 5, 2026

What type of PR is this?

Fixes #267

Does this PR introduce a user-facing change?:

added support for `nginx.ingress.kubernetes.io/canary-by-header` & `nginx.ingress.kubernetes.io/canary-by-header-value` and emit warnings for `nginx.ingress.kubernetes.io/canary-by-header-pattern` & `nginx.ingress.kubernetes.io/canary-by-cookie`

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 5, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 5, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 5, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 5, 2026
@jgreeer jgreeer marked this pull request as ready for review January 6, 2026 15:41
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 6, 2026
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 6, 2026
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2026
@Stevenjin8 Stevenjin8 self-assigned this Jan 13, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2026
Comment thread pkg/i2gw/providers/ingressnginx/canary.go
@jgreeer jgreeer requested a review from Stevenjin8 January 22, 2026 15:03
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2026
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

/approve cancel

@Stevenjin8
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 29, 2026
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 2, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 2, 2026
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}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why we add also nonCanaryBackendSource?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@kkk777-7
Copy link
Copy Markdown
Member

kkk777-7 commented Feb 8, 2026

@jgreeer thanks for working this!
I left nits comment.

@kkk777-7
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 11, 2026
@k8s-ci-robot k8s-ci-robot merged commit f23ab47 into kubernetes-sigs:main Feb 11, 2026
5 checks passed
chakravardhan pushed a commit to chakravardhan/ingress2gateway that referenced this pull request Feb 19, 2026
* 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
rajashish pushed a commit to rajashish/ingress2gateway1 that referenced this pull request Feb 21, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ingress NGINX] Support more canary

5 participants