kubetail-org / kubetail

Web-based, real-time log viewer for Kubernetes
https://www.kubetail.com/demo
Apache License 2.0
301 stars 16 forks source link

panic: html/template: pattern matches no files: `/backend/templates/*` #29

Closed nodesocket closed 4 months ago

nodesocket commented 4 months ago

Just tried to upgrade to latest app version 0.3.0 using Helm chart 0.3.2 and getting the following error on startup:

panic: html/template: pattern matches no files: `/backend/templates/*`

goroutine 1 [running]:
github.com/kubetail-org/kubetail/internal/ginapp.mustLoadTemplatesWithFuncs({0x4000372db0, 0x14})
    /backend/internal/ginapp/helpers.go:52 +0x100
github.com/kubetail-org/kubetail/internal/ginapp.NewGinApp({{0x400049c9f9, 0x7}, {0x400049c980, 0xd}, {0x1b439f8, 0x1}, {0x0, 0x0}, {0x1, 0x0}, ...})
    /backend/internal/ginapp/ginapp.go:80 +0x30c
main.main.func2(0x400022b200?, {0x189405d?, 0x4?, 0x1894061?})
    /backend/cmd/server/main.go:217 +0x840
github.com/spf13/cobra.(*Command).execute(0x4000160300, {0x400003a070, 0x1, 0x1})
    /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x654
github.com/spf13/cobra.(*Command).ExecuteC(0x4000160300)
    /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
    /go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
    /backend/cmd/server/main.go:247 +0x204

Values file is:

deployment:
  resources:
    requests:
      cpu: 250m
      memory: 64Mi
    limits:
      cpu: 1
config:
  session:
    secret: my-secret-here
  csrf:
    secret: my-secret-here
ingress:
  enabled: true
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
    traefik.ingress.kubernetes.io/router.tls.certresolver: le
  hosts:
    - host: kubetail.mydomain.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - hosts:
        - kubetail.mydomain.com
amorey commented 4 months ago

So sorry about that! This should be fixed in the latest version (chart 0.3.3, app 0.3.1). Adding CI tests should prevent bugs like this from making it to production in the future. Let me know if you notice any other problems with the latest version.