alcounit / selenosis

Scalable, stateless selenium hub for Kubernetes cluster
Apache License 2.0
81 stars 24 forks source link

Read config cause panic: assignment to entry in nil map #43

Open alcounit opened 3 years ago

alcounit commented 3 years ago
chrome:
  defaultVersion: "90.0"
  path: "/"
  kernelCaps:
  - SYS_ADMIN
  spec:
    resources:
      requests:
        memory: 512Mi
        cpu: '500m'
      limits:
        memory: 1Gi
        cpu: '500m'
  versions:
    '90.0':
      image: selenoid/chrome:90.0
      meta:
        labels:
          environment: production
        annotations:
          app: veryCoolApp
time="2021-06-07T14:58:46Z" level=info msg="starting selenosis v1.0.5"
panic: assignment to entry in nil map
goroutine 1 [running]:
github.com/alcounit/selenosis/config.merge(0xc00046f170, 0x0, 0x1575f60)
    /src/config/config.go:160 +0xd8
github.com/alcounit/selenosis/config.readConfig(0x7ffe9ddc9b1f, 0x16, 0xc0003c8dd0, 0x1691b00, 0xc0003c8e00)
    /src/config/config.go:141 +0x319
github.com/alcounit/selenosis/config.NewBrowsersConfig(0x7ffe9ddc9b1f, 0x16, 0x16cf789, 0x15, 0xc000135c50)
    /src/config/config.go:39 +0x39
main.command.func1(0xc0003ca780, 0xc00030d440, 0x1, 0x11)
    /src/cmd/selenosis/main.go:55 +0x245
github.com/spf13/cobra.(*Command).execute(0xc0003ca780, 0xc00003c130, 0x11, 0x11, 0xc0003ca780, 0xc00003c130)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003ca780, 0x0, 0xffffffff, 0xc00008e058)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
    /go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
    /src/cmd/selenosis/main.go:202 +0x2a