apiVersion: apps/v1
kind: Deployment
metadata:
  name: plateforme-formation
  labels: { app: plateforme-formation }
spec:
  replicas: 2
  selector:
    matchLabels: { app: plateforme-formation }
  template:
    metadata:
      labels: { app: plateforme-formation }
    spec:
      containers:
        - name: app
          image: acrformation.azurecr.io/plateforme-formation:1.0
          ports:
            - containerPort: 8080
          envFrom:
            - configMapRef: { name: app-config }
            - secretRef: { name: app-secrets }
          readinessProbe:
            httpGet: { path: /up, port: 8080 }
            initialDelaySeconds: 10
            periodSeconds: 10
          livenessProbe:
            httpGet: { path: /up, port: 8080 }
            initialDelaySeconds: 20
            periodSeconds: 20
          resources:
            requests: { cpu: "250m", memory: "256Mi" }
            limits:   { cpu: "1",    memory: "512Mi" }
