---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: argocd-podinfo-v1
  labels:
    app: argocd-podinfo
    version: v1
  # annotations:
  # fluxcd.io/automated: "true"
  # fluxcd.io/tag.init: regex:^3.10.*
  # fluxcd.io/tag.podinfod: semver:~3.1
spec:
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  replicas: 2
  selector:
    matchLabels:
      app: argocd-podinfo
      version: v1
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9797"
      labels:
        app: argocd-podinfo
        version: v1
    spec:
      initContainers:
        - name: init
          image: alpine:3
          command:
            - sleep
            - "1"
      containers:
        - name: argocd-podinfo
          image: stefanprodan/podinfo:3.2.2
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 9898
              protocol: TCP
            - name: http-metrics
              containerPort: 9797
              protocol: TCP
            - name: grpc
              containerPort: 9999
              protocol: TCP
          command:
            - ./podinfo
            - --port=9898
            - --port-metrics=9797
            - --grpc-port=9999
            - --grpc-service-name=podinfo
            - --level=info
            - --random-delay=false
            - --random-error=false
          env:
            - name: PODINFO_UI_COLOR
              value: "#34577c"
          livenessProbe:
            httpGet:
              path: /healthz
              port: 9898
          readinessProbe:
            httpGet:
              path: /readyz
              port: 9898
          resources:
            limits:
              cpu: 1000m
              memory: 128Mi
            requests:
              cpu: 10m
              memory: 64Mi
