-
Notifications
You must be signed in to change notification settings - Fork 420
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
feature: add service port spec for eventlistener #1272
feature: add service port spec for eventlistener #1272
Conversation
The following is the coverage report on the affected files.
|
bbb622b
to
7b9a4b9
Compare
The following is the coverage report on the affected files.
|
7b9a4b9
to
9a4f8ec
Compare
The following is the coverage report on the affected files.
|
9a4f8ec
to
624f331
Compare
/test pull-tekton-triggers-go-coverage |
// We return port 8443 if TLS is enabled and the default HTTP port is set. | ||
// This effectively makes 8443 the default HTTPS port unless a user explicitly sets a different port. | ||
servicePortPort = 8443 | ||
} else { | ||
// Return port 443 if TLS is enabled and the HTTP port is not the default one. | ||
// This will allow traffic to be directed to the default HTTPS port. | ||
servicePortPort = 443 | ||
} |
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.
@waveywaves How about to remove
if *c.Port == DefaultPort {
and just override servicePortPort
to 8443
instead of confusing with 8443
and 443
WDYT?
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.
Could you explain why we need 443 as the default TLS port?
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.
After giving it some thought I realized that this may not be a great solution to the TLS port issue. Allowing port override should allow the user to configure the port as 443 if they want to. Having it as a default port is not a great idea fosho.
// We return port 8443 if TLS is enabled and the default HTTP port is set. | ||
// This effectively makes 8443 the default HTTPS port unless a user explicitly sets a different port. | ||
servicePortPort = 8443 | ||
} else { | ||
// Return port 443 if TLS is enabled and the HTTP port is not the default one. | ||
// This will allow traffic to be directed to the default HTTPS port. | ||
servicePortPort = 443 | ||
} |
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.
Could you explain why we need 443 as the default TLS port?
After giving it some thought I realized that this may not be a great solution to the TLS port issue. Allowing port override should allow the user to configure the port as 443 if they want to. Having it as a default port is not a great idea fosho. |
054abf5
to
cbd349f
Compare
@waveywaves as I mentioned in the WG today, we might want to look into passing the servicePort into the EventListenerStatus.SetAddress func so that the UPDATE: It looks like it might already do the right thing - calls to SetAddress uses resources.ListenerHostname which relies on the ServicePort function that contains the changes. |
@dibyom In that case, are there any other changes you think I should make ? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
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.
/lgtm 🎉
/lgtm |
@waveywaves Please run hack/update-codegen.sh to generate updated api docs |
cbd349f
to
f498414
Compare
add the ability to specify the service port for a eventlistener service. Default TLS Port 8443 is not set when service port is specified by the user. Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
f498414
to
6fb5407
Compare
@dibyom I just updated this. Do take a look. Thanks for the ping. |
/lgtm |
Changes
add the ability to specify the service port for a eventlistener
service. the TLS port will default to 443 instead of 8443 in
the case where the service port is set.
this has been done to circumvent the logic of 8443 only being set
when the default port is set with TLS enabled.
fixes #1270
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes