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

Dynamic control plane configuration support #943

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

sjberman
Copy link
Contributor

@sjberman sjberman commented Aug 8, 2023

Problem: We want to be able to change control plane settings dynamically, to avoid having to restart NKG and lose valuable state.

Solution: Introducing a new CRD that is initialized and created on startup, NginxGateway. This CRD can be updated by the user to dynamically change the state of the control plane. Right now we simply support changing the logging level. The controller will revert to using default values if the CRD is not detected.

Testing: Manually verified that the log level changes properly when updated. Events/statuses are also properly created when required.

Closes #554 #928

  • 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

@sjberman sjberman requested a review from a team as a code owner August 8, 2023 18:29
@github-actions github-actions bot added dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request labels Aug 8, 2023
@sjberman sjberman force-pushed the feature/cp-log-level branch 3 times, most recently from 36d4930 to 606489f Compare August 9, 2023 14:15
.github/workflows/ci.yml Outdated Show resolved Hide resolved
apis/v1alpha1/nginxgateway_types.go Show resolved Hide resolved
apis/v1alpha1/nginxgateway_types.go Outdated Show resolved Hide resolved
cmd/gateway/commands.go Outdated Show resolved Hide resolved
cmd/gateway/commands.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/manager.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/handler_test.go Show resolved Hide resolved
apis/v1alpha1/register.go Show resolved Hide resolved
cmd/gateway/commands.go Outdated Show resolved Hide resolved
docs/control-plane-configuration.md Outdated Show resolved Hide resolved
internal/mode/static/config/config.go Outdated Show resolved Hide resolved
internal/mode/static/config/config.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
cmd/gateway/commands.go Outdated Show resolved Hide resolved
cmd/gateway/commands.go Outdated Show resolved Hide resolved
examples/advanced-routing/gateway.yaml Outdated Show resolved Hide resolved
Copy link
Member

@ciarams87 ciarams87 left a comment

Choose a reason for hiding this comment

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

🚀

apis/v1alpha1/nginxgateway_types.go Show resolved Hide resolved
cmd/gateway/commands.go Show resolved Hide resolved
deploy/helm-chart/templates/control-config.yaml Outdated Show resolved Hide resolved
docs/control-plane-configuration.md Outdated Show resolved Hide resolved
docs/control-plane-configuration.md Outdated Show resolved Hide resolved
internal/framework/status/updater_test.go Show resolved Hide resolved
Problem: We want to be able to change control plane settings dynamically, to avoid having to restart NKG and lose valuable state.

Solution: Introducing a new CRD that is initialized and created on startup, NginxGateway. This CRD can be updated by the user to dynamically change the state of the control plane. Right now we simply support changing the logging level. The controller will revert to using default values if the CRD is not detected.
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

remaining review comments. I shared the previous batch prematurely :(

internal/mode/static/config_updater.go Show resolved Hide resolved
internal/mode/static/handler.go Show resolved Hide resolved
internal/mode/static/handler.go Outdated Show resolved Hide resolved
internal/mode/static/handler_test.go Show resolved Hide resolved
internal/mode/static/manager.go Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@sjberman sjberman merged commit 1f47bc0 into nginxinc:main Aug 11, 2023
21 checks passed
@sjberman sjberman deleted the feature/cp-log-level branch August 11, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Configurable Control Plane Log-Level
4 participants