apiVersion: apps/v1
kind: Deployment
metadata:
  name: springboot-deployment
  labels:
    app: springboot
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1 # is an optional field that specifies the maximum number of Pods that can be unavailable during the update process 
      maxSurge: 1 # is an optional field that specifies the maximum number of Pods that can be created over the desired number of Pods 
  replicas: 2
  selector:
    matchLabels:
      app: springboot
  template:
    metadata:
      labels:
        app: springboot
    spec:
      containers:
        - name: springboot-container
          image: enomoto/spring-boot-ms:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          # resources: # QoS Guaranteed limit e request iguais
          #   limits:
          #     cpu: 1000m
          #     memory: 600Mi 
          #   requests:
          #     cpu: 1000m
          #     memory: 600Mi