Skip to content

Use server side apply for NGF CRDs #3589

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 3 commits into from
Jul 3, 2025
Merged

Conversation

bjee19
Copy link
Contributor

@bjee19 bjee19 commented Jul 3, 2025

Proposed changes

Update docs and Makefile to use kubectl server side apply for NGF CRDs.

Problem: The NginxProxy CRD is getting too large for the normal client side kubectl apply to handle.

Solution: Update docs and Makefile to use kubectl server side apply for NGF CRDs.

Testing: Deployed NGF through manifests using server-side applied CRDs and manually ran through the policy examples and the cafe-example to make sure NGF still works.

Closes #3549

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.

Switch to recommending using kubectl server-side apply for Nginx Gateway Fabric CRDs. 

@bjee19 bjee19 requested review from a team as code owners July 3, 2025 18:12
@github-actions github-actions bot added documentation Improvements or additions to documentation chore Pull requests for routine tasks helm-chart Relates to helm chart labels Jul 3, 2025
@bjee19
Copy link
Contributor Author

bjee19 commented Jul 3, 2025

Should note that with Helm, it does not run into the same client side apply issues as kubectl does so if a user were to deploy/install the CRDs with Helm there is no issue. Though if that same user wanted to update the CRDs after installation through Helm, they would be required to use kubectl apply and thus would run into the issue.

@bjee19
Copy link
Contributor Author

bjee19 commented Jul 3, 2025

This also means that all of our Functional tests and NFR tests that deploy NGF through Helm do not install the NGF CRDs through SSA, meaning NGF doesn't thoroughly test cases where the CRDs are SSA'd.

I could foresee unknown errors occurring with users who SSA their CRDs as it seems like there are some logic and validation differences between SSA and CSA. However, some of those issues were from a few years ago when SSA wasn't as popular and widely adopted, so maybe most of the issues have been hammered out.

Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.85%. Comparing base (75bde7c) to head (9f2a25a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3589   +/-   ##
=======================================
  Coverage   86.85%   86.85%           
=======================================
  Files         127      127           
  Lines       15266    15266           
  Branches       62       62           
=======================================
+ Hits        13259    13260    +1     
+ Misses       1853     1851    -2     
- Partials      154      155    +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.

@bjee19 bjee19 force-pushed the chore/use-server-side-apply branch from 6db6a34 to aec0cf0 Compare July 3, 2025 18:23
@bjee19 bjee19 force-pushed the chore/use-server-side-apply branch from aec0cf0 to 08d1c3d Compare July 3, 2025 19:12
@bjee19 bjee19 enabled auto-merge (squash) July 3, 2025 19:13
@bjee19 bjee19 merged commit c15bed3 into main Jul 3, 2025
50 checks passed
@bjee19 bjee19 deleted the chore/use-server-side-apply branch July 3, 2025 20:05
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks documentation Improvements or additions to documentation helm-chart Relates to helm chart release-notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Generated annotations too long leading to issues when CRD is being applied
4 participants