Commit 5704c36b by tingweiwang

修改configmap目录和文件名字为kpl

1 parent 88cb2c30
apiVersion: v1
data:
app.yaml: |
app:
rpc_port: ":30100"
mount_path: "/mnt/ceph"
database:
type: "mysql"
host: mysql_host
name: autodl-core
user: mysql_user
password: mysql_password
url: "%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local"
redis:
addr: "redis_host"
password: "redis_password"
mongodb:
addr: "mongo_host"
k8s:
namespace: autodl
pvc: adl-pvc
docker:
registry_host: harbor_host
registry_group_name: core
host:
nginx_host: core_nginx
kind: ConfigMap
metadata:
name: cfg-autodl-core
namespace: autodl
apiVersion: v1
data:
app.yaml: |
app:
port: "8919"
# 在autodl core注册的service id, 作为app的唯一标示
service_id: "kpl_service_id" #改成模板,本地是seetaas3,金山是kpl3
# 用于在k8s集群中选择节点所需的namespace
service_namespace: "kpl"
ceph_path: "/mnt/ceph"
kpl_relpath: "kpl_realy_path" #改成模板,本地是seetaas,金山是kpl,!!!需要修改代码读取为kpl_relpath
user_center_relpath: "user_center"
monitor_port: "8920"
deploy_proxy_port: "8921"
monitor_host: "http://kpl--monitor.kpl.svc.cluster.local:8920/"
deploy_host: "kpl_deploy/api"
redis:
addr: "redis_host"
password: "redis_password"
database:
type: "mysql"
host: mysql_host
name: kpl_db_name
user: mysql_user
password: mysql_password
url: "%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local"
mongodb:
url: "mongo_host"
docker:
# 用于预处理器的公网harbor仓库地址
registry_host: hb_host
registry_group_name: k8s
# 内网harbor仓库地址
localhost_registry_host: harbor_host
localhost_registry_group_name: core
rpc:
core: "core--server.autodl.svc.cluster.local:30100"
user_center: "user-center--rpc-server.autodl.svc.cluster.local:10001"
kind: ConfigMap
metadata:
name: cfg-kpl-backend
namespace: kpl
apiVersion: v1
data:
production-base.js: |
const productionHost = {
'baseUrl': 'kpl_backend/api/v1',
'rootUrl': 'kpl_backend',
'baseWebSocket': 'kpl_back_socket/api/v1',
'userCenterUrl': 'usercenter_frontend',
'imageProxyUrl': 'kpl_imageproxy',
'apiTestUrl': 'mobile_frontend',
}
kind: ConfigMap
metadata:
name: cfg-kpl-frontend
namespace: kpl
apiVersion: v1
data:
app.yaml: |
app:
port: ":10000"
rpc_port: ":10001"
check_captcha: false
ceph_path: "/mnt/ceph"
user_center_relpath: "user_center"
database:
type: "mysql"
host: mysql_host
name: user-center
user: mysql_user
password: mysql_password
url: "%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local"
redis:
addr: "redis_host"
password: "redis_password"
host:
deploy_host: visit_uc_frontend
kind: ConfigMap
metadata:
name: cfg-user-center-backend
namespace: autodl
apiVersion: v1
data:
production-base.js: |
const productionHost = {
userCenterUrl: "usercenter_backend",
}
kind: ConfigMap
metadata:
name: cfg-user-center-frontend
namespace: autodl
apiVersion: v1
data:
apiserver.conf: |
server {
listen 80;
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 / {
proxy_pass http://kpl--backend:8919;
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;
}
}
deployproxy.conf: |
server {
listen 81;
location / {
proxy_pass http://kpl--deploy:8921;
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";
client_max_body_size 50m;
}
location = /basic_status {
stub_status;
}
error_page 502 /502.html;
location = /502.html {
root /etc/nginx;
}
}
imageproxy.conf: |
server {
listen 82;
location / {
proxy_pass http://kpl--image-proxy:8922/;
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";
client_max_body_size 50m;
}
location = /basic_status {
stub_status;
}
error_page 502 /502.html;
location = /502.html {
root /etc/nginx;
}
}
nginx.conf: |
user nginx;
worker_processes 2;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] [cost: $request_time] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
client_max_body_size 100m;
client_body_buffer_size 16k;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
#gzip_static on;
#gzip_http_version 1.1;
#gzip_comp_level 2;
#gzip_min_length 1024;
#gzip_vary on;
#gzip_types text/plain text/javascript application/x-javascript text/css text/xml application/xml application/xml+rss;
include /etc/nginx/conf.d/*.conf;
}
kind: ConfigMap
metadata:
name: cfg-kpl-nginx
namespace: kpl
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!