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

Add configurable data plane log level #2561

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

bjee19
Copy link
Contributor

@bjee19 bjee19 commented Sep 16, 2024

Add Nginx error log level to NginxProxy.

Problem: Users would like to assign a log level for the data plane.

Solution: Add Nginx error log level to NginxProxy which allows users to set the error log level for Nginx.

Testing: Unit tests and manual testing.

Manual testing included

  • Validating the enum values in the new ErrorLevel field in the NginxProxy resource.
  • Deploying NGF, setting up the cafe-app, deploying an NginxProxy resource, and testing each of the possible log levels and checking that the nginx conf (the main.conf file and running nginx -T) in the nginx container was updated correctly.
  • Checked that if the error level was not set in the NginxProxy resource, the nginx conf would be correctly updated back to the default of info log level.
  • Tested that if a log level was set to something "beneath" notice such as the error level, after making changes which would result in notice log levels being outputted (such as deleting and re-applying cafe.yaml in the cafe example), no notice log levels are outputted.
  • nginx -T correctly shows the main.conf configuration file being included in the nginx configuration.

Closes #901

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.


@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 16, 2024
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.35%. Comparing base (edbd856) to head (832acf9).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2561      +/-   ##
==========================================
+ Coverage   89.34%   89.35%   +0.01%     
==========================================
  Files         100      101       +1     
  Lines        7630     7675      +45     
  Branches       50       50              
==========================================
+ Hits         6817     6858      +41     
- Misses        756      761       +5     
+ Partials       57       56       -1     

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

apis/v1alpha1/nginxproxy_types.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the helm-chart Relates to helm chart label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Configurable Data Plane Log-Level
3 participants