Role
Example
Here’s an example of a Role.
.kubes/resources/shared/role.rb
name "demo"
apiGroups([""])
resources(["pods"])
verbs(["get", "watch", "list"])
Produces:
.kubes/output/shared/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: demo
rules:
- apiGroups:
- ''
resources:
- pods
verbs:
- get
- watch
- list
DSL Methods
Here’s the source of the Role resource.
For a full list of the available methods, refer to the source itself syntax/role.rb.