apiVersion: apps/v1
kind: Deployment
metadata:
  name: result
  namespace: default
  labels:
    app: result
spec:
  replicas: 2
  selector:
    matchLabels:
      app: result
  template:
    metadata:
      labels:
        app: result
    spec:
      restartPolicy: Always
      containers:
      - name: result
        image: epitechcontent/t-dop-600-result:k8s
        resources:
          limits:
            memory: "128M"
            cpu: "50m"
        ports:
        - containerPort: 80
        envFrom:
        - secretRef:
            name: postgres-secret
        - configMapRef:
            name: postgres-config
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                  - epitech-s4qe