docs: fix doc minor issues (#425)

This commit is contained in:
Bright Zheng
2021-09-20 14:35:33 +02:00
committed by GitHub
parent 26965a5ea2
commit 0039c91c23
4 changed files with 16 additions and 13 deletions
+6 -6
View File
@@ -36,20 +36,20 @@ subjects:
name: alice
roleRef:
kind: ClusterRole
name: namespace-deleter
name: capsule-namespace-deleter
apiGroup: rbac.authorization.k8s.io
```
So Alice is the admin of the namespaces:
```
kubectl get rolebindings -n oil-production
NAME ROLE AGE
namespace:admin ClusterRole/admin 9m5s
namespace-deleter ClusterRole/admin 9m5s
kubectl get rolebindings -n oil-development
NAME ROLE AGE
namespace:admin ClusterRole/admin 12s
namespace-deleter ClusterRole/capsule-namespace-deleter 12s
```
The said Role Binding resources are automatically created by Capsule controller when Alice creates a namespace in the tenant.
The said Role Binding resources are automatically created by Capsule controller when the tenant owner Alice creates a namespace in the tenant.
Alice can deploy any resource in the namespace, according to the predefined
[`admin` cluster role](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles).
+1 -1
View File
@@ -25,7 +25,7 @@ EOF
Allowed values are: `Always`, `IfNotPresent`, `Never`.
Any attempt of Alice to use a not allowed `imagePullPolicies` value is denied by the Validation Webhook enforcing it.
Any attempt of Alice to use a disallowed `imagePullPolicies` value is denied by the Validation Webhook enforcing it.
# Whats next
+2 -2
View File
@@ -109,6 +109,7 @@ yes
```
## Assign a robot account as tenant owner
As GitOps methodology is gaining more and more adoption everywhere, it's more likely that an application (Service Account) should act as Tenant Owner. In Capsule, a Tenant can also be owned by a Kubernetes _ServiceAccount_ identity.
The tenant manifest is modified as in the following:
@@ -123,7 +124,6 @@ spec:
owners:
- name: oil-users
kind: Group
owners:
- name: system:serviceaccount:default:robot
kind: ServiceAccount
EOF
@@ -132,7 +132,7 @@ EOF
Bill can create a Service Account called `robot`, for example, in the `default` namespace and leave it to act as Tenant Owner of the `oil` tenant
```
kubectl --as system:serviceaccount:default:robot --as-group capsule.clastix.io auth can-i create namesapces
kubectl --as system:serviceaccount:default:robot --as-group capsule.clastix.io auth can-i create namespaces
yes
```
@@ -238,12 +238,15 @@ Alice doesn't have permission to change or delete the resources according to the
```
kubectl -n oil-production auth can-i patch resourcequota
no - no RBAC policy matched
no
kubectl -n oil-production auth can-i delete resourcequota
no
kubectl -n oil-production auth can-i patch limitranges
no - no RBAC policy matched
no
kubectl -n oil-production auth can-i delete limitranges
no
```
# Whats next
See how Bill, the cluster admin, can enforce the PriorityClass of Pods running of Alice's tenant namespaces. [Enforce Pod Priority Classes](./pod-priority-class.md)
See how Bill, the cluster admin, can enforce the PriorityClass of Pods running of Alice's tenant namespaces. [Enforce Pod Priority Classes](./pod-priority-classes.md)