apiVersion: apps/v1
kind: Deployment
metadata:
  name: results
  namespace: instavote
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1 # no of extra pod to be created while deploying
      maxUnavailable: 1 # no of pod to be unavailable wile deploying
  revisionHistoryLimit: 4
  paused: false
  minReadySeconds: 10
  selector:
    matchLabels:
      role: results
    matchExpressions:
      - {key: version, operator: In, values: [v1, v2, v3]}
  template:
    metadata:
      name: results
      labels:
        app: node
        role: results
        version: v1
    spec:
      containers:
        - name: app
          image: schoolofdevops/vote-result:latest
          ports:
            - containerPort: 80
              protocol: TCP
