Skip to content

Values.ingress.*.hosts does not template TLS hosts correctly #62358

@stephen-bracken

Description

@stephen-bracken

Official Helm Chart version

1.19.0 (latest released)

Apache Airflow version

3.1.7

Kubernetes Version

1.33.5

Helm Chart configuration

mysettings:
  hostname: myairflow.example.com
ingress:
        apiServer:
          enabled: true
          hosts: 
            - "{{ tpl .Values.mysettings.hostname . }}"
          tls:
            enabled: true

Docker Image customizations

No response

What happened

templating the hosts field using tpl works for non TLS hosts, but for the spec.tls.[*].hosts section, the field is escaped using {{ .name | quote }} in the ingress template. This results in the following:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations: {}
  labels:
    app: airflow
    chart: airflow-1.19.0
    component: airflow-ingress
    heritage: Helm
    release: airflow
    tier: airflow
  name: airflow-ingress
spec:
  rules:
  - host: myairflow.example.com
    http:
      paths:
      - backend:
          service:
            name: airflow-api-server
            port:
              name: api-server
        path: /
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - '{{ tpl .Values.mysettings.hostname . }}'
    secretName: null

What you think should happen instead

The spec.tls.[*].hosts fields need to be templated in the same way as the spec.rules.[*].hosts field.

How to reproduce

see Helm chart configuration

Anything else

No response

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