Skip to content

[kube-state-metrics] fix: do not render *Probe.httpGet.httpHeaders when array is empty#6783

Open
MadJlzz wants to merge 1 commit into
prometheus-community:mainfrom
MadJlzz:dont-render-httpHeaders-when-empty
Open

[kube-state-metrics] fix: do not render *Probe.httpGet.httpHeaders when array is empty#6783
MadJlzz wants to merge 1 commit into
prometheus-community:mainfrom
MadJlzz:dont-render-httpHeaders-when-empty

Conversation

@MadJlzz

@MadJlzz MadJlzz commented Mar 25, 2026

Copy link
Copy Markdown

What this PR does / why we need it

This PR is fixing invalid YAML rendering when any probes httpHeaders are unset. It's not mandatory because YAML spec treats undefined values as null but some linters flag those as "errors".

Which issue this PR fixes

I can open an issue for traceability, I just decided not to do it - please tell me if you want me to.

  • fixes #

Special notes for your reviewer

Before:

startupProbe:
  failureThreshold: 3
  httpGet:
    httpHeaders:
    path: /healthz
    port: http
    scheme: HTTP
[...]
livenessProbe:
  failureThreshold: 3
  httpGet:
    httpHeaders:
    path: /livez
    port: http
    scheme: HTTP
[...]
readinessProbe:
  failureThreshold: 3
  httpGet:
    httpHeaders:
    path: /readyz
    port: metrics
    scheme: HTTP

After:

startupProbe:
  failureThreshold: 3
  httpGet:
    path: /healthz
    port: http
    scheme: HTTP
[...]
readinessProbe:
  failureThreshold: 3
  httpGet:
    path: /readyz
    port: metrics
    scheme: HTTP
[...]
livenessProbe:
  failureThreshold: 3
  httpGet:
    path: /livez
    port: http
    scheme: HTTP

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@MadJlzz MadJlzz force-pushed the dont-render-httpHeaders-when-empty branch from 33fb8c9 to bd343c6 Compare March 25, 2026 18:02
…n array is empty

Signed-off-by: Julien Klaer <j.klaer@tadaweb.com>
@MadJlzz MadJlzz force-pushed the dont-render-httpHeaders-when-empty branch from bd343c6 to 317a7ce Compare April 9, 2026 09:54
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.

1 participant