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 cf25795a
authored
Jan 08, 2021
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
develop分支configmap 使用jinjia2改造
1 parent
c94b233c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
51 deletions
autodl-core/cfg-autodl-core.yaml → autodl-core/cfg-autodl-core.yaml.j2
autodl-core/cfg-core-nginx.yaml → autodl-core/cfg-core-nginx.yaml.j2
kpl/cfg-kpl-backend.yaml → kpl/cfg-kpl-backend.yaml.j2
kpl/cfg-kpl-edu-frontend.yaml
kpl/cfg-kpl-frontend.yaml → kpl/cfg-kpl-frontend.yaml.j2
kpl/cfg-kpl-nginx.yaml → kpl/cfg-kpl-nginx.yaml.j2
autodl-core/cfg-autodl-core.yaml
→
autodl-core/cfg-autodl-core.yaml
.j2
View file @
cf25795
...
...
@@ -10,25 +10,25 @@ data:
database:
type: "mysql"
host:
mysql_host
host:
{{ mysql_host }}
name: autodl-core
user:
mysql_user
password:
mysql_password
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
"
addr: "
{{ redis_host }}
"
password: "
{{ redis_password }}
"
mongodb:
addr: "
mongo_host
"
addr: "
{{ mongo_host }}
"
k8s:
namespace: autodl
pvc: adl-pvc
docker:
registry_host:
harbor_host
#内网镜像仓库,启动任务,autodl-core会先推送镜像到该字段定义的仓库中
registry_host:
{{ harbor_host }}
#内网镜像仓库,启动任务,autodl-core会先推送镜像到该字段定义的仓库中
registry_group_name: core #内网仓库推送任务镜像目录(自定义)
host:
...
...
autodl-core/cfg-core-nginx.yaml
→
autodl-core/cfg-core-nginx.yaml
.j2
View file @
cf25795
File moved
kpl/cfg-kpl-backend.yaml
→
kpl/cfg-kpl-backend.yaml
.j2
View file @
cf25795
...
...
@@ -7,57 +7,57 @@ data:
default_language: "cn" # cn 中文(默认), ja 日语
# 在autodl core注册的service id, 作为app的唯一标示
service_id: "
kpl_service_id
" #改成模板,金山云环境该值为kpl3
service_id: "
{{ kpl_service_id }}
" #改成模板,金山云环境该值为kpl3
# 用于在k8s集群中选择节点所需的namespace
service_namespace: "kpl"
ceph_path: "/mnt/ceph"
kpl_relpath: "
kpl_realy_path
" #改成模板,金山云环境为kpl,该值是kpl服务挂载到容器内/存储下的子目录/mnt/ceph/kpl
kpl_relpath: "
{{ kpl_realy_path }}
" #改成模板,金山云环境为kpl,该值是kpl服务挂载到容器内/存储下的子目录/mnt/ceph/kpl
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_backend
/api/v1/deploy/api"
ssh_host: "
kpl_stream
"
deploy_host: "
{{ kpl_backend }}
/api/v1/deploy/api"
ssh_host: "
{{ kpl_stream }}
"
init_token: "" #用于初始化超级管理员等功能的token
redis:
addr: "
redis_host
"
password: "
redis_password
"
addr: "
{{ redis_host }}
"
password: "
{{ redis_password }}
"
database:
type: "mysql"
host:
mysql_host
name:
kpl_db_name
#kpl服务的数据库名字,抽离为模板,金山云环境为kpl
user:
mysql_user
password:
mysql_password
host:
{{ mysql_host }}
name:
{{ kpl_db_name }}
#kpl服务的数据库名字,抽离为模板,金山云环境为kpl
user:
{{ mysql_user }}
password:
{{ mysql_password }}
url: "%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local"
quota_database:
type: "mysql"
host:
mysql_host
name:
quota_db_name
user:
mysql_user
password:
mysql_password
host:
{{ mysql_host }}
name:
{{ quota_db_name }}
user:
{{ mysql_user }}
password:
{{ mysql_password }}
url: "%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local"
mongodb:
url: "
mongo_host
"
url: "
{{ mongo_host }}
"
docker:
# 用于预处理器的公网harbor仓库地址
registry_host:
hb_host
registry_host:
{{ hb_host }}
registry_group_name: kpl_k8s
# 内网harbor仓库地址
localhost_registry_host:
harbor_host
localhost_registry_host:
{{ harbor_host }}
localhost_registry_group_name: core
secure_docker_source:
- "hb.seetatech.com"
- "hub.kce.ksyun.com"
- "
harbor_host
"
- "
harbor_host
/k8s"
- "
harbor_host
/kpl_k8s"
- "
{{ harbor_host }}
"
- "
{{ harbor_host }}
/k8s"
- "
{{ harbor_host }}
/kpl_k8s"
rpc:
core: "core--server.autodl.svc.cluster.local:30100"
...
...
@@ -66,40 +66,40 @@ data:
iot_cloud: "kpl--iot-server.kpl.svc.cluster.local:8000" # 没有开启iot功能不会读取此配置
mqtt:
address:
mqtt_host
#127.0.0.1:1883 # 没有开启iot功能不会读取此配置
address_client:
mqtt_client_host
# 172.123.123.123:1883, 用于mqtt暴露在外部的连接地址, 如果为空, 则使用address
address:
{{ mqtt_host }}
#127.0.0.1:1883 # 没有开启iot功能不会读取此配置
address_client:
{{ mqtt_client_host }}
# 172.123.123.123:1883, 用于mqtt暴露在外部的连接地址, 如果为空, 则使用address
feature_control:
iot:
iot_boolean
# 默认false, 不开启边缘设备功能
open_grafana:
grafana_boolean
# 默认false, 不开启grafana功能
disable_i18n:
disable_i18n_boolean
# 默认false,开启国际化功能
notebook_grafana_url:
notebook_grafana_url_string
# 容器grafana跳转url http://10.69.75.115:8883/d/W-Y9JdKGk/pod_metric_dashboard?orgId=1&var-pod_prefix=%s&var-pod=%s
node_grafana_url:
node_grafana_url_string
# node节点grafana跳转url http://10.69.75.115:8883/d/9CWBz0bik/node-exporter-kpl?orgId=1&var-job=node-exporter&var-hostname=All&var-node=%s
use_fake_metric:
use_fake_metric_string
# CPU,GPU,MEM 代表随机生成 cpu, gpu, mem的使用率, 可以只开启需要的类型, 以逗号分割
temp_oidc_create:
temp_oidc_create_boolean
# 默认false,如果需要开启则为true
iot:
{{ iot_boolean }}
# 默认false, 不开启边缘设备功能
open_grafana:
{{ grafana_boolean }}
# 默认false, 不开启grafana功能
disable_i18n:
{{ disable_i18n_boolean }}
# 默认false,开启国际化功能
notebook_grafana_url:
{{ notebook_grafana_url_string }}
# 容器grafana跳转url http://10.69.75.115:8883/d/W-Y9JdKGk/pod_metric_dashboard?orgId=1&var-pod_prefix=%s&var-pod=%s
node_grafana_url:
{{ node_grafana_url_string }}
# node节点grafana跳转url http://10.69.75.115:8883/d/9CWBz0bik/node-exporter-kpl?orgId=1&var-job=node-exporter&var-hostname=All&var-node=%s
use_fake_metric:
{{ use_fake_metric_string }}
# CPU,GPU,MEM 代表随机生成 cpu, gpu, mem的使用率, 可以只开启需要的类型, 以逗号分割
temp_oidc_create:
{{ temp_oidc_create_boolean }}
# 默认false,如果需要开启则为true
temp_oidc_create:
create_from:
create_from_string
#对应的OIDC登录名称 kplsso
token_endpoint:
token_endpoint_string
#获取token的端点 "http://120.92.92.150:31306/auth/realms/master/protocol/openid-connect/token"
create_endpoint:
create_endpoint_string
#创建用户的端点 "http://120.92.92.150:31306/auth/admin/realms/kpl/users"
client_id:
client_id_string
#客户端id admin-cli
admin_user:
admin_user_string
#管理员用户名 admin
admin_password:
admin_password_string
#管理员密码 Kpl123456
create_from:
{{ create_from_string }}
#对应的OIDC登录名称 kplsso
token_endpoint:
{{ token_endpoint_string }}
#获取token的端点 "http://120.92.92.150:31306/auth/realms/master/protocol/openid-connect/token"
create_endpoint:
{{ create_endpoint_string }}
#创建用户的端点 "http://120.92.92.150:31306/auth/admin/realms/kpl/users"
client_id:
{{ client_id_string }}
#客户端id admin-cli
admin_user:
{{ admin_user_string }}
#管理员用户名 admin
admin_password:
{{ admin_password_string }}
#管理员密码 Kpl123456
multi_storage_block_mode:
mode_type:
mode_type_string
# 存储块分布模式, 默认Random, Random (完全随机分配到所有存储块中), AutoDetectByBlockCapacity(根据存储块可用容量按比例分配), RandomOnSpecificBlock (手动分配), RandomOnSpecificBlockByWeight (手动分配, 根据权重随机)
mode_type:
{{ mode_type_string }}
# 存储块分布模式, 默认Random, Random (完全随机分配到所有存储块中), AutoDetectByBlockCapacity(根据存储块可用容量按比例分配), RandomOnSpecificBlock (手动分配), RandomOnSpecificBlockByWeight (手动分配, 根据权重随机)
# mode_type 为 RandomOnSpecificBlock时, 需要指定specific_block
# 根据给定pvc_name列表随机分配, 格式为 pvc_name1, pvc_name2 逗号为分隔符
# 没有出现的pvc_name会被忽略, 如果没有指定任何pvc_name, 系统会初始化错误, 服务无法正确运行
# kpl-pvc4 代表所有新建存储都位于kpl-pvc4上
specific_block:
specific_block_string
specific_block:
{{ specific_block_string }}
# mode_type 为 RandomOnSpecificBlockByWeight时, 需要指定specific_block_weight
# 根据给定pvc_name和weight 进行分配, 格式为 pvc_name1:weight1, pvc_name2:weight2 逗号为分隔符
# 没有出现的pvc_name会被忽略, 如果没有指定任何pvc_name, 系统会初始化错误, 服务无法正确运行
# weight值最大不可以超过10000, 超过10000, 系统会初始化错误, 服务无法正确运行
# 分配规则, 当配置为pvc_name1:30, pvc_name2:100时, 规则为 pvc_name1的几率为 30/130, pvc_name2的几率为 100/130
# kpl-pvc4:100 代表所有新建存储都位于kpl-pvc4上
specific_block_weight:
specific_block_weight_string
specific_block_weight:
{{ specific_block_weight_string }}
kind: ConfigMap
metadata:
...
...
kpl/cfg-kpl-edu-frontend.yaml
View file @
cf25795
...
...
@@ -2,12 +2,12 @@ apiVersion: v1
data
:
production-base.js
:
|
const productionHost = {
'baseUrl': '
kpl_edu_backend
/api/v1',
'rootUrl': '
kpl_edu_backend
/api/v1',
'jupyterRootUrl': '
kpl_edu_backend
',
'baseWebSocket': '
kpl_edu_back_socket
/api/v1',
'apiTestUrl': '
kpl_edu_backend
',
'adminUrl': '
kpl_edu_backend
/admin/login',
'baseUrl': '
{{ kpl_edu_backend }}
/api/v1',
'rootUrl': '
{{ kpl_edu_backend }}
/api/v1',
'jupyterRootUrl': '
{{ kpl_edu_backend }}
',
'baseWebSocket': '
{{ kpl_edu_back_socket }}
/api/v1',
'apiTestUrl': '
{{ kpl_edu_backend }}
',
'adminUrl': '
{{ kpl_edu_backend }}
/admin/login',
}
kind
:
ConfigMap
metadata
:
...
...
kpl/cfg-kpl-frontend.yaml
→
kpl/cfg-kpl-frontend.yaml
.j2
View file @
cf25795
File moved
kpl/cfg-kpl-nginx.yaml
→
kpl/cfg-kpl-nginx.yaml
.j2
View file @
cf25795
File moved
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