Skip to content

Allow for provisioning NGINX as DaemonSet #3397

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

Merged
merged 7 commits into from
May 27, 2025
Merged

Conversation

sjberman
Copy link
Collaborator

Problem: With the initial provisioner implementation, the NGINX gateway could only be installed as a Deployment. Users may want to install NGINX as a DaemonSet.

Solution: Allow for provisioning the NGINX gateway as a DaemonSet.

Testing: Deployed NGINX as a DaemonSet

Closes #3120

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

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NGINX can be provisioned as a DaemonSet

@sjberman sjberman requested a review from a team as a code owner May 22, 2025 15:35
@github-actions github-actions bot added enhancement New feature or request helm-chart Relates to helm chart labels May 22, 2025
Copy link

codecov bot commented May 22, 2025

Codecov Report

Attention: Patch coverage is 75.81699% with 37 lines in your changes missing coverage. Please review.

Project coverage is 86.78%. Comparing base (f9fa98c) to head (d3d722a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/mode/static/provisioner/provisioner.go 57.89% 23 Missing and 9 partials ⚠️
internal/mode/static/provisioner/handler.go 16.66% 0 Missing and 5 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3397   +/-   ##
=======================================
  Coverage   86.78%   86.78%           
=======================================
  Files         129      129           
  Lines       14928    15011   +83     
  Branches       62       62           
=======================================
+ Hits        12955    13028   +73     
- Misses       1823     1832    +9     
- Partials      150      151    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@salonichf5
Copy link
Contributor

I noticed you have tested for deploying NGINX as daemonSet but have you tested for the migration from daemonSet to deployment ? and vice versa?

@sjberman
Copy link
Collaborator Author

@salonichf5 Yes, it does work. Though when migrating, the previous object is left behind without being cleaned up. Let me actually look into how best we can clean that up, it wasn't apparently obvious to me at first.

Though I'm not sure how common of a use case this would be.

sjberman added 2 commits May 22, 2025 14:24
Problem: With the initial provisioner implementation, the NGINX gateway could only be installed as a Deployment. Users may want to install NGINX as a DaemonSet.

Solution: Allow for provisioning the NGINX gateway as a DaemonSet.
@sjberman sjberman force-pushed the feat/nginx-daemonset branch from 99ca3ec to 524bec1 Compare May 22, 2025 22:12
@salonichf5
Copy link
Contributor

@salonichf5 Yes, it does work. Though when migrating, the previous object is left behind without being cleaned up. Let me actually look into how best we can clean that up, it wasn't apparently obvious to me at first.

Though I'm not sure how common of a use case this would be.

yeah could be an edge case. Do you think it could lead network issues if we have two NGINX one of type deployment and daemonSet? If not, we can ignore this. I haven't manually tested this so I am not sure about the impact.

@sjberman
Copy link
Collaborator Author

@salonichf5 I pushed a change that fixes this.

@sjberman sjberman requested a review from salonichf5 May 27, 2025 18:27
Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

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

lgtm

@sjberman sjberman enabled auto-merge (squash) May 27, 2025 21:41
@sjberman sjberman merged commit b7c7c2d into main May 27, 2025
48 of 49 checks passed
@sjberman sjberman deleted the feat/nginx-daemonset branch May 27, 2025 22:01
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request helm-chart Relates to helm chart
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support provisioning nginx as DaemonSet
3 participants