Unleash / helm-charts

Contains helm-charts for Unleash
Apache License 2.0
44 stars 57 forks source link

ValidationError when enabling Ingress #22

Closed jaboge closed 2 years ago

jaboge commented 3 years ago

Hi,

The chart seems to work as intended until I enable the ingress:

helm upgrade -i -f values.yaml unleash unleash/unleash

Error: UPGRADE FAILED: template: unleash/templates/ingress.yaml:35:21: executing "unleash/templates/ingress.yaml" at <.path>: can't evaluate field path in type interface {}

values.yaml:

ingress:
  enabled: true #modified!
  annotations:
    {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: ["/test"] #modified!
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

The above values.yaml is an extract from values.yaml, modified as commented above.

Am I doing something wrong or is this a template problem?

ivarconr commented 3 years ago

Hi there 👋🏼.

I have not tested this, but I think you need to add paths as an object according to the k8s docs.

I assume something like this will work:

ingress:
  enabled: true #modified!
  annotations:
    {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: 
      - path: /test
        pathType: prefix
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local
jaboge commented 3 years ago

Thanks - that solved it!

Perhaps a full example in values.yaml would be helpful to the next person?