chore: explicitly define metrics and healthz container ports#366
chore: explicitly define metrics and healthz container ports#366vicentefb wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
✅ Deploy Preview for agent-sandbox canceled.
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aditya-shantanu, vicentefb The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/assign @janetkuo |
|
/assign @janetkuo |
|
/p0 |
|
/label P0 |
|
@aditya-shantanu: The label(s) DetailsIn response to this:
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. |
@aditya-shantanu would you like to use https://kubernetes.io/releases/release/#priority-label ? |
| - port: 80 | ||
| targetPort: 8080 | ||
| - name: metrics | ||
| port: 80 |
There was a problem hiding this comment.
should we have the metrics port at 8080 in the service ?
|
/label priority/critical-urgent |
|
@aditya-shantanu: The label(s) DetailsIn response to this:
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. |
|
/priority critical-urgent |
Currently, the controller actively serves metrics on :8080 and health probes on :8081, and our Service routes to 8080. However, the
Deploymenttemplate omits thecontainerPortdefinitions.This PR explicitly defines the metrics (8080) and healthz (8081) ports on the container spec. While functionally a no-op for basic routing, this is a standard k8s best practice that makes the manifest self-documenting.
It makes the controller 'Prometheus-Ready' out of the box, allowing users in the community to target the controller using standard
PodMonitororServiceMonitorresources via named ports (port: metrics) without needing to write custom patches.