---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: banana-blue
  labels:
    app: banana
    cluster: blue
spec:
  selector:
    matchLabels:
      run: banana-blue
  replicas: 2
  template:
    metadata:
      labels:
        app: banana
        run: banana-blue
        version: "1.2"
      annotations:
        kubernetes.io/change-cause: "CRQ-124: Update 1.2 release"
    spec:
      volumes:
        - name: html
          emptyDir: {}
      containers:
        - name: banana-blue
          image: hashicorp/http-echo
          ports: 
            - containerPort: 5678
              protocol: TCP
          readinessProbe:
            tcpSocket:
              port: 5678
            initialDelaySeconds: 1
            periodSeconds: 2
          livenessProbe:
            tcpSocket:
              port: 5678
            initialDelaySeconds: 3
            periodSeconds: 3
          args:
            - "-text=banana-1.2"
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
