Skip to content

Support configurable hostPort in helm chart #3321

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Gasoid
Copy link

@Gasoid Gasoid commented Apr 24, 2025

Proposed changes

hostPort field for nginx container is configurable

Problem: hostPort is not configurable for now

Solution: In values file were added hostPort section

Testing: Tested manually.

Closes #2933

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

Release notes

NONE

Copy link

nginx-bot bot commented Apr 24, 2025

Hi @Gasoid! Welcome to the project! 🎉

Thanks for opening this pull request!
Be sure to check out our Contributing Guidelines while you wait for someone on the team to review this.

@nginx-bot nginx-bot bot added the community label Apr 24, 2025
Copy link
Contributor

github-actions bot commented Apr 24, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot added enhancement New feature or request helm-chart Relates to helm chart labels Apr 24, 2025
@Gasoid
Copy link
Author

Gasoid commented Apr 24, 2025

I have hereby read the F5 CLA and agree to its terms

@bjee19
Copy link
Contributor

bjee19 commented Apr 24, 2025

Hey @Gasoid thanks for opening up this PR! We're going to hold off on this change right now because our architecture is changing in our next release (2.0) and there will be a different way to specify fields on the nginx container.

We are about to merge our feature branch change/control-data-plane-split into main, hopefully within the next week, and when that happens these changes would no longer work.

So after we merge our feature branch you could rewrite this PR to fit the new changes, it would probably look something like this PR #3319, OR we can probably just tag it alongside this issue #3240 which we'll complete by our 2.0 release.

We're fine either way, so please let us know what you'd like to do!

@Gasoid
Copy link
Author

Gasoid commented Apr 25, 2025

@bjee19 thx, i will take care of #3240
according to you, all issues with label "good first issue" are not needed to start doing?
e.g. i would like to do #3157 as well

@bjee19
Copy link
Contributor

bjee19 commented Apr 25, 2025

Hey @Gasoid, thanks for offering to do #3240, however that won't be necessary. That specific story is already scheduled in our current sprint so one of our team members will already be handling that. However, modifying this open PR after we merge our control data plane split changes into main is still an option and would be greatly appreciated to close out #2933.

according to you, all issues with label "good first issue" are not needed to start doing?

That sort of depends, we're in a tricky spot right now where we're just wrapping up our changes to release our 2.0 with major changes to our architecture, so it just means that the solution to some of these stories might change slightly. However after we merge our changes into main in this open PR (should be by next week), all these issues are good to go.

e.g. i would like to do #3157 as well

#3157 looks like a great issue that won't be affected too much with the changes coming in so you could start on that. There just might be some additional places to update after #3318 goes in.

@Gasoid
Copy link
Author

Gasoid commented Apr 26, 2025

However, modifying this open PR after we merge our control data plane split changes into main is still an option and would be greatly appreciated to close out #2933

ok, i will modify this PR once you have done everything with release

Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale Pull requests/issues with no activity label May 15, 2025
@mpstefan mpstefan removed the stale Pull requests/issues with no activity label May 20, 2025
@bjee19
Copy link
Contributor

bjee19 commented May 20, 2025

Hey @Gasoid, we've merged our change/control-data-plane-split into main, thus completing our big restructure change to our architecture. So if you'd still like to revise this PR feel free to, and please let us know if you have any questions!

@Gasoid
Copy link
Author

Gasoid commented May 21, 2025

yes, i am going to revise the PR next week

@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 29, 2025
@Gasoid
Copy link
Author

Gasoid commented May 29, 2025

i am not sure if this configuration is really needed
agent-grpc port is not actual http port?

@sjberman
Copy link
Collaborator

@Gasoid agent-grpc is the port on the control plane that the nginx agent connects to to receive configuration updates.

Comment on lines +138 to +140
{{- if .Values.nginx.hostPort.enable }}
hostPort: {{ .Values.nginx.hostPort.port }}
{{- end }}
Copy link
Collaborator

@sjberman sjberman May 29, 2025

Choose a reason for hiding this comment

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

This deployment is no longer for nginx, it's just the control plane.

The nginx deployment is built in-code by the control plane. #3319 is an example of how we now add a new field to the nginx deployment/service, so you'll need to do something similar to add these new hostPort fields. The fields need to exist in the NginxProxy CRD, which is populated at installation time via the helm chart (or at runtime via the k8s API), and is then ingested by the control plane to configure and deploy the nginx deployment.

Copy link
Author

Choose a reason for hiding this comment

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

ok, i will adjust nginxProxy CRD in order to support this hostPort field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community documentation Improvements or additions to documentation enhancement New feature or request helm-chart Relates to helm chart
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

Allow user to configure hostPorts in helm chart
4 participants