---
apiVersion: v1
kind: ConfigMap
metadata:
  name: '{{ ansible_operator_meta.name }}-configmap'
  namespace: '{{ ansible_operator_meta.namespace }}'
  labels:
    app.kubernetes.io/name: '{{ ansible_operator_meta.name }}'
data:
  nginx_conf: |
    events { }
    
    pid        /tmp/nginx.pid;

    error_log /dev/stdout info;
    http {
        include       /etc/nginx/mime.types;
        
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';
        access_log /dev/stdout;

        keepalive_timeout  65;
        sendfile        on;

        server {
            listen       8081;
            server_name localhost;
            location /aap-dashboard/ {
                autoindex on;
                root /static;
            }
        }
    }
