apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-config
  namespace: default
data:
  nginx.conf: |
    events {}
    http {
      server {
        listen      80;
        server_name example.com;
        root        /usr/share/nginx/html;
        location / {
          auth_basic           "restricted";
          auth_basic_user_file /etc/nginx-htpasswd/htpasswd;
        }
      }
    }
