Skip to content

[BUG] Helm chart 2.20.0 in registry contains broken manager deployment template for global tolerations #873

Description

@Sokratis1904

The Helm chart published as kedacore/keda version 2.20.0 contains a broken templates/manager/deployment.yaml template in the packaged chart artifact. When .Values.tolerations is set and .Values.operator.tolerations is not set, helm template / helm upgrade renders invalid YAML and fails with:

YAML parse error on keda/templates/manager/deployment.yaml: error converting YAML to JSON: yaml: line 134: mapping values are not allowed in this context

The issue is not caused by invalid user values. The root cause is that the packaged chart in the Helm registry contains a faulty tolerations branch:

{{- if .Values.operator.tolerations }}
tolerations:
  {{- toYaml .Values.operator.tolerations | nindent 8 }}
{{- else if .Values.tolerations }}
  {{- toYaml .Values.tolerations }}
{{- end }}

In the else if .Values.tolerations branch, the tolerations: key is missing, which causes invalid YAML to be emitted under spec.template.spec.

The current template in the GitHub repository appears to be corrected, but the published Helm chart package for 2.20.0 is still broken.

Expected Behavior

Setting global tolerations in values.yaml should render valid Kubernetes YAML for the operator deployment, for example:

tolerations:
  - key: supernode
    operator: Equal
    value: "true"
    effect: NoSchedule

helm template and helm upgrade should succeed when only .Values.tolerations is provided.

Actual Behavior

When only .Values.tolerations is set, rendering the published Helm chart kedacore/keda version 2.20.0 fails with:

Error: YAML parse error on keda/templates/manager/deployment.yaml: error converting YAML to JSON: yaml: line 134: mapping values are not allowed in this context

The failure occurs because the packaged chart renders the list from .Values.tolerations without the required tolerations: key.

Steps to Reproduce the Problem

  1. Create a values.yaml with global tolerations only:
 tolerations:
- key: infrastructure
  operator: Equal
  value: "true"
  effect: NoSchedule
  1. Render the published chart from the Helm registry:
 helm template keda kedacore/keda \
--namespace keda \
--version 2.20.0 \
-f values.yaml \
--show-only templates/manager/deployment.yaml \
--debug
  1. Observe the rendering failure:
Error: YAML parse error on keda/templates/manager/deployment.yaml: error converting YAML to JSON: yaml: line 134: mapping values are not allowed in this context
  1. Compare the packaged chart template with the current GitHub version and observe that the GitHub version contains corrected logic, while the Helm registry package still contains the faulty template.

Specifications

  • KEDA Version: 2.20.0 Helm chart
  • Platform & Version: Helm CLI, chart pulled from kedacore/keda Helm registry
  • Kubernetes Version: Not cluster-specific; reproducible during local chart rendering with helm template
  • Scaler(s): Not applicable

Optional note for maintainers:
The problematic section in the published chart is:

{{- if .Values.operator.tolerations }}
tolerations:
  {{- toYaml .Values.operator.tolerations | nindent 8 }}
{{- else if .Values.tolerations }}
  {{- toYaml .Values.tolerations }}
{{- end }}

The updated deployment.yaml in repo works and should be packed into helm package asap!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions