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

crd/ContourDeployment: Add field 'Ports' #4705

Closed
wants to merge 11 commits into from

Conversation

izturn
Copy link
Member

@izturn izturn commented Sep 8, 2022

add the field Ports to crd/ContourDeployment to enable set containerPort & nodePort for envoy service

Signed-off-by: Gang Liu gang.liu@daocloud.io

Signed-off-by: Gang Liu <gang.liu@daocloud.io>
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@izturn izturn requested a review from a team as a code owner September 8, 2022 12:18
@izturn izturn requested review from tsaarni and skriss and removed request for a team September 8, 2022 12:18
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #4705 (1126b3f) into main (01dc527) will decrease coverage by 0.06%.
The diff coverage is 39.13%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4705      +/-   ##
==========================================
- Coverage   76.50%   76.44%   -0.07%     
==========================================
  Files         140      140              
  Lines       16772    16793      +21     
==========================================
+ Hits        12832    12837       +5     
- Misses       3690     3705      +15     
- Partials      250      251       +1     
Impacted Files Coverage Δ
internal/provisioner/controller/gateway.go 58.33% <39.13%> (-1.67%) ⬇️
internal/sorter/sorter.go 97.95% <0.00%> (-1.03%) ⬇️

@sunjayBhatia sunjayBhatia added the release-note/small A small change that needs one line of explanation in the release notes. label Sep 8, 2022
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@github-actions
Copy link

Marking this PR stale since there has been no activity for 14 days. It will be closed if there is no activity for another 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 24, 2022
@skriss
Copy link
Member

skriss commented Sep 26, 2022

Could you explain what you're trying to accomplish with this change? Need to consider how this relates to Gateway Listeners' concept of Ports, which define the port a client would use to connect to the Gateway.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 27, 2022
@izturn
Copy link
Member Author

izturn commented Sep 28, 2022

the main reason is to let user can set the nodePort number for ServiceType: NodePort

@skriss
Copy link
Member

skriss commented Sep 28, 2022

xref #4499

@github-actions
Copy link

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 13, 2022
@skriss skriss removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 13, 2022
@github-actions
Copy link

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 28, 2022
@izturn
Copy link
Member Author

izturn commented Nov 18, 2022

kubernetes-sigs/gateway-api#1061 is closed, so what's the plan about contour @skriss

@skriss
Copy link
Member

skriss commented Nov 18, 2022

@izturn ack, will try to revisit this in the coming weeks. If you could add some more detail on your use case, that'd be helpful.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 19, 2022
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@izturn
Copy link
Member Author

izturn commented Nov 21, 2022

  1. some of our users want to expose their services to the public, but they don't have the LB, so service type NodePort is their choose, and compare to the generated IP, they like the static IP to fix port conflict and other problems.
  2. it helps Support scrape Contour/Envoy metrics by Prometheus Operator #4746 (comment) too

@izturn
Copy link
Member Author

izturn commented Nov 30, 2022

ping

Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@izturn
Copy link
Member Author

izturn commented Dec 9, 2022

@skriss @sunjayBhatia ping

@github-actions
Copy link

The Contour project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 14d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the PR is closed

You can:

  • Mark this PR as fresh by commenting or pushing a commit
  • Close this PR
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 24, 2022
@izturn
Copy link
Member Author

izturn commented Dec 27, 2022

ping @skriss @sunjayBhatia

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 28, 2022
izturn added 2 commits January 4, 2023 14:01
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
Signed-off-by: Gang Liu <gang.liu@daocloud.io>
@skriss
Copy link
Member

skriss commented Jan 4, 2023

I'm not crazy about specifying some port info in ContourDeployment, because I think it belongs with the Listener logically. Right now, a user can change the Listener definitions on the Gateway, and Contour will update the Service definition accordingly. However, ContourDeployment changes typically do not result in changes to the underlying infra, due to the second paragraph here. That's just one illustration of why having port info stored in two different places can be problematic.

What if alternately, we did the following:

  • we change the behavior described here today, to set the NodePort value to the Listener's PortNumber value when a NodePortService is requested.
  • if we did the above, then we could document that when requesting a NodePort service, it's not possible to get auto-assigned ports due to limitations in the Gateway API spec itself. If this is problematic for folks, then we have some justification to change the API spec upstream.

cc @sunjayBhatia interested in your thoughts here.

@izturn
Copy link
Member Author

izturn commented Jan 5, 2023

Ok, I will make a new PR, @skriss thx

@sunjayBhatia
Copy link
Member

I'm not crazy about specifying some port info in ContourDeployment, because I think it belongs with the Listener logically. Right now, a user can change the Listener definitions on the Gateway, and Contour will update the Service definition accordingly. However, ContourDeployment changes typically do not result in changes to the underlying infra, due to the second paragraph here. That's just one illustration of why having port info stored in two different places can be problematic.

What if alternately, we did the following:

  • we change the behavior described here today, to set the NodePort value to the Listener's PortNumber value when a NodePortService is requested.
  • if we did the above, then we could document that when requesting a NodePort service, it's not possible to get auto-assigned ports due to limitations in the Gateway API spec itself. If this is problematic for folks, then we have some justification to change the API spec upstream.

cc @sunjayBhatia interested in your thoughts here.

makes sense to me, i think the auto-assigned port idea has come up upstream as well so will be good feedback to give if users need it

@skriss
Copy link
Member

skriss commented Jan 11, 2023

@izturn I am going to close this PR out and will keep an eye out for a new PR per #4705 (comment), thanks for the patience on this one!

@skriss skriss closed this Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/small A small change that needs one line of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants