Skip to content

Support off and critical log level#9271

Open
wweiwei-li wants to merge 3 commits into
envoyproxy:mainfrom
wweiwei-li:logLevel
Open

Support off and critical log level#9271
wweiwei-li wants to merge 3 commits into
envoyproxy:mainfrom
wweiwei-li:logLevel

Conversation

@wweiwei-li

@wweiwei-li wweiwei-li commented Jun 22, 2026

Copy link
Copy Markdown

What type of PR is this?
This change adds two new log levels off and critical to the LogLevel enum used by EnvoyProxy's logging configuration.
What this PR does / why we need it:
Envoy natively supports off and critical log levels, but Envoy Gateway's API previously only exposed trace, debug, info, warn, and error. Users who need to completely silence logging or restrict it to only critical messages had no way to do so through the EnvoyProxy CRD.
What

  • Extended the LogLevel type in shared_types.go with LogLevelOff (disables logging entirely) and LogLevelCritical (only logs critical-level messages).
  • Updated the kubebuilder validation enum to include the new values.
  • Regenerated CRD manifests for both gateway-crds-helm and gateway-helm charts.
  • Updated API reference docs for latest

Testing

  • Added unit tests in envoyproxy_validate_test.go for both GetEnvoyProxyDefaultComponentLevel and GetEnvoyProxyComponentLevelArgs covering the new levels.
  • Added a deployment test case (component-level-off) in resource_provider_test.go with a corresponding golden file verifying that --log-level off and --component-log-level filter:critical are correctly rendered in the container args.

@wweiwei-li wweiwei-li requested a review from a team as a code owner June 22, 2026 19:11
@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit b68f712
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a45a1a8d296d700087f3824
😎 Deploy Preview https://deploy-preview-9271--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b11dcbaa44

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +762 to +763
- "off"
- critical

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Regenerate helm goldens after CRD changes

When gen-check runs, it invokes helm-template, which rewrites the rendered test/helm/gateway-crds-helm/*.out.yaml files from this template. These new enum entries are now present in the chart template, but a repo search (rg '"off"' test/helm/gateway-crds-helm) shows the gateway-crds-helm goldens were not updated, so CI will leave a dirty tree and fail until the rendered outputs are regenerated.

Useful? React with 👍 / 👎.

Comment on lines +3060 to +3061
| `off` | LogLevelOff disables logging.<br /> |
| `critical` | LogLevelCritical defines the "critical" logging level.<br /> |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update v1.8 docs instead of v1.4

This feature is being added on a tree whose VERSION is v1.8.1, and make docs copies latest into site/content/en/v1.8, not v1.4. Adding these values under site/content/en/v1.4 retroactively documents off/critical for an older release that does not have the API change, while the current site/content/en/v1.8/api/extension_types.md still omits them.

Useful? React with 👍 / 👎.

@wweiwei-li wweiwei-li force-pushed the logLevel branch 2 times, most recently from 6473c80 to 11bec99 Compare June 22, 2026 19:37

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why changes this mannually?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hey, Thanks for reviewing it. It was my first contribution, a little confused about what needs to be included and what not.

Just removed it and only depend on run make generate. Now it is only under latest

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.21%. Comparing base (9d49939) to head (b68f712).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9271      +/-   ##
==========================================
+ Coverage   75.20%   75.21%   +0.01%     
==========================================
  Files         252      252              
  Lines       41093    41093              
==========================================
+ Hits        30902    30910       +8     
+ Misses       8089     8080       -9     
- Partials     2102     2103       +1     

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Weiwei Li <weiweiww@amazon.com>
@wweiwei-li

Copy link
Copy Markdown
Author

Rebased. Also updated the release notes to meet new requirements. The previous conformance and E2E tests failed. But it seems not related to my change. I will see how new tests running

@wweiwei-li

Copy link
Copy Markdown
Author

tests failed again , but I don't think it is caused by my change

@zirain

zirain commented Jun 26, 2026

Copy link
Copy Markdown
Member

/retest

@wweiwei-li

Copy link
Copy Markdown
Author

Hey, @zirain , Can you please let me know if we can merge it or if we need to retest? The failure does not seem related to my changes. Please let me know what I can do next

@zirain

zirain commented Jul 1, 2026

Copy link
Copy Markdown
Member

@wweiwei-li it's a flaky test

@zirain zirain requested a review from a team July 1, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants