apiVersion: apps/v1
kind: Deployment
metadata:
  name: flask
  labels:
    app: flask
spec:
  replicas: 2
  progressDeadlineSeconds: 120
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
  selector:
    matchLabels:
      app: flask
  template:
    metadata:
      name: flask
      labels:
        app: flask
    spec:
      restartPolicy: Always
      containers:
        - name: flask
          image: interwebz/flask:latest
          imagePullPolicy: Never
          ports:
            - containerPort: 6000
          envFrom:
            - configMapRef:
                name: flask
          livenessProbe:
            httpGet:
              path: /
              port: 6000
            initialDelaySeconds: 3
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /
              port: 6000
            initialDelaySeconds: 3
            timeoutSeconds: 1
            periodSeconds: 3
        - name: redis
          image: interwebz/redis:unstable
          imagePullPolicy: Never
          ports:
            - containerPort: 6379
