RETIRED, Function as a Service for OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
1.6 KiB

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: qinling
rules:
- apiGroups: [""]
resources: ["nodes", "namespaces"]
verbs: ["list"]
- apiGroups: [""]
resources: ["namespaces"]
resourceNames: ["qinling"]
verbs: ["create"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: qinling
subjects:
- kind: User
name: qinling
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: qinling
apiGroup: rbac.authorization.k8s.io
---
# The qinling namespace should be created for the role and rolebinding
apiVersion: v1
kind: Namespace
metadata:
name: qinling
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: qinling
namespace: qinling
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["list", "get", "create", "delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["list", "get", "create", "patch", "delete", "deletecollection"]
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get"]
- apiGroups: ["extensions"]
resources: ["deployments"]
verbs: ["get", "create", "patch", "deletecollection"]
- apiGroups: ["extensions"]
resources: ["deployments/rollback"]
verbs: ["create"]
- apiGroups: ["extensions"]
resources: ["deployments/status"]
verbs: ["get"]
- apiGroups: ["extensions"]
resources: ["replicasets"]
verbs: ["deletecollection"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: qinling
namespace: qinling
subjects:
- kind: User
name: qinling
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: qinling
apiGroup: rbac.authorization.k8s.io