-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add support for AJP protocol #2871
Conversation
babd52b
to
80b0c2f
Compare
Codecov Report
@@ Coverage Diff @@
## master #2871 +/- ##
==========================================
- Coverage 47.65% 47.58% -0.07%
==========================================
Files 76 77 +1
Lines 5500 5512 +12
==========================================
+ Hits 2621 2623 +2
- Misses 2541 2549 +8
- Partials 338 340 +2
Continue to review full report at Codecov.
|
6b512bc
to
7cf4e13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
t.Errorf("unexpected error parsing ingress with sslpassthrough") | ||
} | ||
|
||
// test with a valid host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected to influence the test or some leftover from another test?
|
||
proxyPass := "proxy_pass" | ||
|
||
switch location.BackendProtocol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is the right place to also start using the annotation in existing e2e tests (GRPC is the only one coming to my mind right now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
proto, err := parser.GetStringAnnotation("backend-protocol", ing) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we log the error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No? (we are not doing that in any other annotation that requires to return a default value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not mean return error, I meant log a warning just like we do at https://github.com/kubernetes/ingress-nginx/pull/2871/files#diff-42abcd9476cd9422cd55e93f503bd2e2R57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would log an error every time this annotation is unset. Expect a lot of verbosity :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh strange that it returns error when the annotation is unset... kcco then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question the first time I went through that code:
ingress-nginx/internal/ingress/annotations/parser/main.go
Lines 52 to 58 in cdbb9bd
func (a ingAnnotations) parseString(name string) (string, error) { | |
val, ok := a[name] | |
if ok { | |
return val, nil | |
} | |
return "", errors.ErrMissingAnnotations | |
} |
I guess @aledbf has an explanation :)
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, antoineco The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.