Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add annotation for mirror svc #1121

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

robynron
Copy link
Collaborator

@robynron robynron commented Jul 15, 2024

Ⅰ. Describe what this PR did

add new ingress annotation feature.
higress.io/mirror-target-service: Route traffic that meets all routing rules under the ingress to the specified service.
higress.io/mirror-percentage: Route traffic that meets all routing rules under the ingress to the specified services by percentage.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Copy link
Collaborator

@SpecialYang SpecialYang left a comment

Choose a reason for hiding this comment

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

看看加下e2e test

@robynron robynron changed the title add annotation for mirror svc feat: add annotation for mirror svc Jul 17, 2024
Copy link
Collaborator

@Xunzhuo Xunzhuo left a comment

Choose a reason for hiding this comment

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

A question for this feature, how do we specify the mirror filter to a specific rule? Or does it mean all rules backend will have a same mirror svc?

@johnlanni
Copy link
Collaborator

@robynron 解决一下冲突吧

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 30.55556% with 50 lines in your changes missing coverage. Please review.

Project coverage is 44.12%. Comparing base (ef31e09) to head (4f78b91).
Report is 100 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ingress/kube/annotations/mirror.go 45.83% 18 Missing and 8 partials ⚠️
pkg/ingress/kube/util/util.go 0.00% 22 Missing ⚠️
pkg/ingress/kube/annotations/annotations.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1121      +/-   ##
==========================================
+ Coverage   35.91%   44.12%   +8.21%     
==========================================
  Files          69       76       +7     
  Lines       11576     9895    -1681     
==========================================
+ Hits         4157     4366     +209     
+ Misses       7104     5192    -1912     
- Partials      315      337      +22     
Files with missing lines Coverage Δ
pkg/ingress/kube/annotations/annotations.go 28.40% <0.00%> (-3.23%) ⬇️
pkg/ingress/kube/util/util.go 43.33% <0.00%> (-38.72%) ⬇️
pkg/ingress/kube/annotations/mirror.go 45.83% <45.83%> (ø)

... and 88 files with indirect coverage changes

@robynron
Copy link
Collaborator Author

robynron commented Sep 13, 2024

A question for this feature, how do we specify the mirror filter to a specific rule? Or does it mean all rules backend will have a same mirror svc?

mirror all rules under an ingress to new services by percentage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants