You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the KafkaCluster.spec.Broker.Id field has type int32, with supported range [-2,147,483,648, 2,147,483,647]. However, it is not possible to set the broker id to be negative, otherwise users would see the following error:
{"level":"error","ts":"2022-12-15T16:50:28.951Z","msg":"Reconciler error","controller":"KafkaCluster","controllerGroup":"kafka.banzaicloud.io","controllerKind":"KafkaCluster","KafkaCluster":{"name":"kafka","namespace":"kafka"},"namespace":"kafka","name":"kafka","reconcileID":"1b3299b0-a1dc-4bce-8f27-b809e7ccc374","error":"failed to reconcile resource: creating resource failed: PersistentVolumeClaim \"kafka--1-storage-0-prpfx\" is invalid: metadata.labels: Invalid value: \"-1\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","errorVerbose":"creating resource failed: PersistentVolumeClaim \"kafka--1-storage-0-prpfx\" is invalid: metadata.labels: Invalid value: \"-1\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')\nfailed to reconcile resource\ngithub.com/banzaicloud/koperator/pkg/resources/kafka.(*Reconciler).Reconcile\n\t/workspace/pkg/resources/kafka/kafka.go:273\ngithub.com/banzaicloud/koperator/controllers.(*KafkaClusterReconciler).Reconcile\n\t/workspace/controllers/kafkacluster_controller.go:125\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:121\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:320\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1594","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:326\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234"}
{"level":"info","ts":"2022-12-15T17:07:09.005Z","msg":"failed to reconcile resource: creating resource failed: PersistentVolumeClaim \"kafka--1-storage-0-l95xh\" is invalid: metadata.labels: Invalid value: \"-1\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","controller":"KafkaCluster","controllerGroup":"kafka.banzaicloud.io","controllerKind":"KafkaCluster","KafkaCluster":{"name":"kafka","namespace":"kafka"},"namespace":"kafka","name":"kafka","reconcileID":"2fb20bd0-b0db-41bf-bac8-804790ae6cab"}
Also, setting the broker id to be 65535(which is within the range of int32 and also positive) would result in the following error:
{"level":"info","ts":"2022-12-15T20:42:03.762Z","msg":"updating resource failed: admission webhook \"rev.validation.istio.io\" denied the request: configuration is invalid: port number 84625 must be in the range 1..65535","controller":"KafkaCluster","controllerGroup":"kafka.banzaicloud.io","controllerKind":"KafkaCluster","KafkaCluster":{"name":"kafka","namespace":"kafka"},"namespace":"kafka","name":"kafka","reconcileID":"93e69d4b-d3fa-4142-bdd7-0a8f9a905850"}
{"level":"error","ts":"2022-12-15T20:42:03.762Z","msg":"Reconciler error","controller":"KafkaCluster","controllerGroup":"kafka.banzaicloud.io","controllerKind":"KafkaCluster","KafkaCluster":{"name":"kafka","namespace":"kafka"},"namespace":"kafka","name":"kafka","reconcileID":"93e69d4b-d3fa-4142-bdd7-0a8f9a905850","error":"updating resource failed: admission webhook \"rev.validation.istio.io\" denied the request: configuration is invalid: port number 84625 must be in the range 1..65535","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:326\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234"}
Steps to reproduce the issue:
Set one of the broker id in KafkaCluster spec to the numbers described above
Expected behavior
Koperator has correct range for broker id at data type definition
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, the
KafkaCluster.spec.Broker.Id
field has typeint32
, with supported range [-2,147,483,648, 2,147,483,647]. However, it is not possible to set the broker id to be negative, otherwise users would see the following error:Also, setting the broker id to be
65535
(which is within the range ofint32
and also positive) would result in the following error:Steps to reproduce the issue:
Set one of the broker id in
KafkaCluster
spec to the numbers described aboveExpected behavior
Koperator has correct range for broker id at data type definition
The text was updated successfully, but these errors were encountered: