Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Provide example RBAC for API server in apps-in-any-namespace (cherry-pick #12341) #12824

Merged
merged 1 commit into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/k8s-rbac/argocd-server-applications/README.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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