---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: podinfo
  namespace: demo
  labels:
    app: podinfo
  annotations:
    fluxcd.io/automated: "true"
    fluxcd.io/tag.init: glob:1.4.*
    fluxcd.io/tag.podinfod: glob:1.4.*
    fluxcd.io/locked_msg: 1.4.2 does not work for us
    fluxcd.io/locked_user: linzhaoming <teleyic@gmail.com>
    fluxcd.io/locked: 'true'
spec:
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: podinfo
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        app: podinfo
    spec:
      initContainers:
      - name: init
        image: alpine:3.10
        command:
        - sleep
        - "1"
      containers:
      - name: podinfod
        image: stefanprodan/podinfo:1.4.1
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 9898
          name: http
          protocol: TCP
        command:
        - ./podinfo
        - --port=9898
        - --level=info
        - --random-delay=false
        - --random-error=false
        env:
        - name: PODINFO_UI_MESSAGE
          value: "Welcome to Flux"
        livenessProbe:
          httpGet:
            path: /healthz
            port: 9898
        readinessProbe:
          httpGet:
            path: /readyz
            port: 9898
        resources:
          limits:
            cpu: 1000m
            memory: 128Mi
          requests:
            cpu: 10m
            memory: 64Mi
