helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

3.2.1 no longer allow multiple Ingress classes

Open damacus opened this issue 1 year ago • 2 comments

Details

  • Upgraded from 3.1.0 to 3.2.1
  • Use multiple Ingresses example here

Error

Error: template: app-template/templates/common.yaml:14:3: executing "app-template/templates/common.yaml" 

at <include "bjw-s.common.loader.generate" .>: error calling include: template: app-template/charts/common/templates/loader/_generate.tpl:13:6: executing "bjw-s.common.loader.generate" 

at <include "bjw-s.common.render.ingresses" .>: error calling include: template: app
template/charts/common/templates/render/_ingresses.tpl:23:10: executing "bjw-s.common.render.ingresses" 

at <include "bjw-s.common.class.ingress" (dict "rootContext" $ "object" $ingressObject)>: error calling include: template: app-template/charts/common/templates/classes/_ingress.tpl:32:34: executing "bjw-s.common.class.ingress" 

at <$value>: wrong type for value; expected string; got interface {}

Removing the second ingress fixes the error

damacus avatar Jun 19 '24 15:06 damacus

Been a bit busy with life but I've just removed the second ingress again and noticed that the ingress no longer appends -app e.g.

  • home-assistant-app
  • home-assistant-internal

See here for the flux-local diff

I can't see anything in the commits that would cause this though.

damacus avatar Jul 15 '24 12:07 damacus

Not really sure why that is happening in the flux-diff output. When I run your values against 3.2.1 I can see the home-assistant-app and home-assistant-internal ingresses as you would expect.

bjw-s avatar Jul 29 '24 11:07 bjw-s

Closing this one for now as I've been unable to reproduce. Feel free to comment here if it happens again and we can try to reproduce it.

bjw-s avatar Oct 04 '24 13:10 bjw-s

I'm able to reproduce this issue:

Helm install failed for release network/adguard with chart [email protected]: template: app-template/templates/common.yaml:14:3: executing "app-template/templates/common.yaml" at <include "bjw-s.common.loader.generate" .>: error calling include: template: app-template/charts/common/templates/loader/_generate.tpl:13:6: executing "bjw-s.common.loader.generate" at <include "bjw-s.common.render.ingresses" .>: error calling include: template: app-template/charts/common/templates/render/_ingresses.tpl:23:10: executing "bjw-s.common.render.ingresses" at <include "bjw-s.common.class.ingress" (dict "rootContext" $ "object" $ingressObject)>: error calling include: template: app-template/charts/common/templates/classes/_ingress.tpl:32:34: executing "bjw-s.common.class.ingress" at <$value>: wrong type for value; expected string; got interface {}

I took a copy of the echo-server template from onedr0p and basically replaced the image with the Adguard image to get the error I showed above: https://github.com/DevSecNinja/home/blob/4b27c453ff7ce516cc2c6fc25aaed4f7fc8f0fdb/kubernetes/apps/network/adguard/app/helmrelease.yaml

As soon as I downgraded from 3.5.1 to 3.1.0, the installation would proceed. I'm not sure where this goes wrong to be honest but I have a feeling it's in the template since I'm taking a literal copy of the echo-server template that has worked out fine.

DevSecNinja avatar Nov 03 '24 12:11 DevSecNinja

Hi @DevSecNinja, I tried to run with your values and indeed I see your error when rendering. It is caused by https://github.com/DevSecNinja/home/blob/4b27c453ff7ce516cc2c6fc25aaed4f7fc8f0fdb/kubernetes/apps/network/adguard/app/helmrelease.yaml#L94-L95. The chart expects a string, not a null value. When I remove those two annotations everything works as expected.

bjw-s avatar Nov 03 '24 14:11 bjw-s

Ah that must be it then! But the old version worked fine with these null values. See: https://github.com/DevSecNinja/home/commit/4b27c453ff7ce516cc2c6fc25aaed4f7fc8f0fdb

Thanks for your help and the great template! I’ll try it again with 3.5.1 without the null values.

DevSecNinja avatar Nov 03 '24 14:11 DevSecNinja

I just realised, that those annotations were null. Apologies for taking so long to get back to you! (I've literally just fixed it 🤦🏼 )

damacus avatar Nov 11 '24 16:11 damacus