Project Role Bindings grant access to a specified Project Role for a specified group of people.
Configure Project Role Bindings - UI Method
Before you can create a Project Role Binding, ensure an administrator has created a Group. A Kommander Group can contain one or several Identity Provider users or groups.
You can assign a role to this Kommander Group:
-
From the Projects page, select your project.
-
Select the Role Bindings tab, then select Add Roles next to the group you want.
-
Select the Role, or Roles, you want from the drop-down menu, and then select Save.
Configure Project Role Bindings - CLI Method
A Project Policy can also be created using kubectl:
Configure Project Role Bindings to Bind to WorkspaceRoles - CLI Method
You can also create a Project Policy to bind to a WorkspaceRole in certain instances. To list the WorkspaceRoles that you can bind to a Project, run the following command:
You can bind to any of the above WorkspaceRoles by setting spec.workspaceRoleRef
in the project policy:
Note that you must specify either workspaceRoleRef or projectRoleRef to be validated by the admission webhook. Specifying both values is not valid and will cause an error.
Ensure the projectns
, workspacens
, projectrole
(or workspacerole
) and the virtualgroup
variables are set before executing the command.
You can set them using the following commands (for a Kommander Group called user1
and a Project Role called admin
, and after setting the projectns
as explained in the previous section):
When a Project Role Binding is created, Kommander creates a Kubernetes FederatedRoleBinding
on the Kubernetes cluster where Kommander is running:
Then, if you run the following command on a Kubernetes cluster associated with the Project, you’ll see a Kubernetes RoleBinding Object, in the corresponding namespace: