Skip to content

revisionHistoryLimit: 0 is silently ignored due to truthy check in templates #60339

@cuerty

Description

@cuerty

Official Helm Chart version

1.18.0 (latest released)

Apache Airflow version

3.0.2

Kubernetes Version

v1.32.10

Helm Chart configuration

revisionHistoryLimit: 0

Docker Image customizations

No response

What happened

Setting revisionHistoryLimit: 0 in values.yaml is silently ignored. The rendered manifests do not include the revisionHistoryLimit field, causing Kubernetes to use its default value (10) instead of keeping zero old ReplicaSets.

What you think should happen instead

Setting revisionHistoryLimit: 0 should render revisionHistoryLimit: 0 in the deployment manifests, allowing users to disable ReplicaSet history retention.

How to reproduce

  1. Set in values.yaml:
revisionHistoryLimit: 0
  1. Render the templates:
helm template airflow apache-airflow/airflow --set revisionHistoryLimit=0 | grep -A2 revisionHistoryLimit

Anything else

The templates use a truthy check:

{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}

In Go templates, 0 evaluates to false, so the block is skipped.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:helm-chartAirflow Helm Chartkind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions