Commit 90b925dd by tingweiwang

kpl-nginx configmap增加edu前端配置文件

1 parent 2cd965f6
Showing with 67 additions and 2 deletions
apiVersion: v1 aapiVersion: v1
data: data:
apiserver-edu.conf: |
server {
listen 81;
listen 443 ssl;
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/privkey.pem;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
resolver kube-dns.kube-system.svc.cluster.local valid=5s;
proxy_pass http://kpl--edu--frontend.kpl.svc.cluster.local:80$request_uri;
}
location /api {
proxy_pass http://kpl--backend:8919/api/v1/deploy/api;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ^~ /api/v1 {
resolver kube-dns.kube-system.svc.cluster.local valid=5s;
proxy_pass http://kpl--backend.kpl.svc.cluster.local:8919$request_uri;
proxy_set_header Host $host;
proxy_connect_timeout 10s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ /jupyterlab/proxy/([-_.:\w]+)/(.*) {
resolver kube-dns.kube-system.svc.cluster.local valid=5s; #修改成自己环境dns组件service名字
rewrite_log on;
rewrite ^/jupyterlab/proxy/([-_.:\w]+)/(.*) /jupyterlab/proxy/$1/$2 break;
proxy_pass http://$1.autodl.svc.cluster.local:8888;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
proxy_set_header Host $host;
client_max_body_size 10240m;
}
location = /basic_status {
stub_status;
}
error_page 502 /502.html;
location = /502.html {
root /etc/nginx;
}
}
apiserver.conf: | apiserver.conf: |
server { server {
listen 80; listen 80;
...@@ -104,4 +168,4 @@ data: ...@@ -104,4 +168,4 @@ data:
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: cfg-kpl-nginx name: cfg-kpl-nginx
namespace: kpl namespace: kpl
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!