[BACKEND] Initialize Go backend structure and dependencies (#23)
This commit is contained in:
104
k8s/lite.yaml
Normal file
104
k8s/lite.yaml
Normal file
@@ -0,0 +1,104 @@
|
||||
# k8s/lite.yaml
|
||||
# ============================================
|
||||
# Chat Switchboard - Lite (FE-Only)
|
||||
# ============================================
|
||||
# Static SPA with no backend. All data in localStorage.
|
||||
# Deployed to lite.DOMAIN on push to main.
|
||||
# ============================================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: switchboard-lite
|
||||
namespace: ${NAMESPACE}
|
||||
labels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: lite
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: lite
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: lite
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: ${FE_IMAGE}:${IMAGE_TAG}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 30
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: switchboard-lite
|
||||
namespace: ${NAMESPACE}
|
||||
labels:
|
||||
app: switchboard
|
||||
env: lite
|
||||
spec:
|
||||
selector:
|
||||
app: switchboard
|
||||
component: frontend
|
||||
env: lite
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: switchboard-lite
|
||||
namespace: ${NAMESPACE}
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "${CERT_ISSUER}"
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
labels:
|
||||
app: switchboard
|
||||
env: lite
|
||||
spec:
|
||||
ingressClassName: "traefik"
|
||||
tls:
|
||||
- hosts:
|
||||
- ${DEPLOY_HOST}
|
||||
secretName: switchboard-lite-tls
|
||||
rules:
|
||||
- host: "${DEPLOY_HOST}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: switchboard-lite
|
||||
port:
|
||||
number: 80
|
||||
Reference in New Issue
Block a user