apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-webserver
  labels:
    project: sob
    app: frontend-webserver
    layer: frontend
spec:
  revisionHistoryLimit: 2
  replicas: 1
  selector:
    matchLabels:
      app: frontend-webserver
  template:
    metadata:
      labels:
        project: sob
        app: frontend-webserver
        layer: frontend
    spec:
      containers:
        - name: frontend-webserver
          image: eu.gcr.io/aperturedevs/sob-frontend-webserver:stable
          imagePullPolicy: Always
          ports:
            - containerPort: 80
          resources:
            limits:
              cpu: "100m"
              memory: "128Mi"
            requests:
              cpu: "1m"
              memory: "128Mi"
          volumeMounts:
            - name: nginx-config-volume
              mountPath: /etc/nginx/conf.d/default.conf
              subPath: nginx.conf
      volumes:
        - name: nginx-config-volume
          configMap:
            name: frontend-configmap
