ACP-53276: Document disabling Ingress NGINX metrics#783
Conversation
WalkthroughAdded comprehensive documentation for disabling Prometheus metrics on Ingress NGINX via ChangesIngress NGINX Metrics Disabling Guide
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md (3)
160-162: ⚡ Quick winClarify expected error message with concrete example.
The expected error output shows
"${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics", which could confuse readers about whether this is a template or literal output. Since the walkthrough usesdemo-allas the example value (line 54), consider showing the concrete error message users would actually see.📝 Suggested improvement
Expected result: ```text -Error from server (NotFound): services "${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics" not found +Error from server (NotFound): services "demo-all-ingress-nginx-controller-metrics" not found</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.mdaround
lines 160 - 162, Replace the placeholder error string that shows the template
variable "${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics" with the
concrete example used earlier in the doc (demo-all) so the expected output
reads: Error from server (NotFound): services
"demo-all-ingress-nginx-controller-metrics" not found; update the instance of
"${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics" in the example output
to "demo-all-ingress-nginx-controller-metrics" to avoid confusion.</details> <!-- cr-comment:v1:75a58f0b1dccc5efe4c8ffdb --> --- `175-177`: _⚡ Quick win_ **Clarify expected error message with concrete example.** The expected error output shows `"${INGRESS_NGINX_NAME}-ingress-nginx-controller"`, which could confuse readers about whether this is a template or literal output. Since the walkthrough uses `demo-all` as the example value (line 54), consider showing the concrete error message users would actually see. <details> <summary>📝 Suggested improvement</summary> ```diff Expected result: ```text -Error from server (NotFound): servicemonitors.monitoring.coreos.com "${INGRESS_NGINX_NAME}-ingress-nginx-controller" not found +Error from server (NotFound): servicemonitors.monitoring.coreos.com "demo-all-ingress-nginx-controller" not found</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.mdaround
lines 175 - 177, Replace the templated placeholder in the example error message
so readers see the concrete output they would get; specifically update the
string "${INGRESS_NGINX_NAME}-ingress-nginx-controller" in the example error to
use the walkthrough's example value (demo-all), producing
"demo-all-ingress-nginx-controller" in the Error from server (NotFound) line so
it's not ambiguous whether the placeholder is literal or a substitution.</details> <!-- cr-comment:v1:0b9c73139545061cc9f061a1 --> --- `204-204`: _⚡ Quick win_ **Provide explicit verification commands for re-enablement.** The re-enable section instructs users to verify the changes but doesn't provide the specific commands. For better user experience, consider adding explicit verification commands or referencing the relevant steps from Chapter 2. <details> <summary>📋 Suggested addition</summary> Add after line 203: ```markdown After reconciliation, verify the metrics are re-enabled: 1. Confirm the controller has the `--enable-metrics=true` argument (see [Chapter 2, Step 1](`#step-1-confirm-the-metrics-argument-is-removed`)). 2. Verify the metrics Service exists: ```bash kubectl get service -n "${INGRESS_NGINX_NAMESPACE}" \ "${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics"Expected result: the Service should be found and display details.
</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.mdat line
204, The sentence "After reconciliation, verify that the controller has the
--enable-metrics=trueargument and that the metrics Service exists again."
lacks concrete commands; update this section to include explicit verification
steps: add a bullet or numbered list showing the kubectl command to check the
controller pod args (referencing Chapter 2, Step 1) and the kubectl get service
command to verify the Service (use the placeholder variables
INGRESS_NGINX_NAMESPACE and INGRESS_NGINX_NAME as in the suggested snippet), and
include the expected result text indicating the Service should be found.</details> <!-- cr-comment:v1:02da5f27ca1c4c745d6b392c --> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Inline comments:
In@docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md:
- Line 139: Replace the unhyphenated compound modifier "DaemonSet based
installation" with the correctly hyphenated form "DaemonSet-based installation"
wherever it appears (specifically the instance shown in the diff) so the
compound adjective is grammatically correct.- Line 119: Update the phrase "DaemonSet based installation" to use the compound
adjective form "DaemonSet-based installation" in the sentence that begins "For a
DaemonSet based installation, run the same check against the DaemonSet:" so the
hyphenated form is used consistently in the docs.
Nitpick comments:
In@docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md:
- Around line 160-162: Replace the placeholder error string that shows the
template variable "${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics" with
the concrete example used earlier in the doc (demo-all) so the expected output
reads: Error from server (NotFound): services
"demo-all-ingress-nginx-controller-metrics" not found; update the instance of
"${INGRESS_NGINX_NAME}-ingress-nginx-controller-metrics" in the example output
to "demo-all-ingress-nginx-controller-metrics" to avoid confusion.- Around line 175-177: Replace the templated placeholder in the example error
message so readers see the concrete output they would get; specifically update
the string "${INGRESS_NGINX_NAME}-ingress-nginx-controller" in the example error
to use the walkthrough's example value (demo-all), producing
"demo-all-ingress-nginx-controller" in the Error from server (NotFound) line so
it's not ambiguous whether the placeholder is literal or a substitution.- Line 204: The sentence "After reconciliation, verify that the controller has
the--enable-metrics=trueargument and that the metrics Service exists again."
lacks concrete commands; update this section to include explicit verification
steps: add a bullet or numbered list showing the kubectl command to check the
controller pod args (referencing Chapter 2, Step 1) and the kubectl get service
command to verify the Service (use the placeholder variables
INGRESS_NGINX_NAMESPACE and INGRESS_NGINX_NAME as in the suggested snippet), and
include the expected result text indicating the Service should be found.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro **Run ID**: `b73d9bcb-23c0-471a-afa4-7653985154d6` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 7ef067fca70d061f1e2873d51fa7a0623cc53ca1 and 1e49a472b9fc439fdab1ff7acab2e94cbcbb5b7c. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
1e49a47 to
e4f2b8e
Compare
e4f2b8e to
1c9266f
Compare
Summary
IngressNginxcustom resource.spec.controller.metrics.enabled: false.--enable-metrics=true.Verification
awkfrontmatter/title structure check passed.ruby -ryamlfrontmatter parse check passed, includingkind: How Toandtags: LB.rgcheck confirmed the removed DaemonSet section, re-enable section, extra metrics fields, TODO/TBD markers, and leftover<name>placeholders are absent.git diff --cached --checkpassed before amend.Note
yarn install --immutablecould not run because Corepack timed out downloading Yarn 4.13.0 fromrepo.yarnpkg.com.