Skip to content

Templating in extraObjects is broken since 39.0.0 #1738

@xe-leon

Description

@xe-leon

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?

39.0.5

What version of Traefik are you using?

3.6.10

What did you expect to happen ?

I can use variables from .Values when templating in extraObjects: {}

What did you notice instead ?

Schema validation fails with:
Error: values don't meet the specifications of the schema(s) in the following chart(s):
traefik:

  • at '': additional properties 'vector' not allowed

What are your values ?

vector:
  exporterPort: 28090

...
deployment:
  additionalContainers:
  - name: vector
     volumeMounts:
      - name: vector-config
        readOnly: true
        mountPath: /etc/vector/
...

extraObjects:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: vector-config
      namespace: traefik
    vector.yml: |
      ...
      vector_exporter:
        type: prometheus_exporter
        address: 0.0.0.0:{{ .Values.vector.exporterPort }}

Additional Information

We've been using extraObjects to inject additional configuration without need to create extra helm release for it.
I think it can be resolved by adding `.Values.extraValues` to schema with `additionalProperties: true`

YAML manifests is just an example of usage variables in templates, we use templating much more and hardcoding would not be a solution here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/proposala proposal that needs to be discussed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions