Skip to content

Leveraging commonLabels results in YAML Parse Error #419

@barryCrunch

Description

@barryCrunch

Diode version

1.5.0

Deployment type

helm chart

Deployment type version

1.8.1

Diode SDK type

diode-sdk-python

Diode SDK version

N/A

Diode NetBox Plugin version

N/A

NetBox version

v4.4.2

Steps to reproduce

Inside of values.yaml give commonLabels a value.

commonAnnotations: {}
commonLabels:
  foo: bar

Expected behavior

I expect the helm template to render without errors with the additional labels.

kind: ServiceAccount
metadata:
  name: diode-dev-ingester-serviceaccount
  namespace: imc-itops-network
  labels:
    app.kubernetes.io/instance: diode-dev
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: diode
    app.kubernetes.io/version: 1.5.0
    foo: bar
    helm.sh/chart: diode-1.8.1
    app.kubernetes.io/component: diode-dev-ingester

Observed behavior

I receive a render error

Error: YAML parse error on imc-diode/charts/diode/templates/diode-auth-bootstrap-job.yaml: error converting YAML to JSON: yaml: line 11: mapping values are not allowed in this context

And when ran with --debug I see the following output -

kind: ServiceAccount
metadata:
  name: diode-dev-auth-serviceaccount
  namespace: imc-itops-network
  labels:
    helm.sh/chart: diode-1.8.1
    app.kubernetes.io/name: diode
    app.kubernetes.io/instance: diode-dev
    app.kubernetes.io/version: "1.5.0"
    app.kubernetes.io/managed-by: Helmapp.kubernetes.io/instance: diode-dev
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: diode
    app.kubernetes.io/version: 1.5.0
    foo: bar
    helm.sh/chart: diode-1.8.1
    app.kubernetes.io/component: diode-dev-auth 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus: needs triageThis issue is awaiting triage by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions