apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nginx-proxy
  name: nginx-proxy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx-proxy
      deploymentconfig: nginx-proxy
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  template:
    metadata:
      labels:
        service: nginx-proxy
        deploymentconfig: nginx-proxy
    spec:
      imagePullSecrets:
        - name: nexus-dockercfg
      containers:
      - image: image
        imagePullPolicy: Always
        name: nginx-proxy
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 8443
          protocol: TCP
        resources:
          requests:
            memory: "256Mi"
            cpu: "250m"
          limits:
            memory: "512Mi"
            cpu: "500m"          
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
          - mountPath: /opt/app-root/etc/nginx.default.d
            name: proxy-conf-volume            
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
        - name: proxy-conf-volume 
          configMap:
            name: proxy-conf
            defaultMode: 420             

    