apiVersion: apps/v1
kind: Deployment
metadata:
  name: worker
  namespace: staging
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  revisionHistoryLimit: 4
  minReadySeconds: 10
  paused: false
  selector:
    matchLabels:
      role: worker
    matchExpressions:
      - {key: version, operator: In, values: [v1, v2, v3]}
  template:
    metadata:
      name: worker
      labels:
        app: java
        role: worker
        version: v1
    spec:
      containers:
        - name: worker
          image: schoolofdevops/vote-worker:latest