From 0142f40d590dff710f5595a02c9125aad4088dfa Mon Sep 17 00:00:00 2001 From: Cao Shufeng Date: Thu, 8 Dec 2016 07:41:32 -0500 Subject: [PATCH 1/2] [authorization] update doc about roleRef This update is made according to this commit in code: https://github.com/kubernetes/kubernetes/commit/8c788233e778f3b0ebef560762c1433c12ea1d43 It has already be released with k8s v1.5, so it's reasonable to update the doc now. --- docs/admin/authorization.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/admin/authorization.md b/docs/admin/authorization.md index 1a86359a92..dfec38b216 100644 --- a/docs/admin/authorization.md +++ b/docs/admin/authorization.md @@ -297,9 +297,8 @@ subjects: name: jane roleRef: kind: Role - namespace: default name: pod-reader - apiVersion: rbac.authorization.k8s.io/v1alpha1 + apiGroup: rbac.authorization.k8s.io ``` `RoleBindings` may also refer to a `ClusterRole`. However, a `RoleBinding` that @@ -324,7 +323,7 @@ subjects: roleRef: kind: ClusterRole name: secret-reader - apiVersion: rbac.authorization.k8s.io/v1alpha1 + apiGroup: rbac.authorization.k8s.io ``` Finally a `ClusterRoleBinding` may be used to grant permissions in all @@ -336,14 +335,14 @@ namespaces. The following `ClusterRoleBinding` allows any user in the group kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1alpha1 metadata: - name: read-secrets + name: read-secrets-global subjects: - kind: Group # May be "User", "Group" or "ServiceAccount" name: manager roleRef: kind: ClusterRole - name: secret-reader - apiVersion: rbac.authorization.k8s.io/v1alpha1 + name: secret-reader-global + apiGroup: rbac.authorization.k8s.io ``` ### Referring to Resources From 2a122c7a00b891ec6a3ad9fe24255b65a91c7c2c Mon Sep 17 00:00:00 2001 From: CaoShuFeng Date: Thu, 8 Dec 2016 17:28:56 -0600 Subject: [PATCH 2/2] Update authorization.md fix role name --- docs/admin/authorization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/authorization.md b/docs/admin/authorization.md index dfec38b216..57018e35fa 100644 --- a/docs/admin/authorization.md +++ b/docs/admin/authorization.md @@ -341,7 +341,7 @@ subjects: name: manager roleRef: kind: ClusterRole - name: secret-reader-global +  name: secret-reader apiGroup: rbac.authorization.k8s.io ```