dragonflydb / dragonfly-operator

A Kubernetes operator to install and manage Dragonfly instances.
https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation
Apache License 2.0
132 stars 28 forks source link

Operator crash with EKS 1.27 #79

Closed angelprada closed 1 year ago

angelprada commented 1 year ago

Hello.

I tried to run dragonfly-operator 0.0.6 in EKS 1.27 but dragonfly-operator-controller-manager crashes:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x124ba90]

goroutine 1 [running]:
k8s.io/client-go/discovery.convertAPIResource(...)
    /go/pkg/mod/k8s.io/client-go@v0.26.1/discovery/aggregated_discovery.go:88
k8s.io/client-go/discovery.convertAPIGroup({{{0x0, 0x0}, {0x0, 0x0}}, {{0xc000149500, 0x15}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
    /go/pkg/mod/k8s.io/client-go@v0.26.1/discovery/aggregated_discovery.go:69 +0x5f0
k8s.io/client-go/discovery.SplitGroupsAndResources({{{0xc000148390, 0x15}, {0xc000048060, 0x1b}}, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...})
    /go/pkg/mod/k8s.io/client-go@v0.26.1/discovery/aggregated_discovery.go:35 +0x2f8
k8s.io/client-go/discovery.(*DiscoveryClient).downloadAPIs(0x17b2071?)
    /go/pkg/mod/k8s.io/client-go@v0.26.1/discovery/discovery_client.go:310 +0x47c

I had the same problem with solr-operator, was resolved by updating the kubernetes client: https://github.com/apache/solr-operator/pull/592/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6

ashotland commented 1 year ago

Thanks @angelprada for the report and suggesting a fix.