apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: worker
  name: worker
  namespace: vote
spec:
  minReadySeconds: 5
  replicas: 1
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 300
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  selector:
    matchLabels:
      app: worker
  template:
    metadata:
      labels:
        app: worker
    spec:
      containers:
      - image: IMAGE_REPO:VERSION
        name: worker
        resources:
            requests:
              cpu: 50m
              memory: 50M
            limits:
              cpu: "250m"
              memory: "250M"
        envFrom:
          - secretRef:
              name: db-creds