jaegertracing / helm-charts

Helm Charts for Jaeger backend
Apache License 2.0
254 stars 338 forks source link

[jaeger] quote host name in ingress templates #572

Closed coryflucas closed 2 months ago

coryflucas commented 2 months ago

What this PR does

Quote host name in ingress templates to prevents a yaml syntax error when using a host starting with a wildcard.

helm template . --set "query.ingress.enabled=true" --set "query.ingress.hosts[0]=*.example.test" now has this output:

...
---
# Source: jaeger/templates/query-ing.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: release-name-jaeger-query
  labels:
    helm.sh/chart: jaeger-3.0.7
    app.kubernetes.io/name: jaeger
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/version: "1.53.0"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: query
spec:
  rules:
    - host: "*.example.test"
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: release-name-jaeger-query
                port:
                  number: 80

Before the change it would try to render with - host: *.example.test which is invalid YAML because of the value starting with a *.

Which issue this PR fixes

Checklist