From d6e354be9e6a2999964493b65cad91146b9013db Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Sat, 23 Sep 2017 21:05:13 +0800 Subject: [PATCH] Fix input/output of selfsubjectaccess review --- docs/admin/authorization/index.md | 51 +++++++++++++------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/docs/admin/authorization/index.md b/docs/admin/authorization/index.md index 067e7e276c835..7b51bedc0df95 100644 --- a/docs/admin/authorization/index.md +++ b/docs/admin/authorization/index.md @@ -99,37 +99,28 @@ field of the returned object is the result of the query. ```bash $ kubectl create -f - -o yaml << EOF -{ - "kind": "SelfSubjectAccessReview", - "apiVersion": "authorization.k8s.io/v1", - "spec": { - "resourceAttributes": { - "group": "apps", - "name": "deployments", - "verb": "create", - "namespace": "dev" - } - } -} +apiVersion: authorization.k8s.io/v1 +kind: SelfSubjectAccessReview +spec: + resourceAttributes: + group: apps + name: deployments + verb: create + namespace: dev EOF -{ - "apiVersion": "authorization.k8s.io/v1", - "kind": "SelfSubjectAccessReview", - "metadata": { - "creationTimestamp": null - }, - "spec": { - "resourceAttributes": { - "group": "apps", - "name": "deployments", - "namespace": "dev", - "verb": "create" - } - }, - "status": { - "allowed": true - } -} + +apiVersion: authorization.k8s.io/v1 +kind: SelfSubjectAccessReview +metadata: + creationTimestamp: null +spec: + resourceAttributes: + group: apps + name: deployments + namespace: dev + verb: create +status: + allowed: true ``` ## Using Flags for Your Authorization Module