tenant-engine/deploy/tenant-engine.yaml
tegwick 9ed391aec7 Finish TEN-WP-0005-T05: ship lifecycle image and verify production
Pin tenant-engine to the CI-built digest from 7e68cc8, record rollback
digests, and close T05 after live create/update/retire/replay/reactivate
evidence against a disposable production tenant. Hands the 0.1.0 contract
to USER-WP-0021.
2026-08-14 01:42:41 +02:00

140 lines
3.1 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: tenant-engine
labels:
net-kingdom/component: tenant-engine
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tenant-engine-data
namespace: tenant-engine
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tenant-engine
namespace: tenant-engine
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: tenant-engine
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: tenant-engine
spec:
automountServiceAccountToken: false
containers:
- name: tenant-engine
env:
- name: TENANT_ENGINE_DATABASE_PATH
value: /data/tenant-engine.db
- name: TENANT_ENGINE_FLEX_AUTH_URL
value: http://flex-auth-tenant-engine.flex-auth.svc.cluster.local:8080
image: forgejo.coulomb.social/coulomb/tenant-engine@sha256:08be0b1dcdc65575592b7be665c28e09a82316ea3d4c9b551ccb753f25360612
livenessProbe:
httpGet:
path: /health
port: http
periodSeconds: 20
ports:
- containerPort: 8090
name: http
readinessProbe:
httpGet:
path: /health
port: http
periodSeconds: 5
resources:
limits:
cpu: 300m
memory: 192Mi
requests:
cpu: 25m
memory: 48Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /data
name: data
securityContext:
fsGroup: 10001
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
volumes:
- name: data
persistentVolumeClaim:
claimName: tenant-engine-data
---
apiVersion: v1
kind: Service
metadata:
name: tenant-engine
namespace: tenant-engine
spec:
ports:
- name: http
port: 8090
targetPort: http
selector:
app.kubernetes.io/name: tenant-engine
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: tenant-engine
namespace: tenant-engine
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: tenant-engine
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: user-engine
podSelector:
matchLabels:
app.kubernetes.io/name: user-engine
ports:
- port: 8090
protocol: TCP
egress:
- ports:
- port: 8080
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: flex-auth
podSelector:
matchLabels:
app.kubernetes.io/name: flex-auth-tenant-engine
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system