Fix input/output of selfsubjectaccess review (#5593)

This commit is contained in:
Qiming
2017-09-25 11:39:54 +08:00
committed by Zach Corleissen
parent e396274119
commit f379efa3b4
+21 -30
View File
@@ -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