[BACKEND] Initialize Go backend structure and dependencies (#23)
This commit is contained in:
80
k8s/frontend.yaml
Normal file
80
k8s/frontend.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
# k8s/frontend.yaml
|
||||
# ============================================
|
||||
# Chat Switchboard - Frontend Deployment
|
||||
# ============================================
|
||||
# Static nginx serving the SPA. No /api/ proxy here —
|
||||
# the Ingress routes /api/ directly to the backend service.
|
||||
# ============================================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: switchboard-fe${DEPLOY_SUFFIX}
|
||||
namespace: ${NAMESPACE}
|
||||
labels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: ${ENVIRONMENT}
|
||||
spec:
|
||||
replicas: ${FE_REPLICAS}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: ${ENVIRONMENT}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: ${ENVIRONMENT}
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: ${FE_IMAGE}:${IMAGE_TAG}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
memory: "${FE_MEMORY_REQUEST}"
|
||||
cpu: "${FE_CPU_REQUEST}"
|
||||
limits:
|
||||
memory: "${FE_MEMORY_LIMIT}"
|
||||
cpu: "${FE_CPU_LIMIT}"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: switchboard-fe${DEPLOY_SUFFIX}
|
||||
namespace: ${NAMESPACE}
|
||||
labels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: ${ENVIRONMENT}
|
||||
spec:
|
||||
selector:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: ${ENVIRONMENT}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
name: http
|
||||
Reference in New Issue
Block a user