mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
docs: Provide example RBAC for API server in apps-in-any-namespace (#12341)
Signed-off-by: jannfis <jann@mistrust.net>
This commit is contained in:
11
examples/k8s-rbac/argocd-server-applications/README.md
Normal file
11
examples/k8s-rbac/argocd-server-applications/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
This folder contains example RBAC for Kubernetes to allow the Argo CD API
|
||||
Server (`argocd-server`) to perform CRUD operations on `Application` CRs
|
||||
in all namespaces on the cluster.
|
||||
|
||||
Applying the `ClusterRole` and `ClusterRoleBinding` grant the Argo CD API
|
||||
server read and write permissions cluster-wide, which may not be what you
|
||||
want. Handle with care.
|
||||
|
||||
Only apply these if you have installed Argo CD into the default namespace
|
||||
`argocd`. Otherwise, you need to edit the cluster role binding to bind to
|
||||
the service account in the correct namespace.
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: argocd-server-cluster-apps
|
||||
app.kubernetes.io/part-of: argocd
|
||||
app.kubernetes.io/component: server
|
||||
name: argocd-server-cluster-apps
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "argoproj.io"
|
||||
resources:
|
||||
- "applications"
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- update
|
||||
- patch
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: argocd-server-cluster-apps
|
||||
app.kubernetes.io/part-of: argocd
|
||||
app.kubernetes.io/component: server
|
||||
name: argocd-server-cluster-apps
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: argocd-server-cluster-apps
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argocd-server
|
||||
namespace: argocd
|
||||
Reference in New Issue
Block a user