apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: headerecho-nginx
  name: headerecho-nginx
  namespace: default
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: headerecho-nginx
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: headerecho-nginx
    spec:
      containers:
      - image: rjshrjndrn/headerecho:v3
        imagePullPolicy: IfNotPresent
        name: headerecho
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        image: nginx
        imagePullPolicy: IfNotPresent
        name: nginx
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/nginx/nginx.conf
          name: nginx-config
          subPath: nginx.conf
      dnsPolicy: ClusterFirst
      initContainers:
      - args:
        - -p
        - "80"
        - -u
        - "1111"
        - -w
        - "8282"
        image: openpolicyagent/proxy_init:v5
        imagePullPolicy: IfNotPresent
        name: proxy-init
        resources: {}
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
          runAsNonRoot: false
          runAsUser: 0
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          name: nginx-conf
        name: nginx-config
