apiVersion: apps/v1
kind: Deployment
metadata:
  name: laracon2019
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: laracon2019
  template:
    metadata:
      labels:
        app.kubernetes.io/name: laracon2019
    spec:
      volumes:
        - name: nginx-config
          configMap:
            name: laracon2019-nginx
      containers:
        - name: nginx
          image: nginx:1.17
          ports:
            - containerPort: 80
              protocol: TCP
              name: http
          volumeMounts:
            - name: nginx-config
              subPath: nginx.conf
              mountPath: /etc/nginx/nginx.conf
              readOnly: true
        - name: app
          image: phroggyy/laracon2019:latest
          envFrom:
            - secretRef:
                name: laracon2019-env
