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

CP/DP Split: Support basic NGINX OSS provisioning #3114

Merged

Conversation

sjberman
Copy link
Collaborator

This commit updates the control plane to deploy an NGINX data plane when a valid Gateway resource is created. When the Gateway is deleted or becomes invalid, the data plane is removed. The NginxProxy resource has been updated with numerous configuration options related to the k8s deployment and service configs, which the control plane will apply to the NGINX resources when set. The control plane fully owns the NGINX deployment resources, so users who want to change any configuration must do so using the NginxProxy resource.

This does not yet support NGINX Plus or NGINX debug mode. Those will be added in followup pull requests. This also adds some basic daemonset fields, but does not yet support deploying a daemosnet. That will also be added soon.

Testing: Verified the following for OSS

  • When valid Gateway is created, nginx resources are created
  • When Gateway is deleted or becomes invalid, nginx resources are deleted
  • If Gateway is deleted when control plane is down, associated nginx resources are deleted on startup
  • Changing NginxProxy Kubernetes settings results in the associated resources being updated
  • Deleting nginx resources while Gateway still exists results in nginx resources being re-created
  • Gateway Status Address is set to the nginx Service address

@sjberman sjberman requested review from a team as code owners February 10, 2025 15:32
@github-actions github-actions bot added documentation Improvements or additions to documentation chore Pull requests for routine tasks tests Pull requests that update tests helm-chart Relates to helm chart dependencies Pull requests that update a dependency file labels Feb 10, 2025
Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

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

still processing through the provisioner files, but here are some comments for now

apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/provisioner/store.go Outdated Show resolved Hide resolved
@sjberman sjberman force-pushed the chore/provision-nginx branch from 15d86bb to d7f5f58 Compare February 11, 2025 16:59
Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

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

this is taking a while, will just submit comments as i go

apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/nginxproxy_types.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Show resolved Hide resolved
Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

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

lgtm, good work!

@nginx nginx deleted a comment from salonich Feb 13, 2025
@nginx nginx deleted a comment from salonich Feb 13, 2025
@sjberman sjberman requested a review from salonichf5 February 13, 2025 15:50
@sjberman sjberman force-pushed the change/control-data-plane-split branch from b1ba80c to a5c989e Compare February 13, 2025 16:29
@sjberman sjberman force-pushed the chore/provision-nginx branch from 1aeca7e to c2a3425 Compare February 13, 2025 16:46
@github-actions github-actions bot removed the tests Pull requests that update tests label Feb 13, 2025
This commit updates the control plane to deploy an NGINX data plane when a valid Gateway resource is created. When the Gateway is deleted or becomes invalid, the data plane is removed. The NginxProxy resource has been updated with numerous configuration options related to the k8s deployment and service configs, which the control plane will apply to the NGINX resources when set. The control plane fully owns the NGINX deployment resources, so users who want to change any configuration must do so using the NginxProxy resource.

This does not yet support NGINX Plus or NGINX debug mode. Those will be added in followup pull requests. This also adds some basic daemonset fields, but does not yet support deploying a daemosnet. That will also be added soon.
@sjberman sjberman force-pushed the chore/provision-nginx branch from c2a3425 to 83c4566 Compare February 13, 2025 16:49
@github-actions github-actions bot added the tests Pull requests that update tests label Feb 13, 2025
@sjberman sjberman merged commit b884670 into nginx:change/control-data-plane-split Feb 13, 2025
20 of 21 checks passed
@sjberman sjberman deleted the chore/provision-nginx branch February 13, 2025 17:00
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 dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation helm-chart Relates to helm chart tests Pull requests that update tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants