Skip to content

ACP-53276: Document disabling Ingress NGINX metrics#783

Merged
jing2uo merged 1 commit into
alauda:mainfrom
woodgear:feat/ACP-53276-ingng-close-metrics
Jun 9, 2026
Merged

ACP-53276: Document disabling Ingress NGINX metrics#783
jing2uo merged 1 commit into
alauda:mainfrom
woodgear:feat/ACP-53276-ingng-close-metrics

Conversation

@woodgear

@woodgear woodgear commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a How To article for disabling Ingress NGINX metrics through the IngressNginx custom resource.
  • Document the single required setting: spec.controller.metrics.enabled: false.
  • Add one focused verification step that checks the generated controller Deployment no longer contains --enable-metrics=true.
  • Clarify that this metrics setting is separate from the controller health check endpoint used by liveness/readiness probes.

Verification

  • awk frontmatter/title structure check passed.
  • ruby -ryaml frontmatter parse check passed, including kind: How To and tags: LB.
  • rg check confirmed the removed DaemonSet section, re-enable section, extra metrics fields, TODO/TBD markers, and leftover <name> placeholders are absent.
  • git diff --cached --check passed before amend.

Note

  • yarn install --immutable could not run because Corepack timed out downloading Yarn 4.13.0 from repo.yarnpkg.com.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Added comprehensive documentation for disabling Prometheus metrics on Ingress NGINX via IngressNginx custom resource patches on ACP 4.3.x and later, with prerequisite checks, disable/verify/re-enable workflows, and expected kubectl output examples.

Changes

Ingress NGINX Metrics Disabling Guide

Layer / File(s) Summary
Document structure and overview
docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md
Document frontmatter (kind, applicable products, tags) and introductory text establishing scope and clarifying metrics vs. health checks.
Disable metrics workflow
docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md
Prerequisites check, Chapter 1 patch procedure to disable spec.controller.metrics.enabled and nested toggles, reconciliation wait, and deployment condition verification.
Verification and re-enable workflow
docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md
Chapter 2 verification instructions for metrics argument, port, Service, and ServiceMonitor removal; Chapter 3 re-enable patch payload and final verification checklist.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A guide hops through the docs so bright,
To silence metrics' blinking light,
Patch by patch, with steps so clear,
Disable, check, then reappear! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: documenting how to disable Ingress NGINX metrics in relation to issue ACP-53276.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md (3)

160-162: ⚡ Quick win

Clarify 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 uses demo-all as 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.md around
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.md around
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.md at line
204, The sentence "After reconciliation, verify that the controller has the
--enable-metrics=true argument 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=true argument 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 -->

Comment thread docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md Outdated
Comment thread docs/en/solutions/How_to_Disable_Metrics_Port_for_Ingress_NGINX.md Outdated
@woodgear woodgear force-pushed the feat/ACP-53276-ingng-close-metrics branch from 1e49a47 to e4f2b8e Compare June 9, 2026 10:14
@woodgear woodgear force-pushed the feat/ACP-53276-ingng-close-metrics branch from e4f2b8e to 1c9266f Compare June 9, 2026 10:16
@jing2uo jing2uo merged commit 28ba676 into alauda:main Jun 9, 2026
2 checks passed
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