apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: image2
  labels:
    name: image2
    tier: frontend
spec:
  replicas: 2
  template:
    metadata:
      labels:
        name: image2
        tier: frontend
    spec:
      imagePullSecrets:
        - name: registry-pull-secret
      containers:
        - image: testenvimage2:999.999.99999
          name: image2
          resources:
            limits:
              cpu: 0.8
              memory: 512M
            requests:
              cpu: 0.4
              memory: 256M
          ports:
            - containerPort: 81
              name: http-proxy
              protocol: TCP
            - containerPort: 444
              name: https-proxy
              protocol: TCP
          volumeMounts:
            - name: certs-volume
              readOnly: true
              mountPath: "/volumes/certs"
            - name: nginx-acls
              readOnly: true
              mountPath: "/etc/nginx/acls/"
          env:
            - name: RUNTIME_ENVIRONMENT
              valueFrom:
                configMapKeyRef:
                  name: nowhardcoded
                  key: ENV
        - image: DOCKER_IMAGE_SSR
          name: image2-ssr
          resources:
            limits:
              cpu: 0.6
              memory: 512M
            requests:
              cpu: 0.4
              memory: 256M
      volumes:
        - name: certs-volume
          secret:
            secretName: star-cert-secret
        - name: nginx-acls
          configMap:
            name: image2-nginx-acls
            items:
              - key: whitelist
                path: whitelist.conf
