Files
buzz-sheet/k8s/base/deployment.yaml
T
gunshiz 89be58c517
CI / Verify (push) Successful in 1m29s
CI / Build immutable images and deploy (push) Successful in 1m48s
perf : better concurrent handle
2026-09-10 19:08:25 +07:00

99 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: buzz-sheet
labels:
app.kubernetes.io/name: buzz-sheet
app.kubernetes.io/component: web
spec:
replicas: 2
revisionHistoryLimit: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/name: buzz-sheet
app.kubernetes.io/component: web
template:
metadata:
labels:
app.kubernetes.io/name: buzz-sheet
app.kubernetes.io/component: web
spec:
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
nodeSelector:
kubernetes.io/arch: arm64
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: app
image: buzz-sheet-app
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
protocol: TCP
envFrom:
- configMapRef:
name: buzz-sheet-config
- secretRef:
name: buzz-sheet-env
env:
- name: NEXT_DEPLOYMENT_ID
valueFrom:
configMapKeyRef:
name: buzz-sheet-config
key: NEXT_DEPLOYMENT_ID
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
startupProbe:
httpGet:
path: /api/health
port: http
failureThreshold: 30
periodSeconds: 2
readinessProbe:
httpGet:
path: /api/health?ready=1
port: http
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 4
livenessProbe:
httpGet:
path: /api/health
port: http
failureThreshold: 3
periodSeconds: 20
timeoutSeconds: 3
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: true
volumeMounts:
- name: next-cache
mountPath: /app/.next/cache
- name: temporary
mountPath: /tmp
volumes:
- name: next-cache
emptyDir: {}
- name: temporary
emptyDir: {}