From 45951c620064e6023945ecd320af6a96b1a9b86e Mon Sep 17 00:00:00 2001 From: Lance Date: Tue, 20 Oct 2026 10:06:51 -0400 Subject: [PATCH] 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). --- apps/base/siriusdevops/deployer.yaml | 34 +++++++++++++++++++++++ apps/base/siriusdevops/kustomization.yaml | 1 + 2 files changed, 35 insertions(+) create mode 100644 apps/base/siriusdevops/deployer.yaml diff --git a/apps/base/siriusdevops/deployer.yaml b/apps/base/siriusdevops/deployer.yaml new file mode 100644 index 0000000..6f4ec1f --- /dev/null +++ b/apps/base/siriusdevops/deployer.yaml @@ -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 diff --git a/apps/base/siriusdevops/kustomization.yaml b/apps/base/siriusdevops/kustomization.yaml index 742b5df..29e6eb9 100644 --- a/apps/base/siriusdevops/kustomization.yaml +++ b/apps/base/siriusdevops/kustomization.yaml @@ -7,3 +7,4 @@ resources: - service-site.yaml - service-api.yaml - httproute.yaml + - deployer.yaml