camel-k
camel-k copied to clipboard
Wrong KameletBinding definition leads to operator panic
Adding a wrong definition such as:
errorHandler:
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: err-sink
leads to a camel k operator panic:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c7cd8d]
goroutine 555 [running]:
github.com/apache/camel-k/pkg/controller/kameletbinding.maybeErrorHandler(0x2281e96, {{0x26111c0, 0xc0002b3d70}, {0x268e200, 0xc000641380}, {0xc000e49140, 0xd}, {0x228a5fe, 0xa}})
github.com/apache/camel-k/pkg/controller/kameletbinding/error_handler.go:38 +0x10d
github.com/apache/camel-k/pkg/controller/kameletbinding.CreateIntegrationFor({0x26111c0, 0xc0002b3d70}, {0x268e200, 0xc000641380}, 0xc000d4ab40)
github.com/apache/camel-k/pkg/controller/kameletbinding/integration.go:112 +0x7f6
...
Any wrong definition should be treated and reported as an error without operator crash.