diff --git a/manifests/rbac/clusterroles.yaml b/manifests/rbac/clusterroles.yaml new file mode 100644 index 00000000..8a3711bd --- /dev/null +++ b/manifests/rbac/clusterroles.yaml @@ -0,0 +1,100 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-view: "true" + name: flux-view +rules: +- apiGroups: + - source.toolkit.fluxcd.io + resources: + - buckets + - gitrepositories + - helmcharts + - helmrepositories + verbs: + - get + - list + - watch +- apiGroups: + - notification.toolkit.fluxcd.io + resources: + - alerts + - providers + - receivers + verbs: + - get + - list + - watch +- apiGroups: + - kustomize.toolkit.fluxcd.io + resources: + - kustomizations + verbs: + - get + - list + - watch +- apiGroups: + - helm.toolkit.fluxcd.io + resources: + - helmreleases + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + name: flux-edit +rules: +- apiGroups: + - source.toolkit.fluxcd.io + resources: + - buckets + - gitrepositories + - helmcharts + - helmrepositories + verbs: + - create + - delete + - deletecollection + - patch + - update +- apiGroups: + - notification.toolkit.fluxcd.io + resources: + - alerts + - providers + - receivers + verbs: + - create + - delete + - deletecollection + - patch + - update +- apiGroups: + - kustomize.toolkit.fluxcd.io + resources: + - kustomizations + verbs: + - create + - delete + - deletecollection + - patch + - update +- apiGroups: + - helm.toolkit.fluxcd.io + resources: + - helmreleases + verbs: + - create + - delete + - deletecollection + - patch + - update diff --git a/manifests/rbac/kustomization.yaml b/manifests/rbac/kustomization.yaml index 6a1d4a69..9fbcd99a 100644 --- a/manifests/rbac/kustomization.yaml +++ b/manifests/rbac/kustomization.yaml @@ -3,3 +3,4 @@ kind: Kustomization resources: - controller.yaml - reconciler.yaml + - clusterroles.yaml