homek8s/apps/base/siriusdevops/deployer.yaml
Lance 45951c6200 siriusdevops: add a scoped CI deployer ServiceAccount
The site repo's CI used to ssh to the Pi and run docker there. It now rolls the
k8s Deployments through the API, so it needs an identity limited to
get/list/patch on deployments in this namespace (same pattern as sirius-growth).
2026-10-20 10:06:51 -04:00

34 lines
964 B
YAML

# Deployer identity used by the siriusdevops site repo's CI to roll the
# Deployments after pushing a new image. Deliberately minimal: patch/get/list on
# deployments in this namespace only. The kubeconfig is a repo secret
# (KUBE_CONFIG) in sirius/siriusdevops-contact; the token is minted with
# kubectl -n siriusdevops create token site-deployer --duration=8760h
apiVersion: v1
kind: ServiceAccount
metadata:
name: site-deployer
namespace: siriusdevops
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: site-deployer
namespace: siriusdevops
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: site-deployer
namespace: siriusdevops
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: site-deployer
subjects:
- kind: ServiceAccount
name: site-deployer
namespace: siriusdevops