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).
This commit is contained in:
Lance 2026-10-20 10:06:51 -04:00
commit 45951c6200
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,34 @@
# 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