feat(swarm): add swarm self-improvement loop infrastructure
Adds complete k8s manifests, ArgoCD app, and Terraform namespace resources for the Neuron swarm self-improvement loop system. Each variant (alpha, beta, gamma) gets its own isolated namespace, PVC, MCP/REST deployments, ExternalSecrets from Vault, RBAC for CI, and a SQLite clone Job template for session startup.
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# RBAC for swarm variant namespaces
|
||||
# Grants the CI runner ServiceAccount permission to deploy to swarm-* namespaces.
|
||||
# Mirrors the pattern used for neuron-dev/stage deployments.
|
||||
# The CI runner runs in the `ci` namespace as the `default` ServiceAccount.
|
||||
---
|
||||
# swarm-alpha
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: swarm-deployer
|
||||
namespace: swarm-alpha
|
||||
rules:
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "services", "pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: ci-runner-swarm-alpha
|
||||
namespace: swarm-alpha
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: ci
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: swarm-deployer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# swarm-beta
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: swarm-deployer
|
||||
namespace: swarm-beta
|
||||
rules:
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "services", "pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: ci-runner-swarm-beta
|
||||
namespace: swarm-beta
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: ci
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: swarm-deployer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
# swarm-gamma
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: swarm-deployer
|
||||
namespace: swarm-gamma
|
||||
rules:
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps", "services", "pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: ci-runner-swarm-gamma
|
||||
namespace: swarm-gamma
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: ci
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: swarm-deployer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
Reference in New Issue
Block a user