---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: podinfo
spec:
  minReadySeconds: 5
  progressDeadlineSeconds: 60
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: podinfo
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: podinfo
    spec:
      containers:
        - name: podinfod
          image: quay.io/stefanprodan/podinfo:1.4.3
          command:
            - ./podinfo
            - --port=9898
            - --level=debug
          ports:
            - name: http
              containerPort: 9898
              protocol: TCP
          livenessProbe:
            exec:
              command:
                - /bin/sh
                - -c
                - wget --quiet --tries=1 --spider http://localhost:9898/healthz || exit 1
          readinessProbe:
            exec:
              command:
                - /bin/sh
                - -c
                - wget --quiet --tries=1 --spider http://localhost:9898/readyz || exit 1
          resources:
            requests:
              memory: "32Mi"
              cpu: "10m"
          env:
            - name: color
              value: "blue"
            - name: message
              value: "Greetings from podinfo blue"
            - name: backendURL
              value: "http://podinfo-backend:9898/backend"