2026-09-28 02:45:41 +00:00
|
|
|
# RBAC for api-gateway image promotion.
|
|
|
|
|
# Grants the api-gateway ServiceAccount get+patch on ArgoCD Applications
|
|
|
|
|
# so it can update kustomize.images / helm.parameters after a container push.
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: ClusterRole
|
|
|
|
|
metadata:
|
|
|
|
|
name: image-promoter
|
|
|
|
|
labels:
|
|
|
|
|
app: api-gateway
|
|
|
|
|
rules:
|
|
|
|
|
- apiGroups: ["argoproj.io"]
|
|
|
|
|
resources: ["applications"]
|
|
|
|
|
verbs: ["get", "patch"]
|
|
|
|
|
---
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
|
metadata:
|
|
|
|
|
name: image-promoter-api-gateway
|
|
|
|
|
labels:
|
|
|
|
|
app: api-gateway
|
|
|
|
|
subjects:
|
|
|
|
|
- kind: ServiceAccount
|
|
|
|
|
name: api-gateway
|
|
|
|
|
namespace: api
|
|
|
|
|
roleRef:
|
|
|
|
|
kind: ClusterRole
|
|
|
|
|
name: image-promoter
|
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
2026-09-28 19:53:37 +08:00
|
|
|
---
|
|
|
|
|
# Role + RoleBinding for pi-session sandbox manager (§4.15.4).
|
|
|
|
|
# api-gateway SA needs get/create/delete for pods, pvcs, services,
|
|
|
|
|
# and networkpolicies in the poimen namespace.
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: Role
|
|
|
|
|
metadata:
|
|
|
|
|
name: session-sandbox-manager
|
|
|
|
|
namespace: poimen
|
|
|
|
|
labels:
|
|
|
|
|
app: api-gateway
|
|
|
|
|
rules:
|
|
|
|
|
- apiGroups: [""]
|
|
|
|
|
resources: ["pods", "persistentvolumeclaims", "services"]
|
|
|
|
|
verbs: ["get", "list", "create", "delete"]
|
|
|
|
|
- apiGroups: ["networking.k8s.io"]
|
|
|
|
|
resources: ["networkpolicies"]
|
|
|
|
|
verbs: ["get", "create", "delete"]
|
|
|
|
|
---
|
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
|
kind: RoleBinding
|
|
|
|
|
metadata:
|
|
|
|
|
name: session-sandbox-manager-api-gateway
|
|
|
|
|
namespace: poimen
|
|
|
|
|
labels:
|
|
|
|
|
app: api-gateway
|
|
|
|
|
subjects:
|
|
|
|
|
- kind: ServiceAccount
|
|
|
|
|
name: api-gateway
|
|
|
|
|
namespace: api
|
|
|
|
|
roleRef:
|
|
|
|
|
kind: Role
|
|
|
|
|
name: session-sandbox-manager
|
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|