apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-config
data:
  nginx.conf: |
    upstream django-k8s-web-service {
    server django-k8s-web-service:8000;
    }

    server {

        listen 80;

        location / {
            proxy_pass http://django-k8s-web-service;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_redirect off;
        }
        location /static/ {
            alias {{.Values.mountPathNginx}};
        }

    }