Skip to content

Add reporter metrics to examples - #419

Open
rawadhossain wants to merge 1 commit into
kubernetes-sigs:mainfrom
rawadhossain:reporter-examples
Open

Add reporter metrics to examples#419
rawadhossain wants to merge 1 commit into
kubernetes-sigs:mainfrom
rawadhossain:reporter-examples

Conversation

@rawadhossain

Copy link
Copy Markdown
Contributor

Description

This PR adds example config for the reporter metrics added in #379

  • Added the metrics port (9445) to both reporter DaemonSets (cni-readiness, constrained-impersonation).
  • Added a PodMonitor manifest for each example, for anyone using prometheus-operator. Applying it is a separate step, not part of apply-calico.sh.
  • Added an extra label to each example's pods so the two PodMonitors don't accidentally scrape each other's pods if both examples are deployed together.

Related to #380

Builds on #379

Type of Change

/kind documentation

Checklist

  • make test passes
  • make lint passes

@kubernetes-prow kubernetes-prow Bot added the kind/documentation Categorizes issue or PR as related to documentation. label Aug 17, 2026
@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit 40d0888
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6a85b2cf5653850008893978

@kubernetes-prow
kubernetes-prow Bot requested review from mrunalp and tallclair August 17, 2026 20:53
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 17, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @rawadhossain. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 17, 2026
@rawadhossain

Copy link
Copy Markdown
Contributor Author

/cc @AvineshTripathi @ajaysundark

@ajaysundark ajaysundark 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.

/lgtm
/hold

- operator: Exists
containers:
- name: cni-status-patcher
image: registry.k8s.io/node-readiness-controller/node-readiness-reporter:v0.1.1

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.

Note these examples are pinned to v0.1.1 version where the metrics are not available

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it. Since these examples are pinned to v0.1.1, should I leave the image tag as is for now?

app: cni-reporter
example: cni-readiness
spec:
hostNetwork: true

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.

These DS run as host network - as they need to scrape the CNI endpoint - this means we are exposing the http metrics endpoint on the host (9445). It's good to callout somewhere in the doc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added a note in the README for this

podMetricsEndpoints:
- port: metrics
path: /metrics
interval: 15s

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.

Can we keep this 60s for the example?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done, kept both to 60s now.

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 19, 2026
@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 19, 2026
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 19, 2026
@kubernetes-prow

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rawadhossain
Once this PR has been reviewed and has the lgtm label, please ask for approval from ajaysundark. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
@AvineshTripathi

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/documentation Categorizes issue or PR as related to documentation. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants