40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
# Admin cluster role
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: wego-admin-cluster-role
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets", "pods" ]
|
|
verbs: [ "get", "list" ]
|
|
- apiGroups: ["apps"]
|
|
resources: [ "deployments", "replicasets"]
|
|
verbs: [ "get", "list" ]
|
|
- apiGroups: ["kustomize.toolkit.fluxcd.io"]
|
|
resources: [ "kustomizations" ]
|
|
verbs: [ "get", "list", "patch" ]
|
|
- apiGroups: ["helm.toolkit.fluxcd.io"]
|
|
resources: [ "helmreleases" ]
|
|
verbs: [ "get", "list", "patch" ]
|
|
- apiGroups: ["source.toolkit.fluxcd.io"]
|
|
resources: [ "buckets", "helmcharts", "gitrepositories", "helmrepositories", "ocirepositories" ]
|
|
verbs: [ "get", "list", "patch" ]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["get", "watch", "list"]
|
|
---
|
|
# Bind the cluster admin role to admins
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: wego-cluster-admin
|
|
subjects:
|
|
- kind: User
|
|
name: "victor@xirion.net"
|
|
apiGroup: rbac.authorization.k8s.io
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: wego-admin-cluster-role
|
|
apiGroup: rbac.authorization.k8s.io
|