apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: webhook-proxy
  name: webhook-proxy
data:
  nginx-conf: |
    server {
        listen       8080 ssl;
        server_name  _;
        ssl_certificate /certs/tls.crt;
        ssl_certificate_key /certs/tls.key;
        ssl_protocols TLSv1.2;
        ssl_ciphers HIGH:!aNULL:!MD5;
          
        location ~* ^/apis/build.openshift.io/v1/namespaces/development/buildconfigs/[^/]*/webhooks/[^/]*/github {
            proxy_pass {{ okd_master_url }};
            limit_except POST {
                deny all;
            }
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
        }
        location / {
            return 404;
        }
    }
      

