apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment-portal-noticias
spec:
  template:
    metadata:
      name: pod-portal-noticias
      labels:
        app: pod-portal-noticias
    spec:
      containers:
        - name: portal-noticias-container
          image: aluracursos/portal-noticias:1
          ports: 
            - containerPort: 80
          envFrom:
            - configMapRef:
                name: configmap-portal-noticias
          livenessProbe:
            httpGet:
              path: /
              port: 80
            periodSeconds: 10
            failureThreshold: 3
            initialDelaySeconds: 20
          readinessProbe:
            httpGet:
              path: /
              port: 80
            periodSeconds: 10
            failureThreshold: 5
            initialDelaySeconds: 3
          resources:
            requests:
              cpu: 10m
  replicas: 2
  selector:
    matchLabels:
      app: pod-portal-noticias