mirror of
https://github.com/fluxcd/flux2-hub-spoke-example.git
synced 2025-07-27 15:53:19 +00:00
Define restricted and cluster admin SAs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
b8466506b8
commit
ce8815b1d9
4 changed files with 39 additions and 16 deletions
37
clusters/staging/tenants/flux.yaml
Normal file
37
clusters/staging/tenants/flux.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: staging
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: admin-team
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: admin-team
|
||||||
|
name: flux-restricted
|
||||||
|
namespace: staging
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: admin-team
|
||||||
|
name: flux-cluster-admin
|
||||||
|
namespace: staging
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: admin-team
|
||||||
|
name: flux-cluster-admin
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: flux-cluster-admin
|
||||||
|
namespace: staging
|
|
@ -20,5 +20,5 @@ roleRef:
|
||||||
name: cluster-admin
|
name: cluster-admin
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: flux-apps
|
name: flux-restricted
|
||||||
namespace: staging
|
namespace: staging
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: staging
|
|
||||||
labels:
|
|
||||||
toolkit.fluxcd.io/tenant: dev-team
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
toolkit.fluxcd.io/tenant: dev-team
|
|
||||||
name: flux-apps
|
|
||||||
namespace: staging
|
|
|
@ -53,4 +53,4 @@ spec:
|
||||||
name: cluster-kubeconfig
|
name: cluster-kubeconfig
|
||||||
- op: add
|
- op: add
|
||||||
path: /spec/serviceAccountName
|
path: /spec/serviceAccountName
|
||||||
value: flux-apps
|
value: flux-restricted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue