turash/k8s/frontend-deployment.yaml
2025-12-24 19:17:14 +01:00

77 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: turash-frontend
namespace: turash
labels:
app: turash-frontend
component: frontend
version: v1
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: turash-frontend
template:
metadata:
labels:
app: turash-frontend
component: frontend
version: v1
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "80"
prometheus.io/path: "/health"
spec:
containers:
- name: frontend
image: registry.bk.glpx.pro/turash/turash-frontend:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: VITE_API_BASE_URL
value: "https://turash-api.bk.glpx.pro"
- name: VITE_ENVIRONMENT
value: "production"
resources:
requests:
memory: "128Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
securityContext:
runAsNonRoot: true
runAsUser: 101 # nginx user
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
restartPolicy: Always
terminationGracePeriodSeconds: 30