zkt26/sk1/deployment.yaml
2026-05-12 19:27:18 +02:00

84 lines
2.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ─────────────────────────────────────────────────────────────────────────────
# Deployment Vert.x Backend (2 replicas)
# ─────────────────────────────────────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
name: vigimeteo-backend
namespace: vigimeteo
labels:
app: vigimeteo-backend
spec:
replicas: 2
selector:
matchLabels:
app: vigimeteo-backend
template:
metadata:
labels:
app: vigimeteo-backend
spec:
containers:
- name: vigimeteo-backend
image: MON_REGISTRE/vigimeteo-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 8888
name: http
env:
# Toutes les infos de connexion viennent du Secret 'db-credentials'
# injecté par prepare-app1.sh avec les valeurs de l'Azure Database.
- name: DB_HOST
valueFrom:
secretKeyRef:
name: db-credentials
key: host
- name: DB_PORT
valueFrom:
secretKeyRef:
name: db-credentials
key: port
- name: DB_NAME
valueFrom:
secretKeyRef:
name: db-credentials
key: dbname
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-credentials
key: password
---
# ─────────────────────────────────────────────────────────────────────────────
# Deployment React/Nginx Frontend (2 replicas)
# ─────────────────────────────────────────────────────────────────────────────
apiVersion: apps/v1
kind: Deployment
metadata:
name: vigimeteo-frontend
namespace: vigimeteo
labels:
app: vigimeteo-frontend
spec:
replicas: 2
selector:
matchLabels:
app: vigimeteo-frontend
template:
metadata:
labels:
app: vigimeteo-frontend
spec:
containers:
- name: vigimeteo-frontend
image: MON_REGISTRE/vigimeteo-frontend:latest
imagePullPolicy: Always
ports:
- containerPort: 80
name: http