Skip to content

Support Assigning Multiple Pod Labels via Helm Chart #181

@karthiktumu

Description

@karthiktumu

The current helm chart supports adding only one Pod label via the helm chart.

Below is our values file and error we're seeing when trying to assign multiple pod labels

Values.yaml

octopus:
   pods:
      labels:
         key1: value1
         key2: value2
         key3: value3

Error

Error: YAML parse error on octopusdeploy-helm/templates/statefulset.yaml: error converting YAML to JSON: yaml: line 26: mapping values are not allowed in this context

The helm chart statefulset template has to be changed as below

Current Pod Labels Block

      {{- if .Values.octopus.pods.labels }}
      {{ toYaml .Values.octopus.pods.labels | indent 2 }}
      {{- end }}

Proposed Pod Labels Block

      {{- with .Values.octopus.pods.labels }}
      {{ toYaml . | indent 2 }}
      {{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions