tenant-engine/deploy/tenant-engine.yaml
tegwick 7e68cc835e
All checks were successful
Build and Publish Container Image / build-and-push (push) Successful in 20s
Start TEN-WP-0005-T05: recover deploy manifests and add CI image build
Production still serves the TEN-WP-0004 image, which has no lifecycle
routes. Recover the live railiance01 objects into deploy/ so rollback
does not depend on a cluster annotation, and add the fleet CI image
workflow so the lifecycle image is built from a forge revision.
2026-08-14 01:37:44 +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:2249e8c6ee44ae36081cddc52daf9c3f63acd18a95a5d620ab4fa7ac85149207
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