feat(bstein-dev-home): add SA/RBAC for ai pod discovery

This commit is contained in:
Brad Stein 2025-12-21 00:46:09 -03:00
parent 24532fbdd5
commit de693bafbe
3 changed files with 31 additions and 0 deletions

View File

@ -15,6 +15,7 @@ spec:
labels: labels:
app: bstein-dev-home-backend app: bstein-dev-home-backend
spec: spec:
serviceAccountName: bstein-dev-home
nodeSelector: nodeSelector:
kubernetes.io/arch: arm64 kubernetes.io/arch: arm64
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"

View File

@ -5,6 +5,7 @@ namespace: bstein-dev-home
resources: resources:
- namespace.yaml - namespace.yaml
- image.yaml - image.yaml
- rbac.yaml
- frontend-deployment.yaml - frontend-deployment.yaml
- frontend-service.yaml - frontend-service.yaml
- backend-deployment.yaml - backend-deployment.yaml

View File

@ -0,0 +1,29 @@
# services/bstein-dev-home/rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: bstein-dev-home
namespace: bstein-dev-home
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: bstein-dev-home-ai-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
resourceNames: []
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: bstein-dev-home-ai-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: bstein-dev-home-ai-reader
subjects:
- kind: ServiceAccount
name: bstein-dev-home
namespace: bstein-dev-home