apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: worker
  name: worker
  namespace: voting
spec:
  minReadySeconds: 10
  replicas: 3
  selector:
    matchLabels:
      app: worker
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: worker
    spec:
      containers:
      - image: andywirtzk8s/voting-worker:v1.0
        name: worker
        envFrom:
        - prefix: POSTGRES_
          secretRef:
            name: db-secret
