Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
configmap-kpl
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6481c312
authored
Jan 21, 2021
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 {{ K8S_DNS_SVC }} 字段
1 parent
819c0870
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
autodl-core/cfg-core-nginx.yaml.j2
autodl-core/cfg-core-nginx.yaml.j2
View file @
6481c31
...
@@ -5,7 +5,7 @@ data:
...
@@ -5,7 +5,7 @@ data:
listen 80;
listen 80;
location ~ /tensorboard/([-_.:\w]+)/(.*) {
location ~ /tensorboard/([-_.:\w]+)/(.*) {
resolver
kube-dns.kube-system.svc.cluster.local valid=5s;
resolver
{{ K8S_DNS_SVC }} valid=5s; #默认是kube-dns.kube-system.svc.cluster.local
rewrite_log on;
rewrite_log on;
rewrite ^/tensorboard/([-_.:\w]+)/(.*) /$2 break;
rewrite ^/tensorboard/([-_.:\w]+)/(.*) /$2 break;
proxy_pass http://$1;
proxy_pass http://$1;
...
@@ -15,7 +15,7 @@ data:
...
@@ -15,7 +15,7 @@ data:
proxy_set_header Origin "";
proxy_set_header Origin "";
}
}
location ~ /jupyter/([-_.:\w]+)/(.*) {
location ~ /jupyter/([-_.:\w]+)/(.*) {
resolver
kube-dns.kube-system.svc.cluster.local
valid=1s;
resolver
{{ K8S_DNS_SVC }}
valid=1s;
rewrite_log on;
rewrite_log on;
rewrite ^/jupyter/([-_.:\w]+)/(.*) /jupyter/$1/$2 break;
rewrite ^/jupyter/([-_.:\w]+)/(.*) /jupyter/$1/$2 break;
proxy_pass http://$1;
proxy_pass http://$1;
...
@@ -25,7 +25,7 @@ data:
...
@@ -25,7 +25,7 @@ data:
proxy_set_header Origin "";
proxy_set_header Origin "";
}
}
location ~ /standard/([-_.:\w]+)/(.*) {
location ~ /standard/([-_.:\w]+)/(.*) {
resolver
kube-dns.kube-system.svc.cluster.local
valid=5s;
resolver
{{ K8S_DNS_SVC }}
valid=5s;
rewrite_log on;
rewrite_log on;
rewrite ^/standard/([-_.:\w]+)/(.*) /$2 break;
rewrite ^/standard/([-_.:\w]+)/(.*) /$2 break;
proxy_pass http://$1;
proxy_pass http://$1;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment