rancher / k3k

Kubernetes in Kubernetes
Apache License 2.0
182 stars 24 forks source link

Controller panics on cluster create #70

Closed maxsokolovsky closed 10 months ago

maxsokolovsky commented 11 months ago

The nil pointer dereference occurs on cluster create: https://github.com/rancher/k3k/blob/dd618e580ae635c75be8f5bee7923b4f436747e4/pkg/controller/cluster/cluster.go#L144

Earlier in the method, the controller checks if spec.persistence is nil and sets it to a non-nil value if yes. However, the call to update the object somehow resets the value back to nil: https://github.com/rancher/k3k/blob/dd618e580ae635c75be8f5bee7923b4f436747e4/pkg/controller/cluster/cluster.go#L114

galal-hussein commented 10 months ago

Fixed in v0.1.1-rc1