-
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
Add https-listener service port name #887
Conversation
Hi @MarcelMue. Thanks for your PR. I'm waiting for a tektoncd 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. 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/test-infra repository. |
/ok-to-test |
The following is the coverage report on the affected files.
|
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.
Overall looks good to me 👍
few questions around default values
// eventListenerServiceTLSPortName defines service TLS port name for EventListener Service | ||
eventListenerServiceTLSPortName = "https-listener" | ||
// eventListenerContainerPort defines the port exposed by the EventListener Container | ||
eventListenerContainerPort = 8000 |
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.
any reason to change default port value from 8080
to 8000
?
@@ -543,7 +538,7 @@ func getContainer(el *v1alpha1.EventListener, c Config) corev1.Container { | |||
Args: []string{ | |||
"--el-name=" + el.Name, | |||
"--el-namespace=" + el.Namespace, | |||
"--port=" + strconv.Itoa(port), | |||
"--port=" + strconv.Itoa(eventListenerContainerPort), |
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 change to make EventListener pod to run on 8000
always ?
if thats the case we need to document about this and also we need to document when this config/controller.yaml used and update the flag description 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.
The idea was together with @dibyom :
Changing the port for the deployment / container to be static while only making the service
configurable. This causes two effects.
- Less work templating because we only need to change the port in the
service
instead of everywhere. - Logic becomes easier to understand because configuration is only applied to the
service
and not to the deployment / container and so on.
I chose port 8000
because noone from outside should consume it - they should interact with the service instead (where it remains 8080
/ 8443
by default). Additionally it makes clear (to me at least) that it could be either protocol (8080 implies HTTP).
return corev1.Container{ | ||
Name: "event-listener", | ||
Image: *c.Image, | ||
Ports: []corev1.ContainerPort{{ | ||
ContainerPort: int32(port), | ||
ContainerPort: int32(eventListenerContainerPort), |
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.
This changes indicates that for https
connection also it uses 8000 port for container I mean the target port is always constant for (http
and https
) connection right?
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.
/test pull-tekton-triggers-integration-tests
The following is the coverage report on the affected files.
|
Ok so I think I found one place we were using the deployment's port -- our E2E test 😬 I think the value is being set here: https://github.com/tektoncd/triggers/blob/master/test/eventlistener_test.go#L381 (For this PR I think its fine to just switch that port to the new one, I'm working on updating some of the E2E tests -- I can take a stab at changing it to portforward to the service instead of the pod then) |
The following is the coverage report on the affected files.
|
4e9cc04
to
947b7c2
Compare
947b7c2
to
441f651
Compare
The following is the coverage report on the affected files.
|
[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
Changes
This is a change following discussions in #881 - it introduces a second port name when TLS is used and changes the port behaviour to keep container ports static and only change service port when configured.
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