Files
bakery-ia/infrastructure/kubernetes/base/components/frontend/frontend-service.yaml
2025-09-27 12:10:43 +02:00

94 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: bakery-ia
labels:
app.kubernetes.io/name: frontend
app.kubernetes.io/component: frontend
app.kubernetes.io/part-of: bakery-ia
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: frontend
app.kubernetes.io/component: frontend
template:
metadata:
labels:
app.kubernetes.io/name: frontend
app.kubernetes.io/component: frontend
spec:
containers:
- name: frontend
image: bakery/dashboard:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
env:
- name: NODE_ENV
value: "production"
- name: VITE_APP_TITLE
valueFrom:
configMapKeyRef:
name: bakery-config
key: VITE_APP_TITLE
- name: VITE_APP_VERSION
valueFrom:
configMapKeyRef:
name: bakery-config
key: VITE_APP_VERSION
- name: VITE_API_URL
valueFrom:
configMapKeyRef:
name: bakery-config
key: VITE_API_URL
- name: VITE_ENVIRONMENT
valueFrom:
configMapKeyRef:
name: bakery-config
key: VITE_ENVIRONMENT
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
cpu: "500m"
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 60
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 20
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 3
---
apiVersion: v1
kind: Service
metadata:
name: frontend-service
namespace: bakery-ia
labels:
app.kubernetes.io/name: frontend
app.kubernetes.io/component: frontend
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: http
selector:
app.kubernetes.io/name: frontend
app.kubernetes.io/component: frontend