Manage Roles and Bindings
Create New Cluster Role
Export a cluster role as the template.
oc get clusterrole system:hpa-patcher -o yaml > clusterrole.yamlEdit the template for the new cluster role. For example:
apiVersion: v1 kind: ClusterRole metadata: name: custom:dc-patcher rules: - apiGroups: - "" attributeRestrictions: null resources: - deploymentconfigs verbs: - get - list - patch - watchCreate the new cluster role.
oc create -f clusterrole.yamlAdd the new cluster role to an user.
oadm policy add-cluster-role-to-user custom:dc-patcher <USERNAME>Add the new cluster role to an user for an specific project.
oadm policy add-role-to-user custom:dc-patcher <USERNAME> -n <PROJECT>Verify the role-bindings.
oc get rolebinding -n <PROJECT> oc describe clusterPolicyBindings :default
Last updated