apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubedemo
  namespace: test
  labels:
    app: kubedemo
spec:
  replicas: 2
  selector:
    matchLabels:
      app: kubedemo
  template:
    metadata:
      labels:
        app: kubedemo
    spec:
      containers:
      - name: kubedemo
        image: anldisr/kubedemo:0.0.4
        ports:
          - containerPort: 8090
            protocol: TCP
            name: kubedemo
        livenessProbe:
          httpGet:
            path: /livez
            port: kubedemo
          initialDelaySeconds: 3 # 0
          periodSeconds: 2 # 10
          timeoutSeconds: 2 # 1
          successThreshold: 1 # 1
          failureThreshold: 3 # 3
        readinessProbe:
          httpGet:
            path: /readyz
            port: kubedemo
          initialDelaySeconds: 5 # 0
          periodSeconds: 2 # 10
          timeoutSeconds: 2 # 1
          successThreshold: 1 # 1
          failureThreshold: 3 # 3
        resources:
          limits:
            cpu: "0.5"
            memory: 128Mi
          requests:
            cpu: "0.2"
            memory: 64Mi
        env:
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          - name: SECRET
            valueFrom:
              secretKeyRef:
                key: super-secret
                name: sealed-secret
          - name: FOO
            value: BAR
