What happened
The aws-vpc-cni Helm chart defines podMonitor.scrapeTimeout in values.yaml, but the PodMonitor template never references it. As a result, a user who sets podMonitor.scrapeTimeout has their value silently ignored — the rendered PodMonitor has no scrapeTimeout field, so Prometheus falls back to its own default.
charts/aws-vpc-cni/values.yaml (defines the value):
podMonitor:
# The interval to scrape metrics.
interval: 30s
# The timeout before a metrics scrape fails.
scrapeTimeout: 30s
charts/aws-vpc-cni/templates/podmonitor.yaml (uses interval but not scrapeTimeout):
podMetricsEndpoints:
- interval: {{ .Values.podMonitor.interval }}
path: /metrics
port: metrics
{{- if .Values.nodeAgent.enabled }}
- interval: {{ .Values.podMonitor.interval }}
path: /metrics
port: agentmetrics
{{- end }}
Expected behavior
Setting podMonitor.scrapeTimeout should propagate into each podMetricsEndpoints entry of the generated PodMonitor, so operators can bound how long Prometheus waits before marking a scrape of the CNI metrics endpoints as failed.
Proposed fix
Add scrapeTimeout to both endpoints (the metrics port and the agentmetrics port):
podMetricsEndpoints:
- interval: {{ .Values.podMonitor.interval }}
scrapeTimeout: {{ .Values.podMonitor.scrapeTimeout }}
path: /metrics
port: metrics
{{- if .Values.nodeAgent.enabled }}
- interval: {{ .Values.podMonitor.interval }}
scrapeTimeout: {{ .Values.podMonitor.scrapeTimeout }}
path: /metrics
port: agentmetrics
{{- end }}
Value of fixing
- Makes a documented, already-shipped configuration knob actually take effect instead of being silently dropped.
- Lets users tune scrape timeouts for the CNI metrics endpoints (useful on busy nodes where a scrape can take longer than the Prometheus default), avoiding spurious scrape failures/gaps in metrics.
- Small, self-contained, well-scoped change — good for a first-time contributor.
Affected file
charts/aws-vpc-cni/templates/podmonitor.yaml (value is defined in charts/aws-vpc-cni/values.yaml). Present on master.
What happened
The
aws-vpc-cniHelm chart definespodMonitor.scrapeTimeoutinvalues.yaml, but thePodMonitortemplate never references it. As a result, a user who setspodMonitor.scrapeTimeouthas their value silently ignored — the renderedPodMonitorhas noscrapeTimeoutfield, so Prometheus falls back to its own default.charts/aws-vpc-cni/values.yaml(defines the value):charts/aws-vpc-cni/templates/podmonitor.yaml(usesintervalbut notscrapeTimeout):Expected behavior
Setting
podMonitor.scrapeTimeoutshould propagate into eachpodMetricsEndpointsentry of the generatedPodMonitor, so operators can bound how long Prometheus waits before marking a scrape of the CNI metrics endpoints as failed.Proposed fix
Add
scrapeTimeoutto both endpoints (themetricsport and theagentmetricsport):Value of fixing
Affected file
charts/aws-vpc-cni/templates/podmonitor.yaml(value is defined incharts/aws-vpc-cni/values.yaml). Present onmaster.