60 lines
No EOL
1.6 KiB
YAML
60 lines
No EOL
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gohorse-backend-dev
|
|
namespace: gohorsejobsdev
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gohorse-backend-dev
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gohorse-backend-dev
|
|
env: development
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: forgejo-registry
|
|
initContainers:
|
|
- name: set-mtu
|
|
image: busybox
|
|
# CORREÇÃO: Usando ${MTU_VALUE} para o shell entender que é uma variável
|
|
command: ['sh', '-c', 'ifconfig eth0 mtu ${MTU_VALUE} || true']
|
|
env:
|
|
- name: MTU_VALUE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: backend-secrets
|
|
key: MTU
|
|
securityContext:
|
|
privileged: true
|
|
containers:
|
|
- name: backend
|
|
image: pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8521
|
|
# Isso injeta DATABASE_URL, JWT_SECRET e MTU direto no seu código Go/Node
|
|
envFrom:
|
|
- secretRef:
|
|
name: backend-secrets
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "300m"
|
|
limits:
|
|
memory: "1024Mi"
|
|
cpu: "1000m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8521
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8521
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10 |