apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: www-icelandair-com-test1
  labels:
    name: www-icelandair-com-test1
    tier: frontend
    ttl-hours: '48'
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: www-icelandair-com-test1
        tier: frontend
    spec:
      imagePullSecrets:
        - name: registry-pull-secret
      containers:
        - image: 'testenvimage:0.0.0'
          name: www-icelandair-com-test1
          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: www-icelandair-com-ssr-test1
          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: www-icelandair-com-nginx-acls-test1
            items:
              - key: whitelist
                path: whitelist.conf
