apiVersion: apps/v1
kind: Deployment
metadata:
  name: taiga-gateway-deployment
  labels:
    app.kubernetes.part-of: c4k-taiga
    app.kubernetes.io/component: taiga-gateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: taiga
  template: 
    metadata:
      labels:
        app: taiga
    spec:
      restartPolicy: Always
      containers:
      - name: taiga-gateway
        image: nginx:1.19-alpine
        imagePullPolicy: IfNotPresent
        ports:
        - name: http
          containerPort: 80
        volumeMounts:
        - name: taiga-gateway-configmap
          mountPath: /etc/nginx/conf.d          
          readOnly: false
        - name: taiga-static
          mountPath: /taiga/static
          readOnly: false
        - name: taiga-media
          mountPath: /taiga/media
          readOnly: false

      volumes: 
        - name: taiga-gateway-configmap
          configMap:
            name: taiga-gateway-configmap
        - name: taiga-static
          persistentVolumeClaim:
            claimName: taiga-static-data
        - name: taiga-media
          persistentVolumeClaim:
            claimName: taiga-media-data