Oc policy: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
Add an existing [[OpenShift_Security_Concepts#Role|role]] - by creating a [[OpenShift_Security_Concepts#Binding|binding]] - to users or service accounts, for the current project, or, if '-n' is used, for the specified project: | Add an existing [[OpenShift_Security_Concepts#Role|role]] - by creating a [[OpenShift_Security_Concepts#Binding|binding]] - to users or service accounts, for the current project, or, if '-n' is used, for the specified project: | ||
oc policy add-role-to-user [-n <''project-name''>] | oc policy add-role-to-user <''role-name''> <''user-name''> [-n <''project-name''>] | ||
oc policy add-role-to-user view system:serviceaccount:monitored-project:monitor-agent | |||
oc policy add-role-to-user view system:serviceaccount:monitored-project:monitor-agent | |||
==add-role-to-group== | ==add-role-to-group== |
Revision as of 17:05, 1 November 2017
Internal
Overview
Subcommands
add-role-to-user
Add an existing role - by creating a binding - to users or service accounts, for the current project, or, if '-n' is used, for the specified project:
oc policy add-role-to-user <role-name> <user-name> [-n <project-name>]
oc policy add-role-to-user view system:serviceaccount:monitored-project:monitor-agent
add-role-to-group
oc policy add-role-to-group view system:serviceaccounts -n <some-project>