Files
0pt/deploy/k8s/deployment.yaml
T
siax-bot 5a6d5618e0
CI (SIAX Cloud) / sonar (pull_request) Skipped
masterplan-lock / check (pull_request) Successful in 5s
CI (SIAX Cloud) / Component conformance (blocking) (pull_request) Successful in 8s
CI (SIAX Cloud) / security (pull_request) Successful in 15s
security / scan (pull_request) Successful in 39s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m8s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m44s
fix(ci): clear 0pt security/scan baseline (pinned tooling, non-root runtime)
2026-11-20 20:20:57 +01:00

90 lines
2.4 KiB
YAML

# Reference only -- see deploy/k8s/README.md. Not applied by any CI/CD path.
apiVersion: apps/v1
kind: Deployment
metadata:
name: 0pt-web
labels:
app: 0pt-web
spec:
replicas: 2
selector:
matchLabels:
app: 0pt-web
template:
metadata:
labels:
app: 0pt-web
spec:
# Den här manifesten är referens-only (se README.md), men den ska vara
# säker att använda. Imagebygget kör redan USER node (uid 1000).
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: 0pt-web
image: REPLACE_ME/0pt-web:REPLACE_ME_TAG
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
# Real values come from Infisical (BACKLOG P0-1), never from a
# committed manifest -- see siax.config.json's `env` list for the
# names this app reads.
envFrom:
- secretRef:
name: 0pt-web-env
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /api/ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
resources:
# Placeholder -- no live traffic history exists to size against
# (BACKLOG P0-2/D5). Replace before any real use.
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "1"
memory: "512Mi"
# readOnlyRootFilesystem above needs explicit writable scratch space:
# Node/Next writes temp files and caches here at runtime.
volumeMounts:
- name: tmp
mountPath: /tmp
- name: next-cache
mountPath: /app/.next/cache
volumes:
- name: tmp
emptyDir: {}
- name: next-cache
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: 0pt-web
spec:
selector:
app: 0pt-web
ports:
- port: 80
targetPort: 3000