SystemCraftsman / strimzi-kafka-cli

Command Line Interface for the Strimzi Kafka Operator
Apache License 2.0
78 stars 13 forks source link

error name cannot be provided when a selector is specified while altering user #85

Closed arpan57 closed 3 years ago

arpan57 commented 3 years ago

HI,

We added a user with kfk users --create --user my-user --authentication-type tls -n kafka -c my-cluster. and SSL authentication works like charm. Post that, we have setup the simple authentication in the strimzi cluster (using the example 3) When we try to add the ACLs using

kfk users --alter --user my-user --authorization-type simple --add-acl --resource-type topic --resource-name my-topic -n kafka -c my-cluster we get an error error: name cannot be provided when a selector is specified. Similarly when we try kfk acls --add --allow-principal User:my-user --group my-group --operation Read -n kafka -c my-cluster We hit the same error: name cannot be provided when a selector is specified.

We tried to edit the user's resource definition by $ kubectl -n kafka edit KafkaUser/my-user and added the ACLs it worked.

We are planning to use Strimzi CLI for topic, users and ACL management. However, this is limiting us to roll out the strimzi for wider use.

Is it a version mismatch? We are using 0.20.1 version of Strimzi and 1.16.15 version of kubectl.

$kfk env output
STRIMZI_KAFKA_CLI_STRIMZI_VERSION: 0.20.1.
STRIMZI_KAFKA_CLI_STRIMZI_PATH: /home/ec2-user/strimzi-0.20.1
STRIMZI_KAFKA_CLI_KUBECTL_VERSION : v1.16.15
STRIMZI_KAFKA_CLI_KUBECTL_PATH: /home/ec2-user/bin/kubectl

Output of $kfk version

CLI Version: 0.1.0a51
Strimzi Version: 0.20.1
Kubectl Version: v1.16.15

We are running Strimzi on EKS.

Please let me know if you need further info to debug.

Thank you, Arpan

mabulgu commented 3 years ago

Hi @arpan57 . Thanks for opening this issue!

Since Strimzi CLI is in alpha state we release a lot and our latest version is 0.1.0a57

Can you upgrade to this Alpha 57 version and try again? Let me know if you get the same error please. So that I can test with the most recent alpha version.

sudo pip install strimzi-kafka-cli==0.1.0a57

Or

sudo pip install strimzi-kafka-cli --upgrade

Best,

Aykut

arpan57 commented 3 years ago

Hi Aykut,

Thank you for the quick response.
After upgrading to latest version it worked.

How often do you update the Strimzi CLI? I absolutely love the Strimzi CLI and would love to be on the latest, so that we can avoid any potential bugs and can take advantage of the improvements.

Thank you, Arpan

mabulgu commented 3 years ago

Depending on the enhancements and improvements (and bugs) I can say quite often, but it depends on the development. I am the only maintainer for now and it generally depends on my working time frame on the issues. And depending on the size of the issue, it can be per 2-3 issues or just one issue (like it was for Kafka connect) per release.

Since it is alpha I try to release too often so I recommend you to upgrade periodically.

BTW Why are you using a self downloaded Strimzi package? I see that you are using your own strimzi installation (/home/ec2-user/strimzi-0.20.1). If you want to use a specific version you dont have to download it by yourself, you can just set the STRIMZI_KAFKA_CLI_STRIMZI_VERSION and if you are online and not behind a firewall or sth strimzi cli downloads the strimzi package of your choice of version.

I am glad you are using Strimzi Kafka CLI actively BTW. Can I also ask what kind of a project you are using it on? I am trying to gather some usecases per feedback. You may answer privately if you like.(aykut [at] systemcraftsman.com )

And if you liked the project, please give the project a star so that it can be more popular in the near future:) @arpan57

arpan57 commented 3 years ago

Hi,

Thanks for the response. I will mail you for the details.

However, I found another issue while deleting the acls from the user which don't seem to have any effect. I will create another issue as it's not related to this one.

Thanks, Arpan