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

Update examples readme to use valid port 8000 #1071

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

savitaashture
Copy link
Contributor

@savitaashture savitaashture commented Apr 26, 2021

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

Updated examples readme to use correct port 8000
Because as part of PR https://github.com/tektoncd/triggers/pull/887 EL container runs on 8000 instead of 8080 and kubectl port-forward looks for container port

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 26, 2021
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 26, 2021
@dibyom
Copy link
Member

dibyom commented Apr 27, 2021

hey @savitaashture could you provide some context for this change? Did we switch the default port to 8000 or something?

@houshengbo
Copy link

Server side:

E0427 16:10:44.447490   66899 portforward.go:400] an error occurred forwarding 8080 -> 8080: error forwarding port 8080 to pod 72f8a8a8dfe89a94c1cda0db78d207fdf58dcebd91eca9d703dd61aaa50ae3c6, uid : exit status 1: 2021/04/27 20:10:44 socat[36853] E connect(16, AF=2 127.0.0.1:8080, 16): Connection refused

and

Client side:

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.64.1
> Accept: */*
> X-GitHub-Event: pull_request
> X-Hub-Signature: sha1=ba0cdc263b3492a74b601d240c27efe81c4720cb
> Content-Type: application/json
> Content-Length: 168
> 
* upload completely sent off: 168 out of 168 bytes
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
* Closing connection 0

This is the error I got, when I used 8080 as the port number.
When I use 8000, it seems fine.

@dibyom
Copy link
Member

dibyom commented Apr 29, 2021

Are you sure there isn't something listening on port 8080 on your local machine or something?

@jmcshane
Copy link
Contributor

jmcshane commented May 5, 2021

I've seen this in a couple other PRs as well. I believe the port was changed to 8000 some time ago

@jmcshane
Copy link
Contributor

jmcshane commented May 6, 2021

I looked back through the history on this repo and it looks like this PR changed the default eventlistener port number to 8000 from 8080. This is seen in this comment as well. I think this PR should be approved and merged in

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2021
@dibyom
Copy link
Member

dibyom commented May 6, 2021

Ahh I see. My bad. Instead of relying on port-forwarding to the EL deployment's port (which is 8000), how about we switch the examples to using the service's port (which is 8080). From the comment linked above:

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

It'll also simplify the port-forward command and in hindsight we should have used the service port anyway instead of the deployment port.

kubectl port-forward $(kubectl get pod -o=name -l eventlistener=listener) 8000) becomeskubectl port-forward service/el-listener 8080:8080`

@savitaashture
Copy link
Contributor Author

Ahh I see. My bad. Instead of relying on port-forwarding to the EL deployment's port (which is 8000), how about we switch the examples to using the service's port (which is 8080). From the comment linked above:

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

It'll also simplify the port-forward command and in hindsight we should have used the service port anyway instead of the deployment port.

kubectl port-forward $(kubectl get pod -o=name -l eventlistener=listener) 8000) becomeskubectl port-forward service/el-listener 8080:8080`

@dibyom yes

actually port-forward looks for container port and because of that we had to update examples.

@savitaashture
Copy link
Contributor Author

hey @savitaashture could you provide some context for this change? Did we switch the default port to 8000 or something?

Hey @dibyom sorry for the late reply
I have updated description PTAL
Thank you

@dibyom
Copy link
Member

dibyom commented May 10, 2021

actually port-forward looks for container port and because of that we had to update examples.

If you port-forward to the service, you only have to specify the service port (8080) and kubectl will figure out that the container port is 8000.

@tekton-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2021
@dibyom
Copy link
Member

dibyom commented Jun 28, 2021

/test pull-tekton-triggers-integration-tests

@tekton-robot tekton-robot merged commit 22ac84e into tektoncd:main Jun 28, 2021
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. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants