apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx
  namespace: vault
data:
  nginx-vault.conf: |
      server {
        listen 8080;
        server_name _;

        location = / {
          add_header Content-Type text/plain;
          return 200;
        }

        location / {
          if ($http_x_forwarded_proto != 'https') {
            add_header Content-Type text/plain;
            return 403;
          }
          proxy_pass http://localhost:8200;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
      }
