34 lines
785 B
YAML
34 lines
785 B
YAML
---
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
namespace: riju-proxy
|
|
name: riju-proxy-config
|
|
data:
|
|
default.conf: |
|
|
underscores_in_headers on;
|
|
|
|
server {
|
|
resolver kube-dns.kube-system.svc.cluster.local;
|
|
listen 1869 default_server;
|
|
|
|
auth_basic "Riju administrative proxy";
|
|
auth_basic_user_file /etc/nginx/passwd;
|
|
|
|
location ~ /(10\.[0-9]+\.[0-9]+\.[0-9]+)/health {
|
|
proxy_pass http://$1:869/health;
|
|
}
|
|
|
|
location ~ /(10\.[0-9]+\.[0-9]+\.[0-9]+)/exec {
|
|
proxy_pass http://$1:869/exec$is_args$args;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location / {
|
|
return 404;
|
|
}
|
|
}
|