Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

litmusctl 1.5.0 connect chaos-infra failed with openshift using namespace installation mode #225

Open
dariolstella opened this issue Apr 30, 2024 · 4 comments

Comments

@dariolstella
Copy link

$ litmusctl config use-account

Host endpoint where litmus is installed: https://

Username: admin

✅ Successfully set the current account to 'admin' at 'https://'

$ litmusctl connect chaos-infra
Project list:

  1. admin-project

Select a project [Range: 1-1]: 1

Installation Modes:

  1. Cluster
  2. Namespace

Select Mode [Default: cluster] [Range: 1-2]: 2

🏃 Running prerequisites check....
🔑 role ❌
🔑 rolebinding ❌
🚫 You don't have sufficient permissions.
🙄 Please use a service account with sufficient permissions.

Looking at litmus-server-role the following is set -->

  • apiGroups: [rbac.authorization.k8s.io]
    resources: [rolebindings, roles]
    verbs: [create]

And in the ValidateSAPermissions function on ops.go the resources are like -->

if mode == "cluster" {
resources = [2]string{"clusterrole", "clusterrolebinding"}
} else {
resources = [2]string{"role", "rolebinding"}

I guess that should be 'roles' and 'rolesbinding', right?.

@Nageshbansal
Copy link
Collaborator

hey @Jonsy13 could you PTAL

@Jonsy13
Copy link
Collaborator

Jonsy13 commented May 21, 2024

Hi @dariolstella The check is correct as we are checking for verbs.
Can you please check if you have the required permissions via below commands -

kubectl auth can-i create role
kubectl auth can-i create rolebindings

both commands should result in yes output

@dariolstella
Copy link
Author

dariolstella commented May 21, 2024

Hi @Jonsy13. Here's the output ->
% oc auth can-i create role
yes

% oc auth can-i create rolebindings
yes

@Jonsy13
Copy link
Collaborator

Jonsy13 commented May 21, 2024

Thanks @dariolstella Will look into it.
cc: @SarthakJain26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants