---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deploy
  namespace: maintenance
  annotations:
    fluxcd.io/automated: "true"
  labels:
    env: dev
spec:
  replicas: 2
  selector:
    matchLabels:
      env: dev
  template:
    metadata:
      labels:
        env: dev
    spec:
      containers:
      - command:
        - docker-entrypoint.sh
        name: docker-proxy
        # image: 00000000000000.dkr.ecr.my-region.amazonaws.com/example-eks:tag
        image: 021155830612.dkr.ecr.us-east-1.amazonaws.com/nginx-proxy:ff2395074ccd08c0633f13ab1b0d9da2df4ec101
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
        livenessProbe:
          tcpSocket:
            port: 80
        readinessProbe:
          httpGet:
            path: /
            port: 80
        env:
        - name: DEBUG
          value: "true"
        - name: MAINTENANCE
          value: "true"
        - name: MOTD
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: LASTLOG
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: HOSTNAME
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: HOST
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
