---
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap
  namespace: comparisons
data:
  nginx.conf: |
    user  nginx;
    worker_processes  auto;

    error_log  stderr warn;
    pid        /var/run/nginx.pid;

    events {
        worker_connections  1024;
    }

    http {
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;

        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  main;

        sendfile        on;

        keepalive_timeout  65;

        gzip  on;

        server {
            client_header_buffer_size 16k;
            large_client_header_buffers 4 16k;
            listen       80;
            server_name  localhost;
            root /dist;
            expires off;

            location = /ping {
                return 200 '{"result": "ok"}';
            }
        }
    }
