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

Allow Ingress Exposed Port Upper Limit to use full port range #7063

Closed
saedx1 opened this issue Jan 6, 2025 · 6 comments · Fixed by #7054
Closed

Allow Ingress Exposed Port Upper Limit to use full port range #7063

saedx1 opened this issue Jan 6, 2025 · 6 comments · Fixed by #7054
Assignees
Labels
proposal An issue that proposes a feature request refined Issues that are ready to be prioritized
Milestone

Comments

@saedx1
Copy link
Contributor

saedx1 commented Jan 6, 2025

Version

4.0.0

What Kubernetes platforms are you running on?

EKS Amazon

Steps to reproduce

This is straightforward, the maximum exposed port number you can set on an ingress through nginx.org/listen-ports* annotations is 32767.

This is a bug, and it has nothing to do with NodePorts range.

@saedx1 saedx1 added bug An issue reporting a potential bug needs triage An issue that needs to be triaged labels Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

Hi @saedx1 thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@saedx1
Copy link
Contributor Author

saedx1 commented Jan 6, 2025

@vepatel Here it is.

@saedx1 saedx1 mentioned this issue Jan 6, 2025
6 tasks
@saedx1
Copy link
Contributor Author

saedx1 commented Jan 6, 2025

@vepatel So, to respond to your comment on the PR. This should have nothing to do with the NodePort. This just adds on the listening ports in an nginx listen directive in a server block. Your examples, code, and tests are not mentioning anything about the NodePort range (nor they should) and they are not using the NodePort range exclusivly.

@vepatel
Copy link
Contributor

vepatel commented Jan 6, 2025

Hi @saedx1 thanks for the issue and PR

We'll discuss this in our next triage meeting and prioritise

@saedx1
Copy link
Contributor Author

saedx1 commented Jan 6, 2025

Why does a fix for an outstanding bug need to wait that long?

@pdabelf5 pdabelf5 added proposal An issue that proposes a feature request refined Issues that are ready to be prioritized and removed bug An issue reporting a potential bug needs triage An issue that needs to be triaged labels Jan 13, 2025
@pdabelf5 pdabelf5 changed the title [Bug]: Ingress Exposed Port Upper Limit is 32767 Ingress Exposed Port Upper Limit is 32767 Jan 13, 2025
@pdabelf5 pdabelf5 changed the title Ingress Exposed Port Upper Limit is 32767 Allow Ingress Exposed Port Upper Limit to use full port range Jan 13, 2025
@shaun-nx shaun-nx added this to the v4.1.0 milestone Jan 13, 2025
@lucacome lucacome moved this to Todo ☑ in NGINX Ingress Controller Jan 15, 2025
@javorszky javorszky self-assigned this Jan 15, 2025
@javorszky javorszky moved this from Todo ☑ to In Progress 🛠 in NGINX Ingress Controller Jan 15, 2025
@danielnginx danielnginx assigned vepatel and unassigned javorszky Jan 20, 2025
@vepatel vepatel linked a pull request Jan 20, 2025 that will close this issue
6 tasks
@vepatel
Copy link
Contributor

vepatel commented Jan 20, 2025

    customPorts:
      - port: 60000
        targetPort: 60000
        protocol: TCP
        name: customhttp
      - port: 60001
        targetPort: 60001
        protocol: TCP
        name: customhttps
~/nginx/forks/saedx1/kubernetes-ingress/charts/nginx-ingress on patch-2 ● λ echo $IC_HTTP_PORT
60000

~/nginx/forks/saedx1/kubernetes-ingress/charts/nginx-ingress on patch-2 ● λ echo $IC_HTTPS_PORT
60001

~/nginx/forks/saedx1/kubernetes-ingress/charts/nginx-ingress on patch-2 ● λ curl --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP https://cafe.example.com:$IC_HTTPS_PORT/coffee --insecure
Server address: 10.116.0.7:8080
Server name: coffee-7dd75bc79b-f6h8h
Date: 20/Jan/2025:16:11:34 +0000
URI: /coffee
Request ID: 6b686a5e6643ed3a2af8659faec64851

~/nginx/forks/saedx1/kubernetes-ingress/charts/nginx-ingress on patch-2 ● λ curl --resolve cafe.example.com:$IC_HTTP_PORT:$IC_IP http://cafe.example.com:$IC_HTTP_PORT/coffee --insecure 
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.27.3</center>
</body>
</html>

~/nginx/forks/saedx1/kubernetes-ingress/charts/nginx-ingress on patch-2 ● λ keti test-release-nginx-ingress-controller-576d878bbb-hjrmd -- bash
nginx@test-release-nginx-ingress-controller-576d878bbb-hjrmd:/$ cat /etc/nginx/conf.d/default-cafe-ingress.conf 
# configuration for default/cafe-ingress
upstream default-cafe-ingress-cafe.example.com-coffee-svc-80 {zone default-cafe-ingress-cafe.example.com-coffee-svc-80 256k;
        random two least_conn;
        server 10.116.0.7:8080 max_fails=1 fail_timeout=10s max_conns=0;
        server 10.116.1.6:8080 max_fails=1 fail_timeout=10s max_conns=0;
}

upstream default-cafe-ingress-cafe.example.com-tea-svc-80 {zone default-cafe-ingress-cafe.example.com-tea-svc-80 256k;
        random two least_conn;
        server 10.116.0.8:8080 max_fails=1 fail_timeout=10s max_conns=0;
        server 10.116.1.7:8080 max_fails=1 fail_timeout=10s max_conns=0;
        server 10.116.2.14:8080 max_fails=1 fail_timeout=10s max_conns=0;
}



server {
        listen 60000;listen [::]:60000;
        listen 60001 ssl;listen [::]:60001 ssl;
        ssl_certificate $secret_dir_path/default-cafe-secret;
        ssl_certificate_key $secret_dir_path/default-cafe-secret;

        server_tokens on;

        server_name cafe.example.com;

        set $resource_type "ingress";
        set $resource_name "cafe-ingress";
        set $resource_namespace "default";
        if ($scheme = http) {
                return 301 https://$host:60001$request_uri;
        }

@vepatel vepatel moved this from In Progress 🛠 to In Review 👀 in NGINX Ingress Controller Jan 20, 2025
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done 🚀 in NGINX Ingress Controller Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal An issue that proposes a feature request refined Issues that are ready to be prioritized
Projects
Status: Done 🚀
Development

Successfully merging a pull request may close this issue.

5 participants