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 default_server listeners to be customised #4464

Merged
merged 18 commits into from
Oct 12, 2023

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Oct 3, 2023

Proposed changes

By default, when deploying the Ingress Controller, there are two listen directives that are configured with the default_server option.

This change provides users with an option to customise the ports for both the HTTP and HTTPS default_server listeners
This is useful in scenarios where users must ensure that NGINX does not bind to ports 80 and 443 by default.

Resolves: #4444

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@shaun-nx shaun-nx requested review from a team as code owners October 3, 2023 14:52
@shaun-nx shaun-nx linked an issue Oct 3, 2023 that may be closed by this pull request
@github-actions github-actions bot added documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements helm_chart Pull requests that update the Helm Chart tests Pull requests that update tests labels Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #4464 (b373126) into main (801746a) will increase coverage by 0.01%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #4464      +/-   ##
==========================================
+ Coverage   51.95%   51.96%   +0.01%     
==========================================
  Files          59       59              
  Lines       16956    16960       +4     
==========================================
+ Hits         8809     8813       +4     
  Misses       7850     7850              
  Partials      297      297              
Files Coverage Δ
cmd/nginx-ingress/flags.go 30.14% <ø> (ø)
internal/configs/config_params.go 77.77% <ø> (ø)
internal/configs/configmaps.go 22.61% <100.00%> (+0.34%) ⬆️
internal/configs/version1/config.go 0.00% <ø> (ø)
cmd/nginx-ingress/main.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shaun-nx shaun-nx requested a review from vepatel October 3, 2023 15:12
Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 great stuff, and clean tests 👍🏻

@haywoodsh
Copy link
Contributor

Please add the parameter in the helm README as well https://github.com/nginxinc/kubernetes-ingress/blob/feat/defaultServerListenerPorts/charts/nginx-ingress/README.md

@shaun-nx shaun-nx changed the title Allow default_server listeners to be removed with -disable-default-listeners cli argument Allow default_server listeners to be customised Oct 11, 2023
@shaun-nx shaun-nx requested a review from jjngx October 11, 2023 16:09
Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@shaun-nx shaun-nx merged commit aad4fc9 into main Oct 12, 2023
62 checks passed
@shaun-nx shaun-nx deleted the feat/defaultServerListenerPorts branch October 12, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements helm_chart Pull requests that update the Helm Chart tests Pull requests that update tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Allow default_server listen ports to be customised
5 participants