diff --git a/docs/support-file/dockerfile/README.md b/docs/support-file/dockerfile/README.md new file mode 100644 index 0000000000..e6338de56d --- /dev/null +++ b/docs/support-file/dockerfile/README.md @@ -0,0 +1,24 @@ +# BK-CMDB + +蓝鲸配置平台(蓝鲸CMDB)是一个面向资产及应用的企业级配置管理平台。 + +本文档内容为如何根据提供的dockerfile制作cmdb镜像。 + +### 操作步骤 +#### 对于cmdb各个服务。这里以adminserver为例: +(1)在adminserver目录里创建cmdb_adminserver目录 +``` +mkdir dockerfile/adminserver/cmdb_adminserver +``` +(2)将adminserver的二进制拷贝到上述的cmdb_adminserver目录中 + +(3)在上述cmdb_adminserver目录创建conf目录,将errors,language +``` +mkdir dockerfile/adminserver/cmdb_adminserver/conf +cp -r cmdb/{errors,language} dockerfile/adminserver/cmdb_adminserver/conf +``` + +(4)执行docker build构建镜像 + +注:其中webserver比较特殊,还需要将web目录拷贝到cmdb_webserver下,即与conf和二进制同级的目录下 + diff --git a/docs/support-file/dockerfile/adminserver/dockerfile b/docs/support-file/dockerfile/adminserver/dockerfile new file mode 100644 index 0000000000..0c853f0c8f --- /dev/null +++ b/docs/support-file/dockerfile/adminserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_adminserver /data/cmdb/cmdb_adminserver +RUN mkdir /data/cmdb/cmdb_adminserver/logs +RUN chmod +x /data/cmdb/cmdb_adminserver/cmdb_adminserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/apiserver/dockerfile b/docs/support-file/dockerfile/apiserver/dockerfile new file mode 100644 index 0000000000..60b417d57d --- /dev/null +++ b/docs/support-file/dockerfile/apiserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_apiserver /data/cmdb/cmdb_apiserver +RUN mkdir /data/cmdb/cmdb_apiserver/logs +RUN chmod +x /data/cmdb/cmdb_apiserver/cmdb_apiserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/authserver/dockerfile b/docs/support-file/dockerfile/authserver/dockerfile new file mode 100644 index 0000000000..859b122355 --- /dev/null +++ b/docs/support-file/dockerfile/authserver/dockerfile @@ -0,0 +1,8 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_authserver /data/cmdb/cmdb_authserver +RUN mkdir /data/cmdb/cmdb_authserver/logs +RUN chmod +x /data/cmdb/cmdb_authserver/cmdb_authserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone \ No newline at end of file diff --git a/docs/support-file/dockerfile/cacheservice/dockerfile b/docs/support-file/dockerfile/cacheservice/dockerfile new file mode 100644 index 0000000000..e8d4254201 --- /dev/null +++ b/docs/support-file/dockerfile/cacheservice/dockerfile @@ -0,0 +1,8 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_cacheservice /data/cmdb/cmdb_cacheservice +RUN mkdir /data/cmdb/cmdb_cacheservice/logs +RUN chmod +x /data/cmdb/cmdb_cacheservice/cmdb_cacheservice +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone \ No newline at end of file diff --git a/docs/support-file/dockerfile/cloudserver/dockerfile b/docs/support-file/dockerfile/cloudserver/dockerfile new file mode 100644 index 0000000000..ba92cf51bf --- /dev/null +++ b/docs/support-file/dockerfile/cloudserver/dockerfile @@ -0,0 +1,8 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_cloudserver /data/cmdb/cmdb_cloudserver +RUN mkdir /data/cmdb/cmdb_cloudserver/logs +RUN chmod +x /data/cmdb/cmdb_cloudserver/cmdb_cloudserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone \ No newline at end of file diff --git a/docs/support-file/dockerfile/coreservice/dockerfile b/docs/support-file/dockerfile/coreservice/dockerfile new file mode 100644 index 0000000000..159b542b8d --- /dev/null +++ b/docs/support-file/dockerfile/coreservice/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_coreservice /data/cmdb/cmdb_coreservice +RUN mkdir /data/cmdb/cmdb_coreservice/logs +RUN chmod +x /data/cmdb/cmdb_coreservice/cmdb_coreservice +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/datacollection/dockerfile b/docs/support-file/dockerfile/datacollection/dockerfile new file mode 100644 index 0000000000..aafd4ed4ba --- /dev/null +++ b/docs/support-file/dockerfile/datacollection/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_datacollection /data/cmdb/cmdb_datacollection +RUN mkdir /data/cmdb/cmdb_datacollection/logs +RUN chmod +x /data/cmdb/cmdb_datacollection/cmdb_datacollection +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/eventserver/dockerfile b/docs/support-file/dockerfile/eventserver/dockerfile new file mode 100644 index 0000000000..2b2bf9c807 --- /dev/null +++ b/docs/support-file/dockerfile/eventserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_eventserver /data/cmdb/cmdb_eventserver +RUN mkdir /data/cmdb/cmdb_eventserver/logs +RUN chmod +x /data/cmdb/cmdb_eventserver/cmdb_eventserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/hostserver/dockerfile b/docs/support-file/dockerfile/hostserver/dockerfile new file mode 100644 index 0000000000..f592537ee6 --- /dev/null +++ b/docs/support-file/dockerfile/hostserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_hostserver /data/cmdb/cmdb_hostserver +RUN mkdir /data/cmdb/cmdb_hostserver/logs +RUN chmod +x /data/cmdb/cmdb_hostserver/cmdb_hostserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/migrate/dockerfile b/docs/support-file/dockerfile/migrate/dockerfile new file mode 100644 index 0000000000..67cde0c144 --- /dev/null +++ b/docs/support-file/dockerfile/migrate/dockerfile @@ -0,0 +1,2 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +RUN yum -y install jq \ No newline at end of file diff --git a/docs/support-file/dockerfile/monstache/dockerfile b/docs/support-file/dockerfile/monstache/dockerfile new file mode 100644 index 0000000000..3d300a3203 --- /dev/null +++ b/docs/support-file/dockerfile/monstache/dockerfile @@ -0,0 +1,4 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_monstache /data/cmdb/monstache +RUN chmod +x /data/cmdb/monstache/monstache diff --git a/docs/support-file/dockerfile/operationserver/dockerfile b/docs/support-file/dockerfile/operationserver/dockerfile new file mode 100644 index 0000000000..6ea9e7459b --- /dev/null +++ b/docs/support-file/dockerfile/operationserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_operationserver /data/cmdb/cmdb_operationserver +RUN mkdir /data/cmdb/cmdb_operationserver/logs +RUN chmod +x /data/cmdb/cmdb_operationserver/cmdb_operationserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/procserver/dockerfile b/docs/support-file/dockerfile/procserver/dockerfile new file mode 100644 index 0000000000..025a4cbf31 --- /dev/null +++ b/docs/support-file/dockerfile/procserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_procserver /data/cmdb/cmdb_procserver +RUN mkdir /data/cmdb/cmdb_procserver/logs +RUN chmod +x /data/cmdb/cmdb_procserver/cmdb_procserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/synchronizeserver/dockerfile b/docs/support-file/dockerfile/synchronizeserver/dockerfile new file mode 100644 index 0000000000..b71846258a --- /dev/null +++ b/docs/support-file/dockerfile/synchronizeserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_synchronizeserver /data/cmdb/cmdb_synchronizeserver +RUN mkdir /data/cmdb/cmdb_synchronizeserver/logs +RUN chmod +x /data/cmdb/cmdb_synchronizeserver/cmdb_synchronizeserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/taskserver/dockerfile b/docs/support-file/dockerfile/taskserver/dockerfile new file mode 100644 index 0000000000..155a6c3460 --- /dev/null +++ b/docs/support-file/dockerfile/taskserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_taskserver /data/cmdb/cmdb_taskserver +RUN mkdir /data/cmdb/cmdb_taskserver/logs +RUN chmod +x /data/cmdb/cmdb_taskserver/cmdb_taskserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/toposerver/dockerfile b/docs/support-file/dockerfile/toposerver/dockerfile new file mode 100644 index 0000000000..51c92ee7da --- /dev/null +++ b/docs/support-file/dockerfile/toposerver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_toposerver /data/cmdb/cmdb_toposerver +RUN mkdir /data/cmdb/cmdb_toposerver/logs +RUN chmod +x /data/cmdb/cmdb_toposerver/cmdb_toposerver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/dockerfile/webserver/dockerfile b/docs/support-file/dockerfile/webserver/dockerfile new file mode 100644 index 0000000000..51443dacc1 --- /dev/null +++ b/docs/support-file/dockerfile/webserver/dockerfile @@ -0,0 +1,9 @@ +FROM ccr.ccs.tencentyun.com/bk.io/centos7-cmdb:base +ENV container docker +COPY cmdb_webserver /data/cmdb/cmdb_webserver +RUN mkdir /data/cmdb/cmdb_webserver/logs +RUN chmod +x /data/cmdb/cmdb_webserver/cmdb_webserver +#time zone setting +ENV TimeZone=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone + diff --git a/docs/support-file/helm/.helmignore b/docs/support-file/helm/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/docs/support-file/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/docs/support-file/helm/Chart.lock b/docs/support-file/helm/Chart.lock new file mode 100644 index 0000000000..145d9c7eb8 --- /dev/null +++ b/docs/support-file/helm/Chart.lock @@ -0,0 +1,18 @@ +dependencies: +- name: common + repository: https://charts.bitnami.com/bitnami + version: 1.8.0 +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 14.8.8 +- name: mongodb + repository: https://charts.bitnami.com/bitnami + version: 10.23.10 +- name: elasticsearch + repository: https://charts.bitnami.com/bitnami + version: 17.5.2 +- name: zookeeper + repository: https://charts.bitnami.com/bitnami + version: 7.0.0 +digest: sha256:e302c9a4cb1e850846f28663cb7c177b9d74216694e3f9dfce1f3cf6f2325249 +generated: "2022-02-17T15:43:13.93304063+08:00" diff --git a/docs/support-file/helm/Chart.yaml b/docs/support-file/helm/Chart.yaml new file mode 100644 index 0000000000..f7eb8b0c28 --- /dev/null +++ b/docs/support-file/helm/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +appVersion: 3.10.16 +description: BlueKing Configuration Management DataBase (bk-cmdb) is an enterprise level configuration management serivce database. +name: bk-cmdb +type: application +version: 3.11.11 +dependencies: + - name: common + repository: https://charts.bitnami.com/bitnami + version: 1.8.0 + - condition: redis.enabled + name: redis + repository: https://charts.bitnami.com/bitnami + version: 14.8.8 + - condition: mongodb.enabled + name: mongodb + repository: https://charts.bitnami.com/bitnami + version: 10.23.10 + - condition: elasticsearch.enabled + name: elasticsearch + repository: https://charts.bitnami.com/bitnami + version: 17.5.2 + - condition: zookeeper.enabled + name: zookeeper + repository: https://charts.bitnami.com/bitnami + version: 7.0.0 diff --git a/docs/support-file/helm/README.md b/docs/support-file/helm/README.md new file mode 100644 index 0000000000..91bb47e5b0 --- /dev/null +++ b/docs/support-file/helm/README.md @@ -0,0 +1,712 @@ + + +# BK-CMDB + +蓝鲸配置平台(蓝鲸CMDB)是一个面向资产及应用的企业级配置管理平台。 + +本文档内容为如何在 Kubernetes 集群上部署 BK-CMDB 服务。 + +说明:内置的mongodb、redis、zookeeper、elasticsearch等组件仅用于测试环境,正式环境部署必须配置为外部组件。 + +## BK-CMDB 部署项目 + +### 架构设计 + +* [点击这里](https://github.com/Tencent/bk-cmdb/blob/master/docs/overview/architecture.md) + +## 部署 + +### 环境要求 + +- Kubernetes 1.12+ +- Helm 3+ + + + +### 安装Chart + + 使用以下命令安装名称为`bkcmdb`的release, 其中``代表helm仓库地址: + +```shell +$ helm repo add bkee +$ helm install bkcmdb bkee/bkcmdb +``` + +上述命令将使用默认配置在Kubernetes集群中部署bkcmdb, 并输出访问指引。 + + + +### 卸载Chart + +使用以下命令卸载`bkcmdb`: + +```shell +$ helm uninstall bkcmdb +``` + +上述命令将移除所有和bkrepo相关的Kubernetes组件。 + + + +## Chart依赖 + +- [bitnami/mongodb](https://github.com/bitnami/charts/tree/master/bitnami/mongodb) +- [bitnami/redis](https://github.com/bitnami/charts/tree/master/bitnami/redis) +- [bitnami/zookeeper](https://github.com/bitnami/charts/tree/master/bitnami/zookeeper) +- [bitnami/elasticsearch](https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch) + +## 配置说明 + +各项配置集中在仓库的一个values.yaml文件之中 + +### 镜像配置 + +| 参数 | 描述 | 默认值 | +| :-------------: | :----------: | :----------: | +| image.registry | 镜像源域名 | mirrors.tencent.com | +| image.pullPolicy | 镜像拉取策略 | IfNotPresent | + +### 启动时初始化配置说明 + +启动时会执行job,分别对cmdb依赖的mongodb数据库进行初始化操作,以及往GSE注册dataid + +| 参数 | 描述 | 默认值 | +| :----------------------: | :---------------------------: | :----: | +| migrate.enabled | 是否在执行helm时启动该job | true | +| migrate.image.repository | 初始化job所需要的镜像仓库地址 | migrate | +| migrate.image.tag | 初始化job所需要的镜像版本 | {TAG_NAME} | +| migrateDataId | 是否在启动时往GSE注册dataid | false | + +### 蓝鲸产品URL配置 + +| 参数 | 描述 | 默认值 | +| :------: | :------: | :---------------------: | +| bkPaasUrl | paas地址 | http://paas.example.com | +| bkIamApiUrl | bkiam后端地址 | http://bkiam-web | +| bkComponentApiUrl | 蓝鲸ESB地址 | http://bkapi.paas.example.com | +| bkLoginApiUrl | 蓝鲸登录地址 | http://bk-login-web | +| bkNodemanUrl | 节点管理地址 | http://apps.paas.example.com/bk--nodeman | + +### adminserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| adminserver.enabled | 是否在执行helm时启动 | true | +| adminserver.image.repository | 服务镜像名 | cmdb_adminserver | +| adminserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| adminserver.replicas | pod副本数量 | 1 | +| adminserver.port | 服务端口 | 80 | +| adminserver.configDir | 需要的配置文件路径 | /data/cmdb/cmdb_adminserver/configure | +| adminserver.errors | 需要的错误文件路径 | /data/cmdb/cmdb_adminserver/conf/errors | +| adminserver.language | 需要的语言文件路径 | /data/cmdb/cmdb_adminserver/conf/language | +| adminserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_adminserver/logs | +| adminserver.command.logLevel | 日志等级 | 3 | +| adminserver.command.logToStdErr | 是否把日志输出到stderr | false | +| adminserver.workDir | 工作目录 | /data/cmdb/cmdb_adminserver | + +### apiserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| apiserver.enabled | 是否在执行helm时启动 | true | +| apiserver.image.repository | 服务镜像名 |cmdb_apiserver | +| apiserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| apiserver.replicas | pod副本数量 | 1 | +| apiserver.port | 服务端口 | 80 | +| apiserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_apiserver/logs | +| apiserver.command.logLevel | 日志等级 | 3 | +| apiserver.command.logToStdErr | 是否把日志输出到stderr | false | +| apiserver.workDir | 工作目录 | /data/cmdb/cmdb_apiserver | + +### authserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| authserver.enabled | 是否在执行helm时启动 | true | +| authserver.image.repository | 服务镜像名 | cmdb_authserver | +| authserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| authserver.replicas | pod副本数量 | 1 | +| authserver.port | 服务端口 | 80 | +| authserver.ingress.enabled | 开启ingress访问 | true | +| authserver.ingress.hosts | ingress代理访问的域名 |cmdb-auth.example.com| +| authserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_authserver/logs | +| authserver.command.logLevel | 日志等级 | 3 | +| authserver.command.logToStdErr | 是否把日志输出到stderr | false | +| authserver.workDir | 工作目录 | /data/cmdb/cmdb_authserver | + +### cacheservice服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| cacheservice.enabled | 是否在执行helm时启动 | true | +| cacheservice.image.repository | 服务镜像名 | cmdb_cacheservice | +| cacheservice.image.tag | 服务镜像版本 | {TAG_NAME} | +| cacheservice.replicas | pod副本数量 | 1 | +| cacheservice.port | 服务端口 | 80 | +| cacheservice.command.logDir | 日志存放路径 | /data/cmdb/cmdb_cacheservice/logs | +| cacheservice.command.logLevel | 日志等级 | 3 | +| cacheservice.command.logToStdErr | 是否把日志输出到stderr | false | +| cacheservice.workDir | 工作目录 | /data/cmdb/cmdb_cacheservice | + +### cloudserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| cloudserver.enabled | 是否在执行helm时启动 | true | +| cloudserver.image.repository | 服务镜像名 | cmdb_cloudserver | +| cloudserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| cloudserver.replicas | pod副本数量 | 1 | +| cloudserver.port | 服务端口 | 80 | +| cloudserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_cloudserver/logs | +| cloudserver.command.logLevel | 日志等级 | 3 | +| cloudserver.command.logToStdErr | 是否把日志输出到stderr | false | +| cloudserver.command.enableCryptor | 是否开启加密服务 | false | +| cloudserver.workDir | 工作目录 | /data/cmdb/cmdb_cloudserver | + +### coreservice服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| coreservice.enabled | 是否在执行helm时启动 | true | +| coreservice.image.repository | 服务镜像名 | cmdb_coreservice | +| coreservice.image.tag | 服务镜像版本 | {TAG_NAME} | +| coreservice.replicas | pod副本数量 | 1 | +| coreservice.port | 服务端口 | 80 | +| coreservice.command.logDir | 日志存放路径 | /data/cmdb/cmdb_coreservice/logs | +| coreservice.command.logLevel | 日志等级 | 3 | +| coreservice.command.logToStdErr | 是否把日志输出到stderr | false | +| coreservice.workDir | 工作目录 | /data/cmdb/cmdb_coreservice | + +### datacollection服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| datacollection.enabled | 是否在执行helm时启动 | true | +| datacollection.image.repository | 服务镜像名 | cmdb_datacollection | +| datacollection.image.tag | 服务镜像版本 | {TAG_NAME} | +| datacollection.replicas | pod副本数量 | 1 | +| datacollection.port | 服务端口 | 80 | +| datacollection.command.logDir | 日志存放路径 | /data/cmdb/cmdb_datacollection/logs | +| datacollection.command.logLevel | 日志等级 | 3 | +| datacollection.command.logToStdErr | 是否把日志输出到stderr | false | +| datacollection.workDir | 工作目录 | /data/cmdb/cmdb_datacollection | + +### eventserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| eventserver.enabled | 是否在执行helm时启动 | true | +| eventserver.image.repository | 服务镜像名 | cmdb_eventserver | +| eventserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| eventserver.replicas | pod副本数量 | 1 | +| eventserver.port | 服务端口 | 80 | +| eventserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_eventserver/logs | +| eventserver.command.logLevel | 日志等级 | 3 | +| eventserver.command.logToStdErr | 是否把日志输出到stderr | false | +| eventserver.workDir | 工作目录 | /data/cmdb/cmdb_eventserver | + +### hostserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| hostserver.enabled | 是否在执行helm时启动 | true | +| hostserver.image.repository | 服务镜像名 | cmdb_hostserver | +| hostserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| hostserver.replicas | pod副本数量 | 1 | +| hostserver.port | 服务端口 | 80 | +| hostserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_hostserver/logs | +| hostserver.command.logLevel | 日志等级 | 3 | +| hostserver.command.logToStdErr | 是否把日志输出到stderr | false | +| hostserver.workDir | 工作目录 | /data/cmdb/cmdb_hostserver | + +### operationserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| operationserver.enabled | 是否在执行helm时启动 | true | +| operationserver.image.repository | 服务镜像名 | cmdb_operationserver | +| operationserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| operationserver.replicas | pod副本数量 | 1 | +| operationserver.port | 服务端口 | 80 | +| operationserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_operationserver/logs | +| operationserver.command.logLevel | 日志等级 | 3 | +| operationserver.command.logToStdErr | 是否把日志输出到stderr | false | +| operationserver.workDir | 工作目录 | /data/cmdb/cmdb_operationserver | + +### procserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| procserver.enabled | 是否在执行helm时启动 | true | +| procserver.image.repository | 服务镜像名 | cmdb_procserver | +| procserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| procserver.replicas | pod副本数量 | 1 | +| procserver.port | 服务端口 | 80 | +| procserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_procserver/logs | +| procserver.command.logLevel | 日志等级 | 3 | +| procserver.command.logToStdErr | 是否把日志输出到stderr | false | +| procserver.workDir | 工作目录 | /data/cmdb/cmdb_procserver | + +### taskserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| taskserver.enabled | 是否在执行helm时启动 | true | +| taskserver.image.repository | 服务镜像名 | cmdb_taskserver | +| taskserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| taskserver.replicas | pod副本数量 | 1 | +| taskserver.port | 服务端口 | 80 | +| taskserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_taskserver/logs | +| taskserver.command.logLevel | 日志等级 | 3 | +| taskserver.command.logToStdErr | 是否把日志输出到stderr | false | +| taskserver.workDir | 工作目录 | /data/cmdb/cmdb_taskserver | + +### toposerver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| toposerver.enabled | 是否在执行helm时启动 | true | +| toposerver.image.repository | 服务镜像名 | cmdb_toposerver | +| toposerver.image.tag | 服务镜像版本 | {TAG_NAME} | +| toposerver.replicas | pod副本数量 | 1 | +| toposerver.port | 服务端口 | 80 | +| toposerver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_toposerver/logs | +| toposerver.command.logLevel | 日志等级 | 3 | +| toposerver.command.logToStdErr | 是否把日志输出到stderr | false | +| toposerver.workDir | 工作目录 | /data/cmdb/cmdb_toposerver | + +### synchronizeserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| synchronizeserver.enabled | 是否在执行helm时启动 | true | +| synchronizeserver.image.repository | 服务镜像名 | cmdb_synchronizeserver | +| synchronizeserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| synchronizeserver.replicas | pod副本数量 | 1 | +| synchronizeserver.port | 服务端口 | 80 | +| synchronizeserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_synchronizeserver/logs | +| synchronizeserver.command.logLevel | 日志等级 | 3 | +| synchronizeserver.command.logToStdErr | 是否把日志输出到stderr | false | +| synchronizeserver.workDir | 工作目录 | /data/cmdb/cmdb_synchronizeserver | + +### webserver服务配置说明 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| webserver.enabled | 是否在执行helm时启动 | true | +| webserver.image.repository | 服务镜像名 | cmdb_webserver | +| webserver.image.tag | 服务镜像版本 | {TAG_NAME} | +| webserver.replicas | pod副本数量 | 1 | +| webserver.port | 服务端口 | 80 | +| webserver.ingress.enabled | 开启ingress访问 | true | +| webserver.ingress.hosts | ingress代理访问的域名 |cmdb.example.com| +| webserver.service.type | 服务类型 | ClusterIP | +| webserver.service.targetPort | 代理的目标端口 | 80 | +| webserver.service.nodePort | 访问端口 | | +| webserver.command.logDir | 日志存放路径 | /data/cmdb/cmdb_webserver/logs | +| webserver.command.logLevel | 日志等级 | 3 | +| webserver.command.logToStdErr | 是否把日志输出到stderr | false | +| webserver.workDir | 工作目录 | /data/cmdb/cmdb_webserver | + +### 服务开启鉴权开关 + +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| iam.auth.enable | 是否开启鉴权 | false | + +### common开头的配置 + +以`common`开头的配置,对应的是cmdb中`common.yaml`的配置文件中的各项配置,可根据原`common.yaml`中的配置对`common`开头的配置进行修改 + +### mongodb配置 +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| mongodb.enabled | 是否部署mognodb,如果需要使用外部数据库,设置为`false`并配置`mongodb.externalMongodb`和`mongodb.watch`下关于外部mongodb的配置 | true | + +`mongodb.externalMongodb` 和 `mongodb.watch` 开头的配置,可根据原`mongodb.yaml`中的配置进行修改 + +### redis配置 +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| redis.enabled | 是否部署redis,如果需要使用外部数据库,设置为`false`并配置`redis.redis`、`redis.snapshotRedis`、`redis.discoverRedis`、`redis.netCollectRedis`下关于外部redis的配置 | true | + +`redis.redis`、`redis.snapshotRedis`、`redis.discoverRedis`、`redis.netCollectRedis` 开头的配置,可根据原`redis.yaml`中的配置进行修改 + +### zookeeper配置 +| 参数 | 描述 | 默认值 | +| :----------------------------------: | :-----------------------------: | :------------------------------: | +| zookeeper.enabled | 是否部署zookeeper作为配置发现中心、服务发现中心,如果需要使用外部zookeeper组件,设置为`false`并配置`configAndServiceCenter.addr` | true | + +### 配置发现中心、服务发现中心配置 + +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| configAndServiceCenter.addr | 外部配置发现中心、服务发现中心地址,当zookeeper.enabled配置为`false`时,使用此参数连接外部组件 | | + +### elasticsearch配置 + +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| common.es.fullTextSearch | 开启全文索引开关,可选值为`on` 和 `off`, 默认关闭 | off | +| common.es.url | 连接外部es的url | | +| common.es.usr | 连接外部es的用户名 | | +| common.es.pwd | 连接外部es的密码 | | +| elasticsearch.enabled | 是否启动内部部署的es,如果需要使用外部es组件,设置为`false`并配置`common.es.url`、`common.es.usr`、`common.es.pwd`的外部组件信息| false | +| elasticsearch.master.replicas | 内置es的master节点数 | 1 | +| elasticsearch.coordinating.replicas | 内置es的协调节点数 | 1 | +| elasticsearch.data.replicas | 内置es的数据节点数 | 1 | + +### monstache配置 +monstache是一个用于将mongodb的数据同步到es去创建索引的一个组件 + +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| monstache.enabled | 是否启动内部部署的monstache,如果需要使用外部monstache组件,设置为`false` | false | +| monstache.image.repository | 服务镜像名 | cmdb_monstache | +| monstache.image.tag | 服务镜像版本 | {TAG_NAME} | +| monstache.replicas | pod副本数量 | 1 | +| monstache.port | 服务端口 | 80 | +| monstache.workDir | 工作路径 | /data/cmdb/monstache | +| monstache.configDir | 需要的配置文件路径 | /data/cmdb/monstache/etc | +| monstache.directReadDynamicIncludeRegex | monstache配置内容 |内容过长请查看原value.yaml文件| +| monstache.mapperPluginPath | monstache配置内容 |/data/cmdb/monstache/monstache-plugin.so| +| monstache.elasticsearchShardNum | monstache配置内容 | 1 | +| monstache.elasticsearchReplicaNum | monstache配置内容 | 1 | + +### bkLogConfig配置 +- bkLogConfig配置用于配置接入蓝鲸日志平台功能 + +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| bkLogConfig.file.enabled | 是否采集容器内落地文件日志 | false | +| bkLogConfig.file.dataId | 采集容器内落地文件日志的dataid,dataid在日志平台上申请分配 | 1 | +| bkLogConfig.std.enabled | 是否采集容器标准输出日志 | false | +| bkLogConfig.std.dataId | 采集容器标准输出日志的dataid,dataid在日志平台上申请分配 | 1 | + +### serviceMonitor配置 +- serviceMonitor配置用于配置服务监控功能 + +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| serviceMonitor.enabled | 是否开启服务监控,采集cmdb业务指标数据 | false | +| serviceMonitor.interval | cmdb业务指标数据采集间隔时间 | 15s | + +### 证书相关配置 +| 参数 | 描述 | 默认值 | +| :-------------------------: | :----------------------------------------------------------: | :----: | +| certPath | 证书的挂载pod里的路径 | "/data/cmdb/cert" | +| gseCert.ca |gse的CA证书 | "" | +| gseCert.cmdbCert | cmdb连接gse服务所需要的证书 |"" | +| gseCert.cmdbKey | cmdb连接gse服务所需要的证书的密钥 | ""| + +## 配置案例 + +### 1. 使用外接mongodb +```yaml +mongodb: + enabled: false + ... + # external mongo configuration + externalMongodb: + enabled: xxx + usr: xxx + pwd: xxx + database: xxx + host: 127.0.0.1:27017 + maxOpenConns: xxx + maxIdleConns: xxx + mechanism: xxx + rsName: xxx + socketTimeoutSeconds: xxx + watch: + usr: xxx + pwd: xxx + database: xxx + host: 127.0.0.1:27017 + maxOpenConns: xxx + maxIdleConns: xxx + mechanism: xxx + rsName: xxx + socketTimeoutSeconds: xxx +``` + +### 2. 使用外接redis + +```yaml +redis: + enabled: false + ... + # external redis configuration + redis: + host: 127.0.0.1:6379 + pwd: xxx + database: xxx + maxOpenConns: xxx + maxIdleConns: xxx + sentinelPwd: xxx + masterName: xxx + + snapshotRedis: + host: 127.0.0.1:6379 + pwd: xxx + database: xxx + maxOpenConns: xxx + maxIdleConns: xxx + sentinelPwd: xxx + masterName: xxx + + discoverRedis: + host: 127.0.0.1:6379 + pwd: xxx + database: xxx + maxOpenConns: xxx + maxIdleConns: xxx + sentinelPwd: xxx + masterName: xxx + + netCollectRedis: + host: 127.0.0.1:6379 + pwd: xxx + database: xxx + maxOpenConns: xxx + maxIdleConns: xxx + sentinelPwd: xxx + masterName: xxx +``` + +### 3. 使用外接zookeeper作为配置发现中心和服务发现中心 + +```yaml +zookeeper: + enabled: false +configAndServiceCenter: + addr: 127.0.0.1:2181 + +``` + +### 4. 使用elasticsearch相关操作 + +- 如果在cmdb中使用es,首先需要开始es的开关 + +```yaml +common: + es: + fullTextSearch: "on" +``` + +- 在cmdb中使用elasticsearch需要依赖两个组件,一个是elasticsearch本身,一个monstache(用于将mongodb数据同步到elasticsearch) + + (1)使用内置组件 + + ​ helm chart中有内置的elasticsearch和monstache,可通过下面操作打开: + + ```yaml + elasticsearch: + enabled: true + + ·· + + monstache: + enabled: true + ``` + + ​ 将elasticsearch和monstache的enabled变为true即可 + + + + (2)使用外接组件 + + 这里仅需配置连接外置的elasticsearch,这时外置的monstach已经与cmdb没有配置上的联系 + + ```yaml + common: + es: + url: xxx + usr: xxx + pwd: xxx + ``` + + 配置上外部es的url,账户密码的信息即可 + +- 当然也可以使用内置的monstache,连接外部的elasticsearch + + ```yaml + monstache: + enabled: true + + ··· + + common: + es: + url: xxx + usr: xxx + pwd: xxx + ``` + + 将monstache.enabled变为true,配置好外部的elasticsearch的配置即可 + +### 5. 配置webserver不同的服务暴露方式 + +默认通过Ingress暴露服务,也可以使用以下方式: + +- 使用NodePort直接访问 + + ```yaml + webserver: + ingress: + enabled: false + ... + service: + type: "NodePort" + ports: + ... + nodePort: 32033 # 端口可以自定义 + ``` + + ```yaml + common: + ... + site: + domainUrl: http://127.0.0.1:32033/ # ip需要根据实际情况的进行配置,端口为上面配置的同一端口 + ``` + + 修改上述配置后,即可通过`ip:32033`的方式访问 + + ### 6. 开启权限验证 + 通过进行下面的配置: +```yaml +开启权限 +iam: + auth: + enabled: true + +// 配置权限中心和esb地址、app code、app secret,开启前端的auth +bkIamApiUrl: xxx +bkComponentApiUrl: xxx + +common: + ... + auth: + appCode: xxx + appSecret: xxx + esb: + appCode: xxx + appSecret: xxx + ... + webServer: + site: + authScheme: iam +``` + +### 7. blueking方式登陆 +```yaml +通过将登陆方式设置为蓝鲸登陆方式和配置蓝鲸登陆地址等信息: + +# pass地址 +bkPaasUrl: xxx +# bk-login地址 +bkLoginApiUrl: xxx + +common: + ... + webServer: + site: + appCode: bk_cmdb + ... + login: + version: blueking +``` + +### 8. 配置authserver不同的服务暴露方式 + +默认通过Ingress暴露服务,也可以使用以下方式: + +- 使用NodePort直接访问 + + ```yaml + authserver: + ingress: + enabled: false + ... + service: + type: "NodePort" + ports: + ... + nodePort: 32033 # 端口可以自定义 + ``` + + 修改上述配置后,即可通过`ip:32033`方式对外暴露访问 + +## 常见问题 + +### 1. cmdb的helm chart启动后如何访问 + +答:因为默认的访问方式是通过ingress访问,域名为 cmdb.bk.com,所以需要配置 cmdb.bk.com 的dns解析,例如在机器的/usr/hosts文件中配置: + +```yaml +127.0.0.1 cmdb.bk.com +``` + +在minikube环境通过下面指令启用` Ingress `控制器 +```yaml + minikube addons enable ingress +``` +配置完后,通过访问`cmdb.bk.com/login`地址进行登陆,默认 的账号为`cc`,密码为`cc` + + + +### 2. cmdb启动不起来 + +答: + +1、cmdb启动需要依赖的redis、mongodb、zookeeper等,部分服务需要等依赖的组件ready后才可以启动,再加上需要等adminserver启动完后,有一个bootstrap的job需要执行,所以需要等待一段时间服务才能启动 + +2、authserver需要相关配置连接权限中心,如果没有配置是启动不来的,根据默认配置无法启动。可通过修改 + +```yaml +authserver: + enabled: false +``` + +变为false不启动authserver服务 或者配置权限中心所需要的配置 + +如果长时间有些服务无法启动,如:toposerver,请确认job是否启动并执行完成 + +### 3. 想要配置多个外置zookeeper地址作为服务中心怎么办? + +答:通过,(逗号)分隔,如下: +``` +configAndServiceCenter: + addr: 127.0.0.1:2181,127.0.0.2:2181 + +``` + +### 4. 想要配置多个外置redis地址怎么办? + +答:通过,(逗号)分隔,如下: +``` +redis: + ... + # external redis configuration + redis: + host: 127.0.0.1:6379,128.0.0.1:6379 + +``` + +### 5. 想要配置多个外置mongo地址怎么办? + +答:通过,(逗号)分隔,如下: +``` +mongodb: + # external mongo configuration + externalMongodb: + enabled: xxx + usr: xxx + pwd: xxx + database: xxx + host: 127.0.0.1:27017,127.0.0.1:27018 +``` + + + + diff --git a/docs/support-file/helm/templates/NOTES.txt b/docs/support-file/helm/templates/NOTES.txt new file mode 100644 index 0000000000..1c7720d469 --- /dev/null +++ b/docs/support-file/helm/templates/NOTES.txt @@ -0,0 +1,19 @@ +NAME: BK_CMDB + +验证步骤: +1、默认的访问方式是通过ingress访问,域名为 {{- printf "%s" .Values.webserver.ingress.host | trimPrefix "[" | trimSuffix "]" }},需要配置dns解析,例如在机器的/etc/hosts文件中配置: + +ip {{- printf " "}} {{- printf "%s" .Values.webserver.ingress.host | trimPrefix "[" | trimSuffix "]" }} + +上述的ip为ingress的ip地址 + +2、在minikube环境通过下面指令启用 Ingress 控制器 + + minikube addons enable ingress + +3、 +{{- if eq .Values.common.webServer.login.version "blueking" -}} +通过蓝鲸登陆方式进行账号登陆 +{{- else -}} +配置完后,通过访问 {{- printf "%s" .Values.webserver.ingress.host | trimPrefix "[" | trimSuffix "]" }}/login 地址进行登陆,账号:密码为 {{ .Values.common.webServer.session.userInfo }} +{{- end -}} \ No newline at end of file diff --git a/docs/support-file/helm/templates/_helpers.tpl b/docs/support-file/helm/templates/_helpers.tpl new file mode 100644 index 0000000000..33f2766d56 --- /dev/null +++ b/docs/support-file/helm/templates/_helpers.tpl @@ -0,0 +1,278 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bk-cmdb.name" -}} +{{- default "bk-cmdb" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bk-cmdb.fullname" -}} +{{- $name := default "bk-cmdb" .Values.nameOverride -}} +{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* Helm required labels */}} +{{- define "bk-cmdb.labels" -}} +heritage: {{ .Release.Service }} +release: {{ .Release.Name }} +chart: {{ .Chart.Name }} +app: "{{ template "bk-cmdb.name" . }}" +{{- end -}} + +{{/* matchLabels */}} +{{- define "bk-cmdb.matchLabels" -}} +release: {{ .Release.Name }} +app: "{{ template "bk-cmdb.name" . }}" +{{- end -}} + +{{- define "bk-cmdb.adminserver" -}} + {{- printf "%s-admin" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.apiserver" -}} + {{- printf "%s-api" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.authserver" -}} + {{- printf "%s-auth" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.cacheservice" -}} + {{- printf "%s-cache" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.cloudserver" -}} + {{- printf "%s-cloud" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.datacollection" -}} + {{- printf "%s-datacollection" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.eventserver" -}} + {{- printf "%s-event" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.hostserver" -}} + {{- printf "%s-host" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.toposerver" -}} + {{- printf "%s-topo" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.webserver" -}} + {{- printf "%s-web" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.procserver" -}} + {{- printf "%s-proc" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.taskserver" -}} + {{- printf "%s-task" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.operationserver" -}} + {{- printf "%s-operation" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.coreservice" -}} + {{- printf "%s-core" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.synchronizeserver" -}} + {{- printf "%s-synchronize" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{- define "bk-cmdb.ingress" -}} + {{- printf "%s-ingress" (include "bk-cmdb.fullname" .) -}} +{{- end -}} + +{{/* +Create a default fully qualified redis name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "cmdb.redis.fullname" -}} +{{- $name := default "redis" .Values.redis.nameOverride -}} +{{- printf "%s-%s-master" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "cmdb.redis.host" -}} + {{- if eq .Values.redis.enabled true -}} + {{- template "cmdb.redis.fullname" . -}}:{{- printf "%s" "6379" -}} + {{- else -}} + {{- .Values.redis.redis.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.redis.pwd" -}} +{{- if .Values.redis.enabled -}} + {{- .Values.redis.auth.password -}} +{{- else }} + {{- .Values.redis.redis.pwd -}} +{{- end -}} +{{- end -}} + +{{- define "cmdb.redis.snap.host" -}} + {{- if eq .Values.redis.enabled true -}} + {{- template "cmdb.redis.fullname" . -}}:{{- printf "%s" "6379" -}} + {{- else -}} + {{- .Values.redis.snapshotRedis.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.redis.snap.pwd" -}} +{{- if .Values.redis.enabled -}} + {{- .Values.redis.auth.password -}} +{{- else }} + {{- .Values.redis.snapshotRedis.pwd -}} +{{- end -}} +{{- end -}} + +{{- define "cmdb.redis.discover.host" -}} + {{- if eq .Values.redis.enabled true -}} + {{- template "cmdb.redis.fullname" . -}}:{{- printf "%s" "6379" -}} + {{- else -}} + {{- .Values.redis.discoverRedis.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.redis.discover.pwd" -}} +{{- if .Values.redis.enabled -}} + {{- .Values.redis.auth.password -}} +{{- else }} + {{- .Values.redis.discoverRedis.pwd -}} +{{- end -}} +{{- end -}} + +{{- define "cmdb.redis.netcollect.host" -}} + {{- if eq .Values.redis.enabled true -}} + {{- template "cmdb.redis.fullname" . -}}:{{- printf "%s" "6379" -}} + {{- else -}} + {{- .Values.redis.netCollectRedis.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.redis.netcollect.pwd" -}} +{{- if .Values.redis.enabled -}} + {{- .Values.redis.auth.password -}} +{{- else }} + {{- .Values.redis.netCollectRedis.pwd -}} +{{- end -}} +{{- end -}} + +{{- define "cmdb.zookeeper.fullname" -}} +{{- $name := default "zookeeper" .Values.zookeeper.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "cmdb.configAndServiceCenter.addr" -}} + {{- if eq .Values.zookeeper.enabled true -}} + {{- template "cmdb.zookeeper.fullname" . -}}:{{- printf "%s" "2181" -}} + {{- else -}} + {{- .Values.configAndServiceCenter.addr -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.addr" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{ .Release.Name }}-mongodb-0.{{ .Release.Name }}-{{- .Values.mongodb.host -}}:{{- printf "%s" "27017" -}} + {{- else -}} + {{- .Values.mongodb.externalMongodb.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.usr" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{- .Values.mongodb.auth.username -}} + {{- else -}} + {{- .Values.mongodb.externalMongodb.usr -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.pwd" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{- .Values.mongodb.auth.password -}} + {{- else -}} + {{- .Values.mongodb.externalMongodb.pwd -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.watch.addr" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{ .Release.Name }}-mongodb-0.{{ .Release.Name }}-{{- .Values.mongodb.host -}}:{{- printf "%s" "27017" -}} + {{- else -}} + {{- .Values.mongodb.watch.host -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.watch.usr" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{- .Values.mongodb.auth.username -}} + {{- else -}} + {{- .Values.mongodb.watch.usr -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.watch.pwd" -}} + {{- if eq .Values.mongodb.enabled true -}} + {{- .Values.mongodb.auth.password -}} + {{- else -}} + {{- .Values.mongodb.watch.pwd -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.mongodb.mongo-url" -}} + mongodb://{{ include "cmdb.mongodb.usr" . }}:{{ include "cmdb.mongodb.pwd" . }}@{{- template "cmdb.mongodb.addr" . -}}/cmdb +{{- end -}} + +{{- define "cmdb.elasticsearch.urlAndPort" -}} + {{- if eq .Values.elasticsearch.enabled true -}} + {{- $name := default "elasticsearch" .Values.elasticsearch.nameOverride -}} + {{- printf "http://%s-%s-coordinating-only" .Release.Name $name | trunc 63 | trimSuffix "-" -}}:{{- printf "%s" "9200" -}} + {{- else -}} + {{- .Values.common.es.url -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.basicImagesAddress" -}} + {{ .Values.image.registry }}/{{ .Values.migrate.image.repository }}:v{{ default .Chart.AppVersion .Values.migrate.image.tag }} +{{- end -}} + +{{- define "cmdb.webserver.bkLoginUrl" -}} + {{- if eq .Values.common.webServer.login.version "opensource" -}} + {{- printf "%s" "" -}} + {{- else -}} + {{- printf "%s" .Values.bkPaasUrl -}}/login/?app_id=%s&c_url=%s + {{- end -}} +{{- end -}} + +{{- define "cmdb.webserver.bkHttpsLoginUrl" -}} + {{- if eq .Values.common.webServer.login.version "opensource" -}} + {{- printf "%s" "" -}} + {{- else -}} + {{- printf "%s" .Values.bkPaasUrl -}}/login/?app_id=%s&c_url=%s + {{- end -}} +{{- end -}} + +{{- define "cmdb.webserver.bk_desktop_url" -}} + {{- if eq .Values.common.webServer.login.version "opensource" -}} + {{- printf "%s" "" -}} + {{- else -}} + {{- printf "%s" .Values.bkPaasUrl -}} + {{- end -}} +{{- end -}} + +{{- define "cmdb.webserver.paas_domain_url" -}} + {{- if eq .Values.common.webServer.login.version "opensource" -}} + {{- printf "%s" "" -}} + {{- else -}} + {{- printf "%s" .Values.bkComponentApiUrl -}} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/docs/support-file/helm/templates/adminserver/adminserver-dpl.yaml b/docs/support-file/helm/templates/adminserver/adminserver-dpl.yaml new file mode 100644 index 0000000000..5ac16164ce --- /dev/null +++ b/docs/support-file/helm/templates/adminserver/adminserver-dpl.yaml @@ -0,0 +1,99 @@ +{{- if .Values.adminserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-adminserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: adminserver +spec: + replicas: {{ .Values.adminserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: adminserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + component: adminserver + {{- with .Values.adminserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.adminserver.podAnnotations }} + {{ toYaml .Values.adminserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: adminserver + image: {{ .Values.image.registry }}/{{ .Values.adminserver.image.repository }}:v{{ default .Chart.AppVersion .Values.adminserver.image.tag }} + workingDir: {{ .Values.adminserver.workDir }}/ + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["./cmdb_adminserver"] + args: + - --addrport=$(POD_IP):{{ .Values.adminserver.port }} + - --config={{ .Values.adminserver.configDir }}/migrate.yaml + {{- if .Values.adminserver.command.logDir }} + - --log-dir={{ .Values.adminserver.command.logDir }} + {{- end }} + - --v={{ .Values.adminserver.command.logLevel }} + - --logtostderr={{ .Values.adminserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.adminserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.adminserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + {{- if .Values.adminserver.resources }} + resources: {{ toYaml .Values.adminserver.resources | nindent 10 }} + {{- end }} + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.adminserver.env }} + {{ toYaml .Values.adminserver.env | indent 10 }} + {{- end }} + ports: + - containerPort: {{ .Values.adminserver.port }} + volumeMounts: + - name: configures + mountPath: {{ .Values.adminserver.configDir }} + {{- if .Values.adminserver.volumeMounts }} + {{- with .Values.adminserver.volumeMounts }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-adminserver-configures + {{- if .Values.adminserver.volumes }} + {{- with .Values.adminserver.volumes }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} + {{- with .Values.adminserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.adminserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.adminserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} +{{- end }} diff --git a/docs/support-file/helm/templates/adminserver/adminserver-svc.yaml b/docs/support-file/helm/templates/adminserver/adminserver-svc.yaml new file mode 100644 index 0000000000..fad34c2674 --- /dev/null +++ b/docs/support-file/helm/templates/adminserver/adminserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.adminserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.adminserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.adminserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: adminserver +{{- end }} diff --git a/docs/support-file/helm/templates/adminserver/configmap.yaml b/docs/support-file/helm/templates/adminserver/configmap.yaml new file mode 100644 index 0000000000..ade42b70a3 --- /dev/null +++ b/docs/support-file/helm/templates/adminserver/configmap.yaml @@ -0,0 +1,382 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-adminserver-configures +data: +{{/* + {{- $files := .Files }} + {{- range tuple "common.yaml" "extra.yaml" "migrate.yaml" "mongodb.yaml" "redis.yaml" }} + {{ . }}: |- + {{ printf "configures/%s" . | $files.Get }} + {{- end }} +*/}} + common.yaml: |- + #elasticsearch相关 + es: + # 全文检索功能开关(取值:off/on),默认是off,开启是on + fullTextSearch: {{ .Values.common.es.fullTextSearch | quote }} + #elasticsearch服务监听url,默认是[http://127.0.0.1:9200](http://127.0.0.1:9200/) + url: {{ include "cmdb.elasticsearch.urlAndPort" . | quote }} + # es 认证使用 + #用户 + usr: {{ .Values.common.es.usr }} + #密码 + pwd: {{ .Values.common.es.pwd }} + # esb配置 + esb: + addr: {{ .Values.bkComponentApiUrl }} + appCode: {{ .Values.common.esb.appCode }} + appSecret: {{ .Values.common.esb.appSecret }} + insecureSkipVerify: true + certFile: + keyFile: + caFile: + password: + # web_server专属配置 + webServer: + api: + version: v3 + #会话相关 + session: + #会话名 + name: {{ .Values.common.webServer.session.name }} + skip: "0" + #是否支持同时登录同一用户,0为不支持,1为支持 + multipleOwner: {{ .Values.common.webServer.session.multipleOwner }} + #账号密码,以 : 分割 + userInfo: {{ .Values.common.webServer.session.userInfo }} + site: + #该值表示部署完成后,输入到浏览器中访问的cmdb 网址 + domainUrl: {{ .Values.common.webServer.site.domainUrl }} + httpsDomainUrl: {{ .Values.common.webServer.site.httpsDomainUrl }} + #登录地址 + bkLoginUrl: {{ include "cmdb.webserver.bkLoginUrl" . }} + bkHttpsLoginUrl: {{ include "cmdb.webserver.bkHttpsLoginUrl" . }} + appCode: {{ .Values.common.webServer.site.appCode }} + checkUrl: {{ .Values.bkLoginApiUrl }}/accounts/get_user/?bk_token= + resourcesPath: {{ .Values.common.webServer.site.resourcesPath }} + #前端基础页面位置 + htmlRoot: {{ .Values.common.webServer.site.htmlRoot }} + authscheme: {{ .Values.common.webServer.site.authScheme }} + bkDesktopUrl: {{ include "cmdb.webserver.bk_desktop_url" . }} + paasDomainUrl: {{ include "cmdb.webserver.paas_domain_url" . }} + #帮助文档地址 + helpDocUrl: {{ .Values.common.webServer.site.helpDocUrl }} + paas: + # pass的tls相关配置 + tls: + # 客户端是否验证服务端证书,包含证书链和主机名,bool值, true为不校验, false为校验 + insecureSkipVerify: {{ .Values.common.paas.tls.insecureSkipVerify }} + # 服务使用的证书的路径,如:/data/cmdb/cert/server.crt + certFile: {{ .Values.common.paas.tls.certFile }} + # 服务使用的证书对应的密钥的路径,如:/data/cmdb/cert/server.key + keyFile: {{ .Values.common.paas.tls.keyFile }} + # CA证书的路径,用于验证对方证书,如:/data/cmdb/cert/ca.crt + caFile: {{ .Values.common.paas.tls.caFile }} + # 用于解密根据RFC1423加密的证书密钥的PEM块 + password: {{ .Values.common.paas.tls.password }} + app: + authAppCode: {{ .Values.common.webServer.app.authAppCode }} + authUrl: {{ .Values.common.webServer.app.authUrl }} + agentAppUrl: {{ .Values.bkNodemanUrl }} + #权限模式,web页面使用,可选值: internal, iam + authscheme: {{ .Values.common.webServer.app.authScheme }} + login: + # 使用的登录系统, skip-login 免登陆模式, blueking 默认登录模式, 使用蓝鲸登录, oa 使用公司oa进行登陆 + version: {{ .Values.common.webServer.login.version }} + # operation_server专属配置 + operationServer: + timer: + #00:00-23:59,operation_server从配置文件读取的时间,默认是为00:30 + #定时同步的时间点 + # 00:00 - 23:59 + spec: {{ .Values.common.operationServer.timer.spec }} + # 禁用运营统计数据统计功能,默认false,如果设置为true,将无法查看定时统计的主机、模型实例等的变化数据 + disableOperationStatistic: {{ .Values.common.operationServer.disableStatistic }} + #auth_server专属配置 + authServer: + #蓝鲸权限中心地址,可配置多个,用,(逗号)分割 + address: {{ .Values.bkIamApiUrl }} + #cmdb项目在蓝鲸权限中心的应用编码 + appCode: {{ .Values.common.auth.appCode }} + #cmdb项目在蓝鲸权限中心的应用密钥 + appSecret: {{ .Values.common.auth.appSecret }} + #开发商ID + supplierID: {{ .Values.common.authServer.supplierID }} + authCenter: + # 权限中心tls配置 + tls: + # 客户端是否验证服务端证书,包含证书链和主机名,bool值, true为不校验, false为校验 + insecureSkipVerify: {{ .Values.common.auth.tls.insecureSkipVerify }} + # 服务使用的证书的路径,如:/data/cmdb/cert/server.crt + certFile: {{ .Values.common.auth.tls.certFile }} + # 服务使用的证书对应的密钥的路径,如:/data/cmdb/cert/server.key + keyFile: {{ .Values.common.auth.tls.keyFile }} + # CA证书路径,用于验证对方证书,如:/data/cmdb/cert/ca.crt + caFile: {{ .Values.common.auth.tls.caFile }} + # 用于解密根据RFC1423加密的证书密钥的PEM块 + password: {{ .Values.common.auth.tls.password }} + #cloudServer专属配置 + cloudServer: + # 加密服务使用 + cryptor: + enableCryptor: {{ .Values.common.cloudServer.cryptor.enableCryptor }} + # 访问密码服务来获取密钥的URL,格式如/api/v1/secrets/cloud_account + secretKeyUrl: {{ .Values.common.cloudServer.cryptor.secretKeyUrl }} + # 密钥服务的地址,必须以http://或者https://开头 + secretsAddrs: {{ .Values.common.cloudServer.cryptor.secretsAddrs }} + # 密码服务的权限凭证Token + secretsToken: {{ .Values.common.cloudServer.cryptor.secretsToken }} + # 密码服务的项目名称 + secretsProject: {{ .Values.common.cloudServer.cryptor.secretsProject }} + # 密码服务的环境名称 + secretsEnv: {{ .Values.common.cloudServer.cryptor.secretsEnv }} + syncTask: + # 同步周期,最小为5分钟 + syncPeriodMinutes: {{ .Values.common.cloudServer.syncTask.syncPeriodMinutes }} + + #datacollection专属配置 + datacollection: + hostsnap: + # 主机静态数据采集模式,将数据导入kafka或者redis,可选值是 kafka、redis,默认值为redis(仅用于新插件bkmonitorbeat) + reportMode: {{ .Values.common.datacollection.hostSnapshot.reportMode }} + # 当主机快照数据属性,如cpu,bk_cpu_mhz,bk_disk,bk_mem这些数值型数据变动的范围大于该配置的值时,进行db数据的更新,默认值为10%,最小值为5%,以百分比为单位 + changeRangePercent: {{ .Values.common.datacollection.hostSnapshot.changeRangePercent}} + # 用于设置主机快照key在redis中的过期时间,该时间会有上下50%的波动,当key存在时,同一id的主机数据不会更新,默认值为10分钟,最小值为5分钟,以分钟为单位 + changeCountExpireMinute: {{ .Values.common.datacollection.hostSnapshot.changeCountExpireMinute}} + # 用于设置单个服务主机快照处理请求能力,起到限流的作用,令牌桶配置,最多请求数通过burst设置。qps的默认值为40,burst的默认值为100 + rateLimiter: + qps: {{ .Values.common.datacollection.hostSnapshot.rateLimiter.qps }} + burst: {{ .Values.common.datacollection.hostSnapshot.rateLimiter.burst }} + # 主机快照属性,如cpu,bk_cpu_mhz,bk_disk,bk_mem等数据的处理时间窗口,用于限制在指定周期的前多少分钟可以让请求通过,超过限定时间将不会处理请求。 + # 它的下一级有三个参数,atTime,checkIntervalHours,windowMinute 当不配置windowMinute,窗口不生效。当配置了windowMinute,至少配置atTime + # 或者checkIntervalHours中的一个,否则不生效。当atTime和checkIntervalHours都配置时,取atTime这个配置的语义功能 + # 如果窗口生效,启动的时候,会先跑完windowMinutes,然后再生效。 + timeWindow: + # atTime,设置一天中,几点开启时间窗口,如配置成14:40,表示14:40开启窗口,如果配置格式不正确,默认值为1:00 + atTime: {{ .Values.common.datacollection.hostSnapshot.timeWindow.atTime }} + # checkIntervalHours,规定每隔几个小时窗口开启,单位为小时,如配置成 3,表示每隔3个小时,开启时间窗口,如果配置格式不正确,默认值为 1 + checkIntervalHours: {{ .Values.common.datacollection.hostSnapshot.timeWindow.checkIntervalHours }} + # windowMinutes,代表开启时间窗口后,多长时间内请求可以通过,单位为分钟。如配置成 60,表示开启窗口时间60分钟内请求可以通过。 + # 注意:该时间不能大于窗口每次开启的间隔时间,取值范围不能小于等于0,如果配置不正确,默认值为15 + windowMinutes: {{ .Values.common.datacollection.hostSnapshot.timeWindow.windowMinutes }} + + # 监控配置, monitor配置项必须存在 + monitor: + # 监控插件名称,有noop,blueking, 不填时默认为noop + pluginName: {{ .Values.common.monitor.pluginName }} + # 是否开启监控 + enableMonitor: {{ .Values.common.monitor.enabled }} + # 当使用blueking监控插件时,上报数据所需要的数据通道标识,如1500000 + dataID: {{ .Values.common.monitor.dataId }} + # 采集数据后能够缓存的队列长度,设置范围为1~1000, 默认为100 + queueSize: {{ .Values.common.monitor.queueSize }} + # 采集数据用的gsecmdline命令绝对路径,默认版本需要大于等于2.0.2 ,默认路径:/usr/local/gse/plugins/bin/gsecmdline + gsecmdlinePath: {{ .Values.common.monitor.gsecmdlinePath }} + # 对应的domainsocket绝对路径,默认路径:/usr/local/gse/agent/data/ipc.state.report + domainSocketPath: {{ .Values.common.monitor.domainSocketPath }} + # 用于对数据上报进行频率控制和限流 + # qps的设置范围为1~50,默认值为10 + # burst的设置范围为1~100,默认值为20 + rateLimiter: + qps: {{ .Values.common.monitor.rateLimiter.qps }} + burst: {{ .Values.common.monitor.rateLimiter.burst }} + # cacheService相关配置 + cacheService: + # 业务简要拓扑缓存的定时刷新时间,默认为15分钟,最小为2分钟。每次会将所有的业务的拓扑刷新一次到缓存中 + briefTopologySyncIntervalMinutes: {{ .Values.common.cacheService.briefTopologySyncIntervalMinutes }} + + # 日志平台openTelemetry跟踪链接入相关配置 + openTelemetry: + # 表示是否开启日志平台openTelemetry跟踪链接入相关功能,布尔值, 默认值为false不开启 + enable: {{ .Values.common.openTelemetry.enable }} + # 日志平台openTelemetry跟踪链功能的自定义上报服务地址 + endpoint: {{ .Values.common.openTelemetry.endpoint }} + # 日志平台openTelemetry跟踪链功能的上报data_id + bkDataID: {{ .Values.common.openTelemetry.bkDataID }} + # 连接日志平台tls配置 + tls: + # 客户端是否验证服务端证书,包含证书链和主机名,bool值, true为不校验, false为校验 + insecureSkipVerify: {{ .Values.common.openTelemetry.tls.insecureSkipVerify }} + # 服务使用的证书的路径,如:/data/cmdb/cert/server.crt + certFile: {{ .Values.common.openTelemetry.tls.certFile }} + # 服务使用的证书对应的密钥的路径,如:/data/cmdb/cert/server.key + keyFile: {{ .Values.common.openTelemetry.tls.keyFile }} + # CA证书的路径,用于验证对方证书,如:/data/cmdb/cert/ca.crt + caFile: {{ .Values.common.openTelemetry.tls.caFile }} + # 用于解密根据RFC1423加密的证书密钥的PEM块 + password: {{ .Values.common.openTelemetry.tls.password }} + + # eventServer相关配置 + eventServer: + # 下发主机身份相关配置 + hostIdentifier: + # 是否开始下发主机身份功能, 有两个值,true和false,当处于true时,开启下发主机身份功能,false时,关闭该功能 + startUp: {{ .Values.common.eventServer.hostIdentifier.startUp }} + # 每隔多少个小时进行一次全量主机身份批量的同步操作,整数值,单位为小时,注:刚启动服务时,会等一个周期后再进行全量同步操作 + batchSyncIntervalHours: {{ .Values.common.eventServer.hostIdentifier.batchSyncIntervalHours }} + # 用于设置推送主机身份请求gse的taskServer能力,起到限流的作用。qps的默认值为200, 代表每秒最多推送的主机数量,burst的默认值为200 + rateLimiter: + qps: {{ .Values.common.eventServer.hostIdentifier.rateLimiter.qps }} + burst: {{ .Values.common.eventServer.hostIdentifier.rateLimiter.burst }} + # 下发主机身份文件名 + fileName: {{ .Values.common.eventServer.hostIdentifier.fileName }} + # 当下发主机为linux操作系统时,相关配置 + linux: + # 下发主机身份文件路径 + filePath: {{ .Values.common.eventServer.hostIdentifier.linux.filePath }} + # 下发主机身份文件所有者 + fileOwner: {{ .Values.common.eventServer.hostIdentifier.linux.fileOwner }} + # 下发主机身份文件权限值 + filePrivilege: {{ .Values.common.eventServer.hostIdentifier.linux.filePrivilege }} + # 当下发主机为windows操作系统时,相关配置 + windows: + # 下发主机身份文件路径 + filePath: {{ .Values.common.eventServer.hostIdentifier.windows.filePath }} + # 下发主机身份文件所有者 + fileOwner: {{ .Values.common.eventServer.hostIdentifier.windows.fileOwner }} + # 下发主机身份文件权限值 + filePrivilege: {{ .Values.common.eventServer.hostIdentifier.windows.filePrivilege }} + + # 直接调用gse服务相关配置 + gse: + # 调用gse的apiServer服务时相关配置 + apiServer: + # 此配置为数组类型,可配置连接gse的apiServer的多个host:port格式的值,去建立连接 + endpoints: + {{- range $endpoint := .Values.common.gse.apiServer.endpoints }} + - {{ $endpoint }} + {{- end }} + # 证书相关信息 + insecureSkipVerify: {{ .Values.common.gse.apiServer.insecureSkipVerify }} + certFile: {{ .Values.certPath }}/{{ .Values.common.gse.apiServer.certFile }} + keyFile: {{ .Values.certPath }}/{{ .Values.common.gse.apiServer.keyFile }} + caFile: {{ .Values.certPath }}/{{ .Values.common.gse.apiServer.caFile }} + password: {{ .Values.common.gse.apiServer.password }} + # 调用gse的taskServer服务时相关配置 + taskServer: + # 此配置为数组类型,可配置连接gse的taskServer的多个host:port格式的值,去建立连接 + endpoints: + {{- range $endpoint := .Values.common.gse.taskServer.endpoints }} + - {{ $endpoint }} + {{- end }} + # 证书相关信息 + insecureSkipVerify: {{ .Values.common.gse.taskServer.insecureSkipVerify }} + certFile: {{ .Values.certPath }}/{{ .Values.common.gse.taskServer.certFile }} + keyFile: {{ .Values.certPath }}/{{ .Values.common.gse.taskServer.keyFile }} + caFile: {{ .Values.certPath }}/{{ .Values.common.gse.taskServer.caFile }} + password: {{ .Values.common.gse.taskServer.password }} + + # 当主机静态数据采集模式为kafka时,datacollection处理插件bkmonitorbeat采集上来的主机静态数据,选择kafka作为数据导入组件时的相关配置 + kafka: + snap: + brokers: + {{- range $broker := .Values.common.kafka.brokers }} + - {{ $broker }} + {{- end }} + # groupID为固定值,请勿随便修改,修改后会导致重复消费过去的数据 + groupID: {{ .Values.common.kafka.groupID }} + # partition数量固定为1,保证消息的顺序性 + partition: {{ .Values.common.kafka.partition }} + # 安全协议SASL_PLAINTEXT,SASL机制SCRAM-SHA-512的账号、密码信息 + user: {{ .Values.common.kafka.user }} + password: {{ .Values.common.kafka.password }} + + # cmdb服务tls配置 + tls: + # 客户端是否验证服务端证书,包含证书链和主机名,bool值, true为不校验, false为校验 + insecureSkipVerify: {{ .Values.common.tls.insecureSkipVerify }} + # 服务使用的证书的路径,如:/data/cmdb/cert/server.crt + certFile: {{ .Values.common.tls.certFile }} + # 服务使用的证书对应的密钥的路径,如:/data/cmdb/cert/server.key + keyFile: {{ .Values.common.tls.keyFile }} + # CA证书的路径,用于验证对方证书,,如:/data/cmdb/cert/ca.crt + caFile: {{ .Values.common.tls.caFile }} + # 用于解密根据RFC1423加密的证书密钥的PEM块 + password: {{ .Values.common.tls.password }} + + extra.yaml: |- + + + migrate.yaml: |- + configServer: + addrs: {{ include "cmdb.configAndServiceCenter.addr" . | quote }} + usr: + pwd: + + registerServer: + addrs: {{ include "cmdb.configAndServiceCenter.addr" . | quote }} + usr: + pwd: + + confs: + dir: {{ .Values.adminserver.configDir }} + + errors: + res: {{ .Values.adminserver.errors }} + + language: + res: {{ .Values.adminserver.language }} + + hostsnap: + dataID: 1100010 + + mongodb.yaml: |- + mongodb: + host: {{ include "cmdb.mongodb.addr" . | quote }} + usr: {{ include "cmdb.mongodb.usr" . | quote }} + pwd: {{ include "cmdb.mongodb.pwd" . | quote }} + database: {{ .Values.mongodb.externalMongodb.database }} + maxOpenConns: {{ .Values.mongodb.externalMongodb.maxOpenConns }} + maxIdleConns: {{ .Values.mongodb.externalMongodb.maxIdleConns }} + + mechanism: {{ .Values.mongodb.externalMongodb.mechanism }} + rsName: {{ .Values.mongodb.externalMongodb.rsName }} + #mongo的socket连接的超时时间,以秒为单位,默认10s,最小5s,最大30s。 + socketTimeoutSeconds: {{ .Values.mongodb.externalMongodb.socketTimeoutSeconds }} + enable: {{ .Values.mongodb.externalMongodb.enabled }} + + watch: + host: {{ include "cmdb.mongodb.watch.addr" . | quote }} + usr: {{ include "cmdb.mongodb.watch.usr" . | quote }} + pwd: {{ include "cmdb.mongodb.watch.pwd" . | quote }} + database: {{ .Values.mongodb.watch.database }} + maxOpenConns: {{ .Values.mongodb.watch.maxOpenConns }} + maxIdleConns: {{ .Values.mongodb.watch.maxIdleConns }} + mechanism: {{ .Values.mongodb.watch.mechanism }} + rsName: {{ .Values.mongodb.watch.rsName }} + socketTimeoutSeconds: {{ .Values.mongodb.watch.socketTimeoutSeconds }} + + redis.yaml: |- + redis: + host: {{ include "cmdb.redis.host" . | quote }} + pwd: {{ include "cmdb.redis.pwd" . | quote }} + database: {{ .Values.redis.redis.database }} + maxOpenConns: {{ .Values.redis.redis.maxOpenConns }} + maxIdleConns: {{ .Values.redis.redis.maxIdleConns }} + sentinelPwd: {{ .Values.redis.redis.sentinelPwd }} + masterName: {{ .Values.redis.redis.masterName }} + snap: + host: {{ include "cmdb.redis.snap.host" . | quote }} + pwd: {{ include "cmdb.redis.snap.pwd" . | quote }} + database: {{ .Values.redis.snapshotRedis.database }} + maxOpenConns: {{ .Values.redis.snapshotRedis.maxOpenConns }} + maxIdleConns: {{ .Values.redis.snapshotRedis.maxIdleConns }} + sentinelPwd: {{ .Values.redis.snapshotRedis.sentinelPwd }} + masterName: {{ .Values.redis.snapshotRedis.masterName }} + discover: + host: {{ include "cmdb.redis.discover.host" . | quote }} + pwd: {{ include "cmdb.redis.discover.pwd" . | quote }} + database: {{ .Values.redis.discoverRedis.database }} + maxOpenConns: {{ .Values.redis.discoverRedis.maxOpenConns }} + maxIdleConns: {{ .Values.redis.discoverRedis.maxIdleConns }} + sentinelPwd: {{ .Values.redis.discoverRedis.sentinelPwd }} + masterName: {{ .Values.redis.discoverRedis.masterName }} + netcollect: + host: {{ include "cmdb.redis.netcollect.host" . | quote }} + pwd: {{ include "cmdb.redis.netcollect.pwd" . | quote }} + database: {{ .Values.redis.netCollectRedis.database }} + maxOpenConns: {{ .Values.redis.netCollectRedis.maxOpenConns }} + maxIdleConns: {{ .Values.redis.netCollectRedis.maxIdleConns }} + sentinelPwd: {{ .Values.redis.netCollectRedis.sentinelPwd }} + masterName: {{ .Values.redis.netCollectRedis.masterName }} \ No newline at end of file diff --git a/docs/support-file/helm/templates/apiserver/apiserver-dpl.yaml b/docs/support-file/helm/templates/apiserver/apiserver-dpl.yaml new file mode 100644 index 0000000000..856ce3ffbf --- /dev/null +++ b/docs/support-file/helm/templates/apiserver/apiserver-dpl.yaml @@ -0,0 +1,101 @@ +{{- if .Values.apiserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-apiserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: apiserver +spec: + replicas: {{ .Values.apiserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: apiserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + component: apiserver + {{- with .Values.apiserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.apiserver.podAnnotations }} + {{ toYaml .Values.apiserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: apiserver + image: {{ .Values.image.registry }}/{{ .Values.apiserver.image.repository }}:v{{ default .Chart.AppVersion .Values.apiserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.apiserver.workDir }} + command: + - ./cmdb_apiserver + - --addrport=$(POD_IP):{{ .Values.apiserver.port }} + {{- if .Values.apiserver.configDir }} + - --config={{ .Values.apiserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.apiserver.command.logDir }} + - --log-dir={{ .Values.apiserver.command.logDir }} + {{- end }} + - --v={{ .Values.apiserver.command.logLevel }} + - --logtostderr={{ .Values.apiserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.apiserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.apiserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.apiserver.resources }} + resources: {{ toYaml .Values.apiserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.apiserver.env -}} + {{ toYaml .Values.apiserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.apiserver.port }} + + {{- if .Values.apiserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.apiserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-apiserver-configures + {{- end }} + + {{- with .Values.apiserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.apiserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.apiserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} +{{- end }} diff --git a/docs/support-file/helm/templates/apiserver/apiserver-svc.yaml b/docs/support-file/helm/templates/apiserver/apiserver-svc.yaml new file mode 100644 index 0000000000..25315401f8 --- /dev/null +++ b/docs/support-file/helm/templates/apiserver/apiserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.apiserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.apiserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.apiserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: apiserver +{{- end }} diff --git a/docs/support-file/helm/templates/authserver/authserver-dpl.yaml b/docs/support-file/helm/templates/authserver/authserver-dpl.yaml new file mode 100644 index 0000000000..0fe7dddf78 --- /dev/null +++ b/docs/support-file/helm/templates/authserver/authserver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.authserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-authserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: authserver +spec: + replicas: {{ .Values.authserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: authserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + component: authserver + {{- with .Values.authserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.authserver.podAnnotations }} + {{ toYaml .Values.authserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: authserver + image: {{ .Values.image.registry }}/{{ .Values.authserver.image.repository }}:v{{ default .Chart.AppVersion .Values.authserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.authserver.workDir }} + command: + - ./cmdb_authserver + - --addrport=$(POD_IP):{{ .Values.authserver.port }} + {{- if .Values.authserver.configDir }} + - --config={{ .Values.authserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.authserver.command.logDir }} + - --log-dir={{ .Values.authserver.command.logDir }} + {{- end }} + - --v={{ .Values.authserver.command.logLevel }} + - --logtostderr={{ .Values.authserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.authserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.authserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.authserver.resources }} + resources: {{ toYaml .Values.authserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.authserver.env -}} + {{ toYaml .Values.authserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.authserver.port }} + + {{- if .Values.authserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.authserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-authserver-configures + {{- end }} + + {{- with .Values.authserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.authserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.authserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/authserver/authserver-svc.yaml b/docs/support-file/helm/templates/authserver/authserver-svc.yaml new file mode 100644 index 0000000000..a21d88c96a --- /dev/null +++ b/docs/support-file/helm/templates/authserver/authserver-svc.yaml @@ -0,0 +1,17 @@ +{{- if .Values.authserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.authserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + type: {{ .Values.authserver.service.type }} + ports: + {{- with .Values.authserver.service.ports }} + {{- toYaml . | nindent 4 }} + {{- end }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: authserver +{{- end }} diff --git a/docs/support-file/helm/templates/authserver/ingress.yaml b/docs/support-file/helm/templates/authserver/ingress.yaml new file mode 100644 index 0000000000..58c3d9ecf8 --- /dev/null +++ b/docs/support-file/helm/templates/authserver/ingress.yaml @@ -0,0 +1,27 @@ +{{- if .Values.authserver.ingress.enabled -}} +{{- $serviceName := include "bk-cmdb.authserver" . -}} +{{- $servicePort := .Values.authserver.service.externalPort -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "bk-cmdb.authserver" . }} + labels: +{{ include "common.labels.standard" . | indent 4 }} + annotations: + {{- range $key, $value := .Values.authserver.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + rules: + - host: {{ .Values.authserver.ingress.host }} + http: + paths: + - path: / + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- if .Values.authserver.ingress.tls }} + tls: +{{ toYaml .Values.authserver.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/docs/support-file/helm/templates/bklogconfig.yaml b/docs/support-file/helm/templates/bklogconfig.yaml new file mode 100644 index 0000000000..94a92ea3ed --- /dev/null +++ b/docs/support-file/helm/templates/bklogconfig.yaml @@ -0,0 +1,34 @@ +{{- if .Values.bkLogConfig.file.enabled }} +apiVersion: bk.tencent.com/v1alpha1 +kind: BkLogConfig +metadata: + name: bk-cmdb-file-log-config +spec: + dataId: {{ .Values.bkLogConfig.file.dataId }} + extMeta: + logSourceType: "file" + logConfigType: container_log_config + namespace: {{ .Release.Namespace }} + labelSelector: + matchLabels: + app.kubernetes.io/name: bk-cmdb + encoding: 'utf-8' + path: + - /data/cmdb/cmdb_*/logs/* +{{- end }} +{{- if .Values.bkLogConfig.std.enabled }} +--- +apiVersion: bk.tencent.com/v1alpha1 +kind: BkLogConfig +metadata: + name: bk-cmdb-std-log-config +spec: + dataId: {{ .Values.bkLogConfig.std.dataId }} + extMeta: + logSourceType: "std" + logConfigType: std_log_config + namespace: {{ .Release.Namespace }} + labelSelector: + matchLabels: + app.kubernetes.io/name: bk-cmdb +{{- end }} diff --git a/docs/support-file/helm/templates/cacheservice/cacheservice-dpl.yaml b/docs/support-file/helm/templates/cacheservice/cacheservice-dpl.yaml new file mode 100644 index 0000000000..6c0645f031 --- /dev/null +++ b/docs/support-file/helm/templates/cacheservice/cacheservice-dpl.yaml @@ -0,0 +1,100 @@ +{{- if .Values.cacheservice.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-cacheservice" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: cacheservice +spec: + replicas: {{ .Values.cacheservice.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: cacheservice + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: cacheservice + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.cacheservice.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.cacheservice.podAnnotations }} + {{ toYaml .Values.cacheservice.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: cacheservice + image: {{ .Values.image.registry }}/{{ .Values.cacheservice.image.repository }}:v{{ default .Chart.AppVersion .Values.cacheservice.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.cacheservice.workDir }} + command: + - ./cmdb_cacheservice + - --addrport=$(POD_IP):{{ .Values.cacheservice.port }} + {{- if .Values.cacheservice.configDir }} + - --config={{ .Values.cacheservice.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.cacheservice.command.logDir }} + - --log-dir={{ .Values.cacheservice.command.logDir }} + {{- end }} + - --v={{ .Values.cacheservice.command.logLevel }} + - --logtostderr={{ .Values.cacheservice.command.logToStdErr }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.cacheservice.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.cacheservice.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.cacheservice.resources }} + resources: {{ toYaml .Values.cacheservice.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.cacheservice.env -}} + {{ toYaml .Values.cacheservice.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.cacheservice.port }} + + {{- if .Values.cacheservice.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.cacheservice.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-cacheservice-configures + {{- end }} + + {{- with .Values.cacheservice.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.cacheservice.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.cacheservice.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/cacheservice/cacheservice-svc.yaml b/docs/support-file/helm/templates/cacheservice/cacheservice-svc.yaml new file mode 100644 index 0000000000..e6a1e7b8c0 --- /dev/null +++ b/docs/support-file/helm/templates/cacheservice/cacheservice-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.cacheservice.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.cacheservice" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.cacheservice.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: cacheservice +{{- end }} diff --git a/docs/support-file/helm/templates/cert-configmap.yaml b/docs/support-file/helm/templates/cert-configmap.yaml new file mode 100644 index 0000000000..9d2edfb36d --- /dev/null +++ b/docs/support-file/helm/templates/cert-configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "bk-cmdb.fullname" . }}-certs +data: + gseca.crt: {{ .Values.gseCert.ca | b64dec | quote }} + cmdb.cert: {{ .Values.gseCert.cmdbCert | b64dec | quote }} + cmdb.key: {{ .Values.gseCert.cmdbKey | b64dec | quote }} diff --git a/docs/support-file/helm/templates/cloudserver/cloudserver-dpl.yaml b/docs/support-file/helm/templates/cloudserver/cloudserver-dpl.yaml new file mode 100644 index 0000000000..311c86d6e2 --- /dev/null +++ b/docs/support-file/helm/templates/cloudserver/cloudserver-dpl.yaml @@ -0,0 +1,103 @@ +{{- if .Values.cloudserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-cloudserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: cloudserver +spec: + replicas: {{ .Values.cloudserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: cloudserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: cloudserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.cloudserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.cloudserver.podAnnotations }} + {{ toYaml .Values.cloudserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: cloudserver + image: {{ .Values.image.registry }}/{{ .Values.cloudserver.image.repository }}:v{{ default .Chart.AppVersion .Values.cloudserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.cloudserver.workDir }} + command: + - ./cmdb_cloudserver + - --addrport=$(POD_IP):{{ .Values.cloudserver.port }} + {{- if .Values.cloudserver.configDir }} + - --config={{ .Values.cloudserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + - --enable_cryptor={{ .Values.cloudserver.command.enableCryptor }} + {{- if .Values.cloudserver.command.logDir }} + - --log-dir={{ .Values.cloudserver.command.logDir }} + {{- end }} + - --v={{ .Values.cloudserver.command.logLevel }} + - --logtostderr={{ .Values.cloudserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.cloudserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.cloudserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.cloudserver.resources }} + resources: {{ toYaml .Values.cloudserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.cloudserver.env -}} + {{ toYaml .Values.cloudserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.cloudserver.port }} + + {{- if .Values.cloudserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.cloudserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-cloudserver-configures + {{- end }} + + {{- with .Values.cloudserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.cloudserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.cloudserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/cloudserver/cloudserver-svc.yaml b/docs/support-file/helm/templates/cloudserver/cloudserver-svc.yaml new file mode 100644 index 0000000000..515f1aa585 --- /dev/null +++ b/docs/support-file/helm/templates/cloudserver/cloudserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.cloudserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.cloudserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.cloudserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: cloudserver +{{- end }} diff --git a/docs/support-file/helm/templates/coreservice/coreservice-dpl.yaml b/docs/support-file/helm/templates/coreservice/coreservice-dpl.yaml new file mode 100644 index 0000000000..9cdcb53d81 --- /dev/null +++ b/docs/support-file/helm/templates/coreservice/coreservice-dpl.yaml @@ -0,0 +1,100 @@ +{{- if .Values.coreservice.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-coreservice" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: coreservice +spec: + replicas: {{ .Values.coreservice.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: coreservice + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: coreservice + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.coreservice.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.coreservice.podAnnotations }} + {{ toYaml .Values.coreservice.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: coreservice + image: {{ .Values.image.registry }}/{{ .Values.coreservice.image.repository }}:v{{ default .Chart.AppVersion .Values.coreservice.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.coreservice.workDir }} + command: ["./cmdb_coreservice"] + args: + - --addrport=$(POD_IP):{{ .Values.coreservice.port }} + {{- if .Values.coreservice.configDir }} + - --config={{ .Values.coreservice.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.coreservice.command.logDir }} + - --log-dir={{ .Values.coreservice.command.logDir }} + {{- end }} + - --v={{ .Values.coreservice.command.logLevel }} + - --logtostderr={{ .Values.coreservice.command.logToStdErr }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.coreservice.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.coreservice.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.coreservice.resources }} + resources: {{ toYaml .Values.coreservice.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.coreservice.env -}} + {{ toYaml .Values.coreservice.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.coreservice.port }} + + {{- if .Values.coreservice.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.coreservice.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-coreservice-configures + {{- end }} + + {{- with .Values.coreservice.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.coreservice.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.coreservice.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/coreservice/coreservice-svc.yaml b/docs/support-file/helm/templates/coreservice/coreservice-svc.yaml new file mode 100644 index 0000000000..589c56861d --- /dev/null +++ b/docs/support-file/helm/templates/coreservice/coreservice-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.coreservice.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.coreservice" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.coreservice.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: coreservice +{{- end }} diff --git a/docs/support-file/helm/templates/datacollection/datacollection-dpl.yaml b/docs/support-file/helm/templates/datacollection/datacollection-dpl.yaml new file mode 100644 index 0000000000..6b75d37f30 --- /dev/null +++ b/docs/support-file/helm/templates/datacollection/datacollection-dpl.yaml @@ -0,0 +1,101 @@ +{{- if .Values.datacollection.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-datacollection" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: datacollection +spec: + replicas: {{ .Values.datacollection.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: datacollection + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: datacollection + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.datacollection.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.datacollection.podAnnotations }} + {{ toYaml .Values.datacollection.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: datacollection + image: {{ .Values.image.registry }}/{{ .Values.datacollection.image.repository }}:v{{ default .Chart.AppVersion .Values.datacollection.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.datacollection.workDir }} + command: + - ./cmdb_datacollection + - --addrport=$(POD_IP):{{ .Values.datacollection.port }} + {{- if .Values.datacollection.configDir }} + - --config={{ .Values.datacollection.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.datacollection.command.logDir }} + - --log-dir={{ .Values.datacollection.command.logDir }} + {{- end }} + - --v={{ .Values.datacollection.command.logLevel }} + - --logtostderr={{ .Values.datacollection.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.datacollection.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.datacollection.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.datacollection.resources }} + resources: {{ toYaml .Values.datacollection.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.datacollection.env -}} + {{ toYaml .Values.datacollection.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.datacollection.port }} + {{- if .Values.datacollection.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.datacollection.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-datacollection-configures + {{- end }} + + {{- with .Values.datacollection.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.datacollection.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.datacollection.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/datacollection/datacollection-svc.yaml b/docs/support-file/helm/templates/datacollection/datacollection-svc.yaml new file mode 100644 index 0000000000..8d4704e9a1 --- /dev/null +++ b/docs/support-file/helm/templates/datacollection/datacollection-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.datacollection.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.datacollection" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.datacollection.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: datacollection +{{- end }} diff --git a/docs/support-file/helm/templates/eventserver/eventserver-dpl.yaml b/docs/support-file/helm/templates/eventserver/eventserver-dpl.yaml new file mode 100644 index 0000000000..0e7ff5483a --- /dev/null +++ b/docs/support-file/helm/templates/eventserver/eventserver-dpl.yaml @@ -0,0 +1,111 @@ +{{- if .Values.eventserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-eventserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: eventserver +spec: + replicas: {{ .Values.eventserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: eventserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: eventserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.eventserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.eventserver.podAnnotations }} + {{ toYaml .Values.eventserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: eventserver + image: {{ .Values.image.registry }}/{{ .Values.eventserver.image.repository }}:v{{ default .Chart.AppVersion .Values.eventserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.eventserver.workDir }} + command: + - ./cmdb_eventserver + - --addrport=$(POD_IP):{{ .Values.eventserver.port }} + {{- if .Values.eventserver.configDir }} + - --config={{ .Values.eventserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.eventserver.command.logDir }} + - --log-dir={{ .Values.eventserver.command.logDir }} + {{- end }} + - --v={{ .Values.eventserver.command.logLevel }} + - --logtostderr={{ .Values.eventserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.eventserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.eventserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.eventserver.resources }} + resources: {{ toYaml .Values.eventserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.eventserver.env }} + {{ toYaml .Values.eventserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.eventserver.port }} + + volumeMounts: + - name: cert + mountPath: {{ .Values.certPath }} + {{- if .Values.eventserver.configDir }} + - name: configures + mountPath: {{ .Values.eventserver.configDir }} + {{- end }} + + volumes: + - name: cert + configMap: + name: {{ template "bk-cmdb.fullname" . }}-certs + {{- if .Values.eventserver.configDir }} + - name: configures + configMap: + name: {{ .Release.Name }}-eventserver-configures + {{- end }} + + {{- with .Values.eventserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.eventserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.eventserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/eventserver/eventserver-svc.yaml b/docs/support-file/helm/templates/eventserver/eventserver-svc.yaml new file mode 100644 index 0000000000..957741e890 --- /dev/null +++ b/docs/support-file/helm/templates/eventserver/eventserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.eventserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.eventserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.eventserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: eventserver +{{- end }} diff --git a/docs/support-file/helm/templates/hostserver/hostserver-dpl.yaml b/docs/support-file/helm/templates/hostserver/hostserver-dpl.yaml new file mode 100644 index 0000000000..2643877b7e --- /dev/null +++ b/docs/support-file/helm/templates/hostserver/hostserver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.hostserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-hostserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: hostserver +spec: + replicas: {{ .Values.hostserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: hostserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: hostserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.hostserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.hostserver.podAnnotations }} + {{ toYaml .Values.hostserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: hostserver + image: {{ .Values.image.registry }}/{{ .Values.hostserver.image.repository }}:v{{ default .Chart.AppVersion .Values.hostserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.hostserver.workDir }} + command: ["./cmdb_hostserver"] + args: + - --addrport=$(POD_IP):{{ .Values.hostserver.port }} + {{- if .Values.hostserver.configDir }} + - --config={{ .Values.hostserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.hostserver.command.logDir }} + - --log-dir={{ .Values.hostserver.command.logDir }} + {{- end }} + - --v={{ .Values.hostserver.command.logLevel }} + - --logtostderr={{ .Values.hostserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.hostserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.hostserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.hostserver.resources }} + resources: {{ toYaml .Values.hostserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.hostserver.env -}} + {{ toYaml .Values.hostserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.hostserver.port }} + + {{- if .Values.hostserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.hostserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-hostserver-configures + {{- end }} + + {{- with .Values.hostserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.hostserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.hostserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/hostserver/hostserver-svc.yaml b/docs/support-file/helm/templates/hostserver/hostserver-svc.yaml new file mode 100644 index 0000000000..9e6cecb6d9 --- /dev/null +++ b/docs/support-file/helm/templates/hostserver/hostserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.hostserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.hostserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.hostserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: hostserver +{{- end }} diff --git a/docs/support-file/helm/templates/job/auth-job.yaml b/docs/support-file/helm/templates/job/auth-job.yaml new file mode 100644 index 0000000000..13c8fb028d --- /dev/null +++ b/docs/support-file/helm/templates/job/auth-job.yaml @@ -0,0 +1,43 @@ +{{- if .Values.iam.auth.enabled }} +{{- $ingressHost := .Values.authserver.ingress.host -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "bk-cmdb.fullname" . }}-auth-modelregister + labels: + app: {{ template "bk-cmdb.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-weight": "-4" + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + spec: + containers: + - name: cmdb-auth-modelregister + image: {{ template "cmdb.basicImagesAddress" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - sh + - "-c" + - | + /bin/bash <<'EOF' + res=$(curl -s -X POST \ + -H 'Content-Type:application/json' \ + -H 'BK_USER:migrate' \ + -H 'HTTP_BLUEKING_SUPPLIER_ID:0' \ + --data '{"host": "http://{{ $ingressHost }}"}' \ + "http://{{ template "bk-cmdb.adminserver" . }}/migrate/v3/authcenter/init" + ) + echo "$res" + if ! [[ $(echo "$res" | jq -r .result) = "true" ]]; then + echo "auth center migration failed." + exit 1 + fi + EOF + restartPolicy: OnFailure + backoffLimit: 20 +{{- end }} diff --git a/docs/support-file/helm/templates/job/bootstrap-job.yaml b/docs/support-file/helm/templates/job/bootstrap-job.yaml new file mode 100644 index 0000000000..85b74130ca --- /dev/null +++ b/docs/support-file/helm/templates/job/bootstrap-job.yaml @@ -0,0 +1,41 @@ +{{- if .Values.migrate.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "bk-cmdb.fullname" . }}-bootstrap + labels: + app: {{ template "bk-cmdb.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + spec: + containers: + - name: cmdb-migrate + image: {{ template "cmdb.basicImagesAddress" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - sh + - "-c" + - | + /bin/bash <<'EOF' + res=$(curl -s -X POST \ + -H 'Content-Type:application/json' \ + -H 'BK_USER:migrate' \ + -H 'HTTP_BLUEKING_SUPPLIER_ID:0' \ + "http://{{ template "bk-cmdb.adminserver" . }}:80/migrate/v3/migrate/community/0" + ) + echo "$res" + if ! [[ $(echo "$res" | jq -r .result) = "true" ]]; then + echo "migration failed." + exit 1 + fi + EOF + restartPolicy: OnFailure + backoffLimit: 20 +{{- end }} diff --git a/docs/support-file/helm/templates/job/migrateDataID-job.yaml b/docs/support-file/helm/templates/job/migrateDataID-job.yaml new file mode 100644 index 0000000000..46eaab75f5 --- /dev/null +++ b/docs/support-file/helm/templates/job/migrateDataID-job.yaml @@ -0,0 +1,41 @@ +{{- if .Values.migrate.migrateDataId }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "bk-cmdb.fullname" . }}-migratedataid + labels: + app: {{ template "bk-cmdb.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + annotations: + "helm.sh/hook": post-install, post-upgrade + "helm.sh/hook-weight": "-4" + "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation +spec: + template: + spec: + containers: + - name: cmdb-migratedataid + image: {{ template "cmdb.basicImagesAddress" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - sh + - "-c" + - | + /bin/bash <<'EOF' + res=$(curl -s -X POST \ + -H 'Content-Type:application/json' \ + -H 'BK_USER:migrate' \ + -H 'HTTP_BLUEKING_SUPPLIER_ID:0' \ + "http://{{ template "bk-cmdb.adminserver" . }}:80/migrate/v3/migrate/dataid" + ) + echo "$res" + if ! [[ $(echo "$res" | jq -r .result) = "true" ]]; then + echo "migrate data id to gse failed." + exit 1 + fi + EOF + restartPolicy: OnFailure + backoffLimit: 20 +{{- end }} diff --git a/docs/support-file/helm/templates/monstache/configmap.yaml b/docs/support-file/helm/templates/monstache/configmap.yaml new file mode 100644 index 0000000000..f6e327f6b4 --- /dev/null +++ b/docs/support-file/helm/templates/monstache/configmap.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-monstache-configures +data: + + config.toml: |- + # mongodb settings + mongo-url = {{ include "cmdb.mongodb.mongo-url" . | quote }} + + # elasticsearch settings + elasticsearch-urls = [{{ include "cmdb.elasticsearch.urlAndPort" . | quote }}] + {{- if .Values.common.es.usr }} + elasticsearch-user = {{ .Values.common.es.usr | quote }} + {{- end }} + {{- if .Values.common.es.pwd }} + elasticsearch-password = {{ .Values.common.es.pwd | quote }} + {{- end }} + gzip = true + + # metadata collections. + change-stream-namespaces = [""] + direct-read-namespaces = [""] + direct-read-dynamic-include-regex = {{ .Values.monstache.directReadDynamicIncludeRegex | quote }} + + # plugin + mapper-plugin-path = {{ .Values.monstache.mapperPluginPath | quote }} + + # resume mode + resume = false + + extra.toml: |- + elasticsearch-shard-num = {{ .Values.monstache.elasticsearchShardNum | quote }} + elasticsearch-replica-num = {{ .Values.monstache.elasticsearchReplicaNum | quote }} + + + + diff --git a/docs/support-file/helm/templates/monstache/monstache-dpl.yaml b/docs/support-file/helm/templates/monstache/monstache-dpl.yaml new file mode 100644 index 0000000000..8a9d95c9a8 --- /dev/null +++ b/docs/support-file/helm/templates/monstache/monstache-dpl.yaml @@ -0,0 +1,47 @@ +{{- if .Values.monstache.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-monstache" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: monstache +spec: + replicas: {{ .Values.monstache.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: monstache + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: monstache + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.monstache.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.monstache.podAnnotations }} + {{ toYaml .Values.monstache.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: monstache + image: {{ .Values.image.registry }}/{{ .Values.monstache.image.repository }}:{{ .Values.monstache.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + + workingDir: {{ .Values.monstache.workDir }} + command: ["./monstache"] + args: ["-f", "./etc/config.toml"] + ports: + - containerPort: {{ .Values.monstache.port }} + volumeMounts: + - name: configures + mountPath: {{ .Values.monstache.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-monstache-configures + +{{- end }} diff --git a/docs/support-file/helm/templates/operationserver/operationserver-dpl.yaml b/docs/support-file/helm/templates/operationserver/operationserver-dpl.yaml new file mode 100644 index 0000000000..80e063960d --- /dev/null +++ b/docs/support-file/helm/templates/operationserver/operationserver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.operationserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-operationserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: operationserver +spec: + replicas: {{ .Values.operationserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: operationserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: operationserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.operationserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.operationserver.podAnnotations }} + {{ toYaml .Values.operationserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: operationserver + image: {{ .Values.image.registry }}/{{ .Values.operationserver.image.repository }}:v{{ default .Chart.AppVersion .Values.operationserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.operationserver.workDir }} + command: ["./cmdb_operationserver"] + args: + - --addrport=$(POD_IP):{{ .Values.operationserver.port }} + {{- if .Values.operationserver.configDir }} + - --config={{ .Values.operationserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.operationserver.command.logDir }} + - --log-dir={{ .Values.operationserver.command.logDir }} + {{- end }} + - --v={{ .Values.operationserver.command.logLevel }} + - --logtostderr={{ .Values.operationserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.operationserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.operationserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.operationserver.resources }} + resources: {{ toYaml .Values.operationserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.operationserver.env }} + {{ toYaml .Values.operationserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.operationserver.port }} + + {{- if .Values.operationserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.operationserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-operationserver-configures + {{- end }} + + {{- with .Values.operationserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.operationserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.operationserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/operationserver/operationserver-svc.yaml b/docs/support-file/helm/templates/operationserver/operationserver-svc.yaml new file mode 100644 index 0000000000..8531ea526e --- /dev/null +++ b/docs/support-file/helm/templates/operationserver/operationserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.operationserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.operationserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.operationserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: operationserver +{{- end }} diff --git a/docs/support-file/helm/templates/procserver/procserver-dpl.yaml b/docs/support-file/helm/templates/procserver/procserver-dpl.yaml new file mode 100644 index 0000000000..5ecc375834 --- /dev/null +++ b/docs/support-file/helm/templates/procserver/procserver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.procserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-procserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: procserver +spec: + replicas: {{ .Values.procserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: procserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: procserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.procserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.procserver.podAnnotations }} + {{ toYaml .Values.procserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: procserver + image: {{ .Values.image.registry }}/{{ .Values.procserver.image.repository }}:v{{ default .Chart.AppVersion .Values.procserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.procserver.workDir }} + command: + - ./cmdb_procserver + - --addrport=$(POD_IP):{{ .Values.procserver.port }} + {{- if .Values.procserver.configDir }} + - --config={{ .Values.procserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.procserver.command.logDir }} + - --log-dir={{ .Values.procserver.command.logDir }} + {{- end }} + - --v={{ .Values.procserver.command.logLevel }} + - --logtostderr={{ .Values.procserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.procserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.procserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.procserver.resources }} + resources: {{ toYaml .Values.procserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.procserver.env }} + {{ toYaml .Values.procserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.procserver.port }} + + {{- if .Values.procserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.procserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-procserver-configures + {{- end }} + + {{- with .Values.procserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.procserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.procserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/procserver/procserver-svc.yaml b/docs/support-file/helm/templates/procserver/procserver-svc.yaml new file mode 100644 index 0000000000..a5cef03955 --- /dev/null +++ b/docs/support-file/helm/templates/procserver/procserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.procserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.procserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.procserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: procserver +{{- end }} diff --git a/docs/support-file/helm/templates/servicemonitor.yaml b/docs/support-file/helm/templates/servicemonitor.yaml new file mode 100644 index 0000000000..111bc66857 --- /dev/null +++ b/docs/support-file/helm/templates/servicemonitor.yaml @@ -0,0 +1,19 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: bk-cmdb +spec: + endpoints: + - port: http + path: "/metrics" + interval: {{ .Values.serviceMonitor.interval }} + {{- if .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.serviceMonitor.metricRelabelings "context" $) | nindent 8 }} + {{- end }} + namespaceSelector: + any: true + selector: + matchLabels: + app.kubernetes.io/name: bk-cmdb +{{- end }} diff --git a/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-dpl.yaml b/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-dpl.yaml new file mode 100644 index 0000000000..66b60d6c67 --- /dev/null +++ b/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.synchronizeserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-synchronizeserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: synchronizeserver +spec: + replicas: {{ .Values.synchronizeserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: synchronizeserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: synchronizeserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.synchronizeserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.synchronizeserver.podAnnotations }} + {{ toYaml .Values.synchronizeserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: synchronizeserver + image: {{ .Values.image.registry }}/{{ .Values.synchronizeserver.image.repository }}:v{{ default .Chart.AppVersion .Values.synchronizeserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.synchronizeserver.workDir }} + command: + - ./cmdb_synchronizeserver + - --addrport=$(POD_IP):{{ .Values.synchronizeserver.port }} + {{- if .Values.synchronizeserver.configDir }} + - --config={{ .Values.synchronizeserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.synchronizeserver.command.logDir }} + - --log-dir={{ .Values.synchronizeserver.command.logDir }} + {{- end }} + - --v={{ .Values.synchronizeserver.command.logLevel }} + - --logtostderr={{ .Values.synchronizeserver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.synchronizeserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.synchronizeserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.synchronizeserver.resources }} + resources: {{ toYaml .Values.synchronizeserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.synchronizeserver.env }} + {{ toYaml .Values.synchronizeserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.synchronizeserver.port }} + + {{- if .Values.synchronizeserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.synchronizeserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-synchronizeserver-configures + {{- end }} + + {{- with .Values.synchronizeserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.synchronizeserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.synchronizeserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-svc.yaml b/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-svc.yaml new file mode 100644 index 0000000000..98a4a361ac --- /dev/null +++ b/docs/support-file/helm/templates/synchronizeserver/synchronizeserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.synchronizeserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.synchronizeserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.synchronizeserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: synchronizeserver +{{- end }} diff --git a/docs/support-file/helm/templates/taskserver/taskserver-dpl.yaml b/docs/support-file/helm/templates/taskserver/taskserver-dpl.yaml new file mode 100644 index 0000000000..7854a633d6 --- /dev/null +++ b/docs/support-file/helm/templates/taskserver/taskserver-dpl.yaml @@ -0,0 +1,100 @@ +{{- if .Values.taskserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-taskserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: taskserver +spec: + replicas: {{ .Values.taskserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: taskserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: taskserver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.taskserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.taskserver.podAnnotations }} + {{ toYaml .Values.taskserver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: taskserver + image: {{ .Values.image.registry }}/{{ .Values.taskserver.image.repository }}:v{{ default .Chart.AppVersion .Values.taskserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.taskserver.workDir }} + command: + - ./cmdb_taskserver + - --addrport=$(POD_IP):{{ .Values.taskserver.port }} + {{- if .Values.taskserver.configDir }} + - --config={{ .Values.taskserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.taskserver.command.logDir }} + - --log-dir={{ .Values.taskserver.command.logDir }} + {{- end }} + - --v={{ .Values.taskserver.command.logLevel }} + - --logtostderr={{ .Values.taskserver.command.logToStdErr }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.taskserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.taskserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.taskserver.resources }} + resources: {{ toYaml .Values.taskserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.taskserver.env }} + {{ toYaml .Values.taskserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.taskserver.port }} + + {{- if .Values.taskserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.taskserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-taskserver-configures + {{- end }} + + {{- with .Values.taskserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.taskserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.taskserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/taskserver/taskserver-svc.yaml b/docs/support-file/helm/templates/taskserver/taskserver-svc.yaml new file mode 100644 index 0000000000..b3496e999e --- /dev/null +++ b/docs/support-file/helm/templates/taskserver/taskserver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.taskserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.taskserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.taskserver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: taskserver +{{- end }} diff --git a/docs/support-file/helm/templates/toposerver/toposerver-dpl.yaml b/docs/support-file/helm/templates/toposerver/toposerver-dpl.yaml new file mode 100644 index 0000000000..a23b8b80f7 --- /dev/null +++ b/docs/support-file/helm/templates/toposerver/toposerver-dpl.yaml @@ -0,0 +1,102 @@ +{{- if .Values.toposerver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-toposerver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: toposerver +spec: + replicas: {{ .Values.toposerver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: toposerver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: toposerver + values-hash: "{{ toYaml .Values | sha256sum | trunc 63 }}" + {{- with .Values.toposerver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.toposerver.podAnnotations }} + {{ toYaml .Values.toposerver.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: toposerver + image: {{ .Values.image.registry }}/{{ .Values.toposerver.image.repository }}:v{{ default .Chart.AppVersion .Values.toposerver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.toposerver.workDir }} + command: + - ./cmdb_toposerver + - --addrport=$(POD_IP):{{ .Values.toposerver.port }} + {{- if .Values.toposerver.configDir }} + - --config={{ .Values.toposerver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.toposerver.command.logDir }} + - --log-dir={{ .Values.toposerver.command.logDir }} + {{- end }} + - --v={{ .Values.toposerver.command.logLevel }} + - --logtostderr={{ .Values.toposerver.command.logToStdErr }} + - "--enable-auth" + - {{ .Values.iam.auth.enabled | quote }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.toposerver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.toposerver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.toposerver.resources }} + resources: {{ toYaml .Values.toposerver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.toposerver.env }} + {{ toYaml .Values.toposerver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.toposerver.port }} + + {{- if .Values.toposerver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.toposerver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-toposerver-configures + {{- end }} + + {{- with .Values.toposerver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.toposerver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.toposerver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/toposerver/toposerver-svc.yaml b/docs/support-file/helm/templates/toposerver/toposerver-svc.yaml new file mode 100644 index 0000000000..938c2c469b --- /dev/null +++ b/docs/support-file/helm/templates/toposerver/toposerver-svc.yaml @@ -0,0 +1,16 @@ +{{- if .Values.toposerver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.toposerver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + ports: + - name: http + port: 80 + targetPort: {{ .Values.toposerver.port }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: toposerver +{{- end }} diff --git a/docs/support-file/helm/templates/webserver/ingress.yaml b/docs/support-file/helm/templates/webserver/ingress.yaml new file mode 100644 index 0000000000..40cf66d715 --- /dev/null +++ b/docs/support-file/helm/templates/webserver/ingress.yaml @@ -0,0 +1,27 @@ +{{- if .Values.webserver.ingress.enabled -}} +{{- $serviceName := include "bk-cmdb.webserver" . -}} +{{- $servicePort := .Values.webserver.service.externalPort -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "bk-cmdb.webserver" . }} + labels: +{{ include "common.labels.standard" . | indent 4 }} + annotations: + {{- range $key, $value := .Values.webserver.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + rules: + - host: {{ .Values.webserver.ingress.host }} + http: + paths: + - path: / + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- if .Values.webserver.ingress.tls }} + tls: +{{ toYaml .Values.webserver.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/docs/support-file/helm/templates/webserver/webserver-dpl.yaml b/docs/support-file/helm/templates/webserver/webserver-dpl.yaml new file mode 100644 index 0000000000..d7346eacc2 --- /dev/null +++ b/docs/support-file/helm/templates/webserver/webserver-dpl.yaml @@ -0,0 +1,104 @@ +{{- if .Values.webserver.enabled }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: "{{ template "bk-cmdb.fullname" . }}-webserver" + labels: + {{- include "common.labels.standard" . | nindent 4 }} + component: webserver +spec: + replicas: {{ .Values.webserver.replicas }} + selector: + matchLabels: + {{- include "common.labels.matchLabels" . | nindent 6 }} + component: webserver + template: + metadata: + labels: + {{- include "common.labels.standard" . | nindent 8 }} + component: webserver + values-hash: {{ toYaml .Values | sha256sum | trunc 63 }} + {{- with .Values.webserver.annotations }} + annotations: + {{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.webserver.podAnnotations }} + {{ toYaml .Values.webserver.podAnnotations | indent 8 }} + {{- end }} + spec: + {{- if .Values.webserver.hostNetwork }} + hostNetwork: true + {{- end }} + dnsPolicy: {{ .Values.webserver.dnsPolicy }} + containers: + - name: webserver + image: {{ .Values.image.registry }}/{{ .Values.webserver.image.repository }}:v{{ default .Chart.AppVersion .Values.webserver.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: {{ .Values.webserver.workDir}} + command: + - ./cmdb_webserver + - --addrport=$(POD_IP):{{ .Values.webserver.port }} + {{- if .Values.webserver.configDir }} + - --config={{ .Values.webserver.configDir }} + {{- end }} + - --regdiscv={{ include "cmdb.configAndServiceCenter.addr" . }} + {{- if .Values.webserver.command.logDir }} + - --log-dir={{ .Values.webserver.command.logDir }} + {{- end }} + - --v={{ .Values.webserver.command.logLevel }} + - --logtostderr={{ .Values.webserver.command.logToStdErr }} + livenessProbe: + httpGet: + path: /healthz + port: {{ .Values.webserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /healthz + port: {{ .Values.webserver.port }} + initialDelaySeconds: 30 + periodSeconds: 10 + + {{- if .Values.webserver.resources }} + resources: {{ toYaml .Values.webserver.resources | nindent 10 }} + {{- end }} + + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + {{- if .Values.webserver.env }} + {{ toYaml .Values.webserver.env | indent 10 }} + {{- end }} + + ports: + - containerPort: {{ .Values.webserver.port }} + + {{- if .Values.webserver.configDir }} + volumeMounts: + - name: configures + mountPath: {{ .Values.webserver.configDir }} + volumes: + - name: configures + configMap: + name: {{ .Release.Name }}-webserver-configures + {{- end }} + + {{- with .Values.webserver.nodeSelector }} + nodeSelector: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.webserver.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + + {{- with .Values.webserver.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} + +{{- end }} diff --git a/docs/support-file/helm/templates/webserver/webserver-svc.yaml b/docs/support-file/helm/templates/webserver/webserver-svc.yaml new file mode 100644 index 0000000000..5d6082f422 --- /dev/null +++ b/docs/support-file/helm/templates/webserver/webserver-svc.yaml @@ -0,0 +1,17 @@ +{{- if .Values.webserver.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: "{{ template "bk-cmdb.webserver" . }}" + labels: +{{ include "common.labels.standard" . | indent 4 }} +spec: + type: {{ .Values.webserver.service.type }} + ports: + {{- with .Values.webserver.service.ports }} + {{- toYaml . | nindent 4 }} + {{- end }} + selector: +{{ include "common.labels.matchLabels" . | indent 4 }} + component: webserver +{{- end }} diff --git a/docs/support-file/helm/values.yaml b/docs/support-file/helm/values.yaml new file mode 100644 index 0000000000..1d490ba9ee --- /dev/null +++ b/docs/support-file/helm/values.yaml @@ -0,0 +1,1824 @@ +## @section Global parameters +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass + +## @param global.imageRegistry Global Docker image registry +## @param global.imagePullSecrets Global Docker registry secret names as an array +## @param global.storageClass Global StorageClass for Persistent Volume(s) +## +global: + imageRegistry: "" + ## E.g. + ## imagePullSecrets: + ## - myRegistryKeySecretName + ## + imagePullSecrets: [] + storageClass: "" + +## @section bk-cmdb image parameters +## + +## bk-cmdb image parameters +## @param image.registry bk-cmdb image registry +## @param image.pullPolicy bk-cmdb image pull policy +## +image: + registry: hub.bktencent.com + pullPolicy: IfNotPresent + +## @section bk-cmdb adminserver parameters +## +adminserver: + ## @param adminserver.enabled Enable adminserver deployment + ## + enabled: true + ## bk-cmdb adminserver image parameters + ## @param adminserver.image.repository bk-cmdb adminserver image repository + ## @param adminserver.image.rag bk-cmdb adminserver image tag + ## + image: + repository: blueking/cmdb_adminserver + tag: + ## @param adminserver.replicas Number of administrator replicas to deploy + ## + replicas: 1 + ## @param adminserver.port bk-cmdb adminserver service HTTP port + ## + port: 80 + ## @param adminserver.workDir bk-cmdb adminserver work directory + ## + workDir: /data/cmdb/cmdb_adminserver + ## @param adminserver.configDir bk-cmdb adminserver config directory + ## + configDir: /data/cmdb/cmdb_adminserver/configure + ## @param adminserver.errors bk-cmdb adminserver errors config directory + ## + errors: /data/cmdb/cmdb_adminserver/conf/errors + ## @param adminserver.errors bk-cmdb adminserver language config directory + ## + language: /data/cmdb/cmdb_adminserver/conf/language + ## bk-cmdb adminserver start command parameters + ## @param adminserver.command.logDir bk-cmdb adminserver log directory + ## @param adminserver.command.logLevel bk-cmdb adminserver log level + ## @param adminserver.command.logLevel Enable bk-cmdb adminserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_adminserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb apiserver parameters +## +apiserver: + ## @param apiserver.enabled Enable apiserver deployment + ## + enabled: true + ## bk-cmdb apiserver image parameters + ## @param apiserver.image.repository bk-cmdb apiserver image repository + ## @param apiserver.image.rag bk-cmdb apiserver image tag + ## + image: + repository: blueking/cmdb_apiserver + tag: + ## @param apiserver.replicas Number of apiserver replicas to deploy + ## + replicas: 1 + ## @param apiserver.port bk-cmdb apiserver service HTTP port + ## + port: 80 + ## @param apiserver.workDir bk-cmdb apiserver work directory + ## + workDir: /data/cmdb/cmdb_apiserver + ## bk-cmdb apiserver start command parameters + ## @param apiserver.command.logDir bk-cmdb apiserver log directory + ## @param apiserver.command.logLevel bk-cmdb apiserver log level + ## @param apiserver.command.logLevel Enable bk-cmdb apiserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_apiserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb authserver parameters +## +authserver: + ## @param authserver.enabled Enable authserver deployment + ## + enabled: true + ## bk-cmdb authserver image parameters + ## @param authserver.image.repository bk-cmdb authserver image repository + ## @param authserver.image.rag bk-cmdb authserver image tag + ## + image: + repository: blueking/cmdb_authserver + tag: + ## @param authserver.replicas Number of authserver replicas to deploy + ## + replicas: 1 + ## bk-cmdb authserver ingress parameters + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ## + ingress: + ## @param authserver.ingress.enabled Enable ingress record generation for bk-cmdb authserver + ## + enabled: true + ## @param authserver.ingress.hostname Default host for the ingress record + ## + host: cmdb-auth.example.com + ## @param authserver.ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. + ## For a full list of possible ingress annotations, please see + ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md + ## Use this parameter to set the required annotations for cert-manager, see + ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations + ## + annotations: + kubernetes.io/ingress.class: nginx + ## @param authserver.ingress.tls Enable TLS configuration for the host defined at `ingress.host` parameter + ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}` + ## You can: + ## - Use the `ingress.secrets` parameter to create this TLS secret + ## - Relay on cert-manager to create it by setting the corresponding annotations + ## - Relay on Helm to create self-signed certificates by setting `ingress.tls=true` and `ingress.certManager=false` + ## + tls: + ## bk-cmdb authserver service parameters + ## + service: + ## @param authserver.service.type bk-cmdb authserver service type + ## + type: "ClusterIP" + ## @param authserver.service.ports Expose bk-cmdb webserver service by authserver.service.ports[0].nodePort when authserver.service.type is "NodePort" + ## + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 80 + nodePort: + ## authserver.service.externalPort bk-cmdb authserver service external port + ## + externalPort: 80 + ## @param authserver.port bk-cmdb authserver service HTTP port + ## + port: 80 + ## @param authserver.workDir bk-cmdb authserver work directory + ## + workDir: /data/cmdb/cmdb_authserver + ## bk-cmdb authserver start command parameters + ## @param authserver.command.logDir bk-cmdb authserver log directory + ## @param authserver.command.logLevel bk-cmdb authserver log level + ## @param authserver.command.logLevel Enable bk-cmdb authserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_authserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb cacheservice parameters +## +cacheservice: + ## @param cacheservice.enabled Enable cacheservice deployment + ## + enabled: true + ## bk-cmdb cacheservice image parameters + ## @param cacheservice.image.repository bk-cmdb cacheservice image repository + ## @param cacheservice.image.rag bk-cmdb cacheservice image tag + ## + image: + repository: blueking/cmdb_cacheservice + tag: + ## @param cacheservice.replicas Number of cacheservice replicas to deploy + ## + replicas: 1 + ## @param cacheservice.port bk-cmdb cacheservice service HTTP port + ## + port: 80 + ## @param cacheservice.workDir bk-cmdb cacheservice work directory + ## + workDir: /data/cmdb/cmdb_cacheservice + ## bk-cmdb cacheservice start command parameters + ## @param cacheservice.command.logDir bk-cmdb cacheservice log directory + ## @param cacheservice.command.logLevel bk-cmdb cacheservice log level + ## @param cacheservice.command.logLevel Enable bk-cmdb cacheservice print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_cacheservice/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb cloudserver parameters +## +cloudserver: + ## @param cloudserver.enabled Enable cloudserver deployment + ## + enabled: true + ## bk-cmdb cloudserver image parameters + ## @param cloudserver.image.repository bk-cmdb cloudserver image repository + ## @param cloudserver.image.rag bk-cmdb cloudserver image tag + ## + image: + repository: blueking/cmdb_cloudserver + tag: + ## @param cloudserver.replicas Number of cloudserver replicas to deploy + ## + replicas: 1 + ## @param cloudserver.port bk-cmdb cloudserver service HTTP port + ## + port: 80 + ## @param cloudserver.workDir bk-cmdb cloudserver work directory + ## + workDir: /data/cmdb/cmdb_cloudserver + ## bk-cmdb cloudserver start command parameters + ## @param cloudserver.command.logDir bk-cmdb cloudserver log directory + ## @param cloudserver.command.logLevel bk-cmdb cloudserver log level + ## @param cloudserver.command.logLevel Enable bk-cmdb cloudserver print log to stderr + ## @param cloudserver.command.enableCryptor Enable bk-cmdb cloudserver secret service + ## + command: + logDir: /data/cmdb/cmdb_cloudserver/logs + logLevel: 3 + logToStdErr: false + enableCryptor: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb coreservice parameters +## +coreservice: + ## @param coreservice.enabled Enable coreservice deployment + ## + enabled: true + ## bk-cmdb coreservice image parameters + ## @param coreservice.image.repository bk-cmdb coreservice image repository + ## @param coreservice.image.rag bk-cmdb coreservice image tag + ## + image: + repository: blueking/cmdb_coreservice + tag: + ## @param coreservice.replicas Number of coreservice replicas to deploy + ## + replicas: 1 + ## @param coreservice.port bk-cmdb coreservice service HTTP port + ## + port: 80 + ## @param coreservice.workDir bk-cmdb coreservice work directory + ## + workDir: /data/cmdb/cmdb_coreservice + ## bk-cmdb coreservice start command parameters + ## @param coreservice.command.logDir bk-cmdb coreservice log directory + ## @param coreservice.command.logLevel bk-cmdb coreservice log level + ## @param coreservice.command.logLevel Enable bk-cmdb coreservice print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_coreservice/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb datacollection parameters +## +datacollection: + ## @param datacollection.enabled Enable datacollection deployment + ## + enabled: true + ## bk-cmdb datacollection image parameters + ## @param datacollection.image.repository bk-cmdb datacollection image repository + ## @param datacollection.image.rag bk-cmdb datacollection image tag + ## + image: + repository: blueking/cmdb_datacollection + tag: + ## @param datacollection.replicas Number of datacollection replicas to deploy + ## + replicas: 1 + ## @param datacollection.port bk-cmdb datacollection service HTTP port + ## + port: 80 + ## @param datacollection.workDir bk-cmdb datacollection work directory + ## + workDir: /data/cmdb/cmdb_datacollection + ## bk-cmdb datacollection start command parameters + ## @param datacollection.command.logDir bk-cmdb datacollection log directory + ## @param datacollection.command.logLevel bk-cmdb datacollection log level + ## @param datacollection.command.logLevel Enable bk-cmdb datacollection print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_datacollection/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb eventserver parameters +## +eventserver: + ## @param eventserver.enabled Enable eventserver deployment + ## + enabled: true + ## bk-cmdb eventserver image parameters + ## @param eventserver.image.repository bk-cmdb eventserver image repository + ## @param eventserver.image.rag bk-cmdb eventserver image tag + ## + image: + repository: blueking/cmdb_eventserver + tag: + ## @param eventserver.replicas Number of eventserver replicas to deploy + ## + replicas: 1 + ## @param eventserver.port bk-cmdb eventserver service HTTP port + ## + port: 80 + ## @param eventserver.workDir bk-cmdb eventserver work directory + ## + workDir: /data/cmdb/cmdb_eventserver + ## bk-cmdb eventserver start command parameters + ## @param eventserver.command.logDir bk-cmdb eventserver log directory + ## @param eventserver.command.logLevel bk-cmdb eventserver log level + ## @param eventserver.command.logLevel Enable bk-cmdb eventserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_eventserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb hostserver parameters +## +hostserver: + ## @param hostserver.enabled Enable hostserver deployment + ## + enabled: true + ## bk-cmdb hostserver image parameters + ## @param hostserver.image.repository bk-cmdb hostserver image repository + ## @param hostserver.image.rag bk-cmdb hostserver image tag + ## + image: + repository: blueking/cmdb_hostserver + tag: + ## @param hostserver.replicas Number of hostserver replicas to deploy + ## + replicas: 1 + ## @param hostserver.port bk-cmdb hostserver service HTTP port + ## + port: 80 + ## @param hostserver.workDir bk-cmdb hostserver work directory + ## + workDir: /data/cmdb/cmdb_hostserver + ## bk-cmdb hostserver start command parameters + ## @param hostserver.command.logDir bk-cmdb hostserver log directory + ## @param hostserver.command.logLevel bk-cmdb hostserver log level + ## @param hostserver.command.logLevel Enable bk-cmdb hostserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_hostserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb operationserver parameters +## +operationserver: + ## @param operationserver.enabled Enable operationserver deployment + ## + enabled: true + ## bk-cmdb operationserver image parameters + ## @param operationserver.image.repository bk-cmdb operationserver image repository + ## @param operationserver.image.rag bk-cmdb operationserver image tag + ## + image: + repository: blueking/cmdb_operationserver + tag: + ## @param operationserver.replicas Number of operationserver replicas to deploy + ## + replicas: 1 + ## @param operationserver.port bk-cmdb operationserver service HTTP port + ## + port: 80 + ## @param operationserver.workDir bk-cmdb operationserver work directory + ## + workDir: /data/cmdb/cmdb_operationserver + ## bk-cmdb operationserver start command parameters + ## @param operationserver.command.logDir bk-cmdb operationserver log directory + ## @param operationserver.command.logLevel bk-cmdb operationserver log level + ## @param operationserver.command.logLevel Enable bk-cmdb operationserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_operationserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb procserver parameters +## +procserver: + ## @param procserver.enabled Enable procserver deployment + ## + enabled: true + ## bk-cmdb procserver image parameters + ## @param procserver.image.repository bk-cmdb procserver image repository + ## @param procserver.image.rag bk-cmdb procserver image tag + ## + image: + repository: blueking/cmdb_procserver + tag: + ## @param procserver.replicas Number of procserver replicas to deploy + ## + replicas: 1 + ## @param procserver.port bk-cmdb procserver service HTTP port + ## + port: 80 + ## @param procserver.workDir bk-cmdb procserver work directory + ## + workDir: /data/cmdb/cmdb_procserver + ## bk-cmdb procserver start command parameters + ## @param procserver.command.logDir bk-cmdb procserver log directory + ## @param procserver.command.logLevel bk-cmdb procserver log level + ## @param procserver.command.logLevel Enable bk-cmdb procserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_procserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb synchronizeserver parameters +## +synchronizeserver: + ## @param synchronizeserver.enabled Enable synchronizeserver deployment + ## + enabled: true + ## bk-cmdb synchronizeserver image parameters + ## @param synchronizeserver.image.repository bk-cmdb synchronizeserver image repository + ## @param synchronizeserver.image.rag bk-cmdb synchronizeserver image tag + ## + image: + repository: blueking/cmdb_synchronizeserver + tag: + ## @param synchronizeserver.replicas Number of synchronizeserver replicas to deploy + ## + replicas: 1 + ## @param synchronizeserver.port bk-cmdb synchronizeserver service HTTP port + ## + port: 80 + ## @param synchronizeserver.workDir bk-cmdb synchronizeserver work directory + ## + workDir: /data/cmdb/cmdb_synchronizeserver + ## bk-cmdb synchronizeserver start command parameters + ## @param synchronizeserver.command.logDir bk-cmdb synchronizeserver log directory + ## @param synchronizeserver.command.logLevel bk-cmdb synchronizeserver log level + ## @param synchronizeserver.command.logLevel Enable bk-cmdb synchronizeserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_synchronizeserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb taskserver parameters +## +taskserver: + ## @param taskserver.enabled Enable taskserver deployment + ## + enabled: true + ## bk-cmdb taskserver image parameters + ## @param taskserver.image.repository bk-cmdb taskserver image repository + ## @param taskserver.image.rag bk-cmdb taskserver image tag + ## + image: + repository: blueking/cmdb_taskserver + tag: + ## @param taskserver.replicas Number of taskserver replicas to deploy + ## + replicas: 1 + ## @param taskserver.port bk-cmdb taskserver service HTTP port + ## + port: 80 + ## @param taskserver.workDir bk-cmdb taskserver work directory + ## + workDir: /data/cmdb/cmdb_taskserver + ## bk-cmdb taskserver start command parameters + ## @param taskserver.command.logDir bk-cmdb taskserver log directory + ## @param taskserver.command.logLevel bk-cmdb taskserver log level + ## @param taskserver.command.logLevel Enable bk-cmdb taskserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_taskserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb toposerver parameters +## +toposerver: + ## @param toposerver.enabled Enable toposerver deployment + ## + enabled: true + ## bk-cmdb toposerver image parameters + ## @param toposerver.image.repository bk-cmdb toposerver image repository + ## @param toposerver.image.rag bk-cmdb toposerver image tag + ## + image: + repository: blueking/cmdb_toposerver + tag: + ## @param toposerver.replicas Number of toposerver replicas to deploy + ## + replicas: 1 + ## @param toposerver.port bk-cmdb toposerver service HTTP port + ## + port: 80 + ## @param toposerver.workDir bk-cmdb toposerver work directory + ## + workDir: /data/cmdb/cmdb_toposerver + ## bk-cmdb toposerver start command parameters + ## @param toposerver.command.logDir bk-cmdb toposerver log directory + ## @param toposerver.command.logLevel bk-cmdb toposerver log level + ## @param toposerver.command.logLevel Enable bk-cmdb toposerver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_toposerver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + + +## @section bk-cmdb webserver parameters +## +webserver: + ## @param webserver.enabled Enable webserver deployment + ## + enabled: true + ## bk-cmdb webserver image parameters + ## @param webserver.image.repository bk-cmdb webserver image repository + ## @param webserver.image.rag bk-cmdb webserver image tag + ## + image: + repository: blueking/cmdb_webserver + tag: + ## @param webserver.replicas Number of webserver replicas to deploy + ## + replicas: 1 + ## @param webserver.dnsPolicy DNS policy + ## + dnsPolicy: ClusterFirst + ## @param webserver.dnsPolicy Use host network policy + ## + hostNetwork: false + ## bk-cmdb webserver ingress parameters + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ## + ingress: + ## @param webserver.ingress.enabled Enable ingress record generation for bk-cmdb webserver + ## + enabled: true + ## @param webserver.ingress.hostname Default host for the ingress record + ## + host: cmdb.example.com + ## @param webserver.ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. + ## For a full list of possible ingress annotations, please see + ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md + ## Use this parameter to set the required annotations for cert-manager, see + ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations + ## + annotations: + kubernetes.io/ingress.class: nginx + ## @param webserver.ingress.tls Enable TLS configuration for the host defined at `ingress.host` parameter + ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}` + ## You can: + ## - Use the `ingress.secrets` parameter to create this TLS secret + ## - Relay on cert-manager to create it by setting the corresponding annotations + ## - Relay on Helm to create self-signed certificates by setting `ingress.tls=true` and `ingress.certManager=false` + ## + tls: false + ## bk-cmdb webserver service parameters + ## + service: + ## @param webserver.service.type bk-cmdb webserver service type + ## + type: "ClusterIP" + ## @param webserver.service.ports Expose bk-cmdb webserver service by webserver.service.ports[0].nodePort when webserver.service.type is "NodePort" + ## + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 80 + nodePort: + ## webserver.service.externalPort bk-cmdb webserver service external port + ## + externalPort: 80 + ## @param webserver.port bk-cmdb webserver service HTTP port + ## + port: 80 + ## @param webserver.workDir bk-cmdb webserver work directory + ## + workDir: /data/cmdb/cmdb_webserver + ## bk-cmdb webserver start command parameters + ## @param webserver.command.logDir bk-cmdb webserver log directory + ## @param webserver.command.logLevel bk-cmdb webserver log level + ## @param webserver.command.logLevel Enable bk-cmdb webserver print log to stderr + ## + command: + logDir: /data/cmdb/cmdb_webserver/logs + logLevel: 3 + logToStdErr: false + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section bk-cmdb migrate job parameters +## +migrate: + ## @param migrate.enabled Enable bk-cmdb migrate job + ## + enabled: true + ## bk-cmdb migrate image parameters + ## @param migrate.image.repository bk-cmdb migrate image repository + ## @param migrate.image.rag bk-cmdb migrate image tag + ## + image: + repository: blueking/cmdb_migrate + tag: + ## @param migrate.migrateDataId Enable register dataid to GSE + ## + migrateDataId: false + +## @section bk-cmdb iam authentication parameters +## +iam: + auth: + ## @parem iam.auth.enabled Enable bk-iam authentication + enabled: false + +## @section Blueking url parameters +## +## @param bkPaasUrl bk-paas url +## +bkPaasUrl: http://paas.example.com +## @param bkIamApiUrl bk-iam backend url +## +bkIamApiUrl: http://bkiam-web +## @param bkComponentApiUrl esb url +## +bkComponentApiUrl: http://bkapi.paas.example.com +## @param bkLoginApiUrl bk-login url +## +bkLoginApiUrl: http://bk-login-web +## @param bkNodemanUrl bk-nodeman url +## +bkNodemanUrl: http://apps.paas.example.com/bk--nodeman + +## @section bk-cmdb common config parameters +## +common: + ## bk-cmdb common config authentication parameters + ## @param common.auth.appCode bk-cmdb app code used in bk-iam + ## @param common.auth.appSecret bk-cmdb app secret used in bk-iam + ## + auth: + appCode: bk_cmdb + appSecret: + ## bk-cmdb common config auth center parameters + ## @param common.auth.tls.insecureSkipVerify paas insecureSkipVerify config + ## @param common.auth.tls.certFile paas certFile + ## @param common.auth.tls.keyFile paas keyFile + ## @param common.auth.tls.caFile paas caFile + ## @param common.auth.tls.password paas password + ## + tls: + insecureSkipVerify: + certFile: + keyFile: + caFile: + password: + + ## bk-cmdb common config esb parameters + ## @param common.esb.appCode bk-cmdb app code used in esb + ## @param common.esb.appSecret bk-cmdb app secret used in esb + ## + esb: + appCode: bk_cmdb + appSecret: + + ## bk-cmdb common config paas parameters + ## @param common.paas.tls.insecureSkipVerify paas insecureSkipVerify config + ## @param common.paas.tls.certFile paas certFile + ## @param common.paas.tls.keyFile paas keyFile + ## @param common.paas.tls.caFile paas caFile + ## @param common.paas.tls.password paas password + ## + paas: + tls: + insecureSkipVerify: + certFile: + keyFile: + caFile: + password: + + ## bk-cmdb common config elasticsearch parameters + ## @param common.es.fullTextSearch Enable full text search + ## @param common.es.utl elasticsearch url + ## @param common.es.usr elasticsearch username + ## @param common.es.pwd elasticsearch password + ## + es: + fullTextSearch: "off" + url: + usr: + pwd: + #auth_server专属配置 + authServer: + #开发商ID + supplierID: "0" + #cloudServer专属配置 + cloudServer: + # 加密服务使用 + cryptor: + enableCryptor: false + # 访问密码服务来获取密钥的URL,格式如/api/v1/secrets/cloud_account + secretKeyUrl: + # 密钥服务的地址,必须以http://或者https://开头 + secretsAddrs: + # 密码服务的权限凭证Token + secretsToken: + # 密码服务的项目名称 + secretsProject: + # 密码服务的环境名称 + secretsEnv: + syncTask: + syncPeriodMinutes: 5 + #datacollection专属配置 + datacollection: + hostSnapshot: + # 主机静态数据采集模式,将数据导入kafka或者redis,可选值是 kafka、redis,默认值为redis(仅用于新插件bkmonitorbeat) + reportMode: redis + # 当主机快照数据属性,如cpu,bk_cpu_mhz,bk_disk,bk_mem这些数值型数据变动的范围大于该配置的值时,进行db数据的更新,默认值为10%,最小值为5%,以百分比为单位 + changeRangePercent: 10 + # 用于设置主机快照key在redis中的过期时间,该时间会有上下50%的波动,当key存在时,同一id的主机数据不会更新,默认值为10分钟,最小值为5分钟,以分钟为单位 + changeCountExpireMinute: 10 + # 用于设置单个服务主机快照处理请求能力,起到限流的作用,令牌桶配置,最多请求数通过burst设置。qps的默认值为40,burst的默认值为100 + rateLimiter: + qps: 40 + burst: 100 + # 主机快照属性,如cpu,bk_cpu_mhz,bk_disk,bk_mem等数据的处理时间窗口,用于限制在指定周期的前多少分钟可以让请求通过,超过限定时间将不会处理请求。 + # 它的下一级有三个参数,atTime,checkIntervalHours,windowMinute 当不配置windowMinute,窗口不生效。当配置了windowMinute,至少配置atTime + # 或者checkIntervalHours中的一个,否则不生效。当atTime和checkIntervalHours都配置时,取atTime这个配置的语义功能 + # 如果窗口生效,启动的时候,会先跑完windowMinutes,然后再生效。 + timeWindow: + # atTime,设置一天中,几点开启时间窗口,如配置成14:40,表示14:40开启窗口,如果配置格式不正确,默认值为1:00 + atTime: + # checkIntervalHours,规定每隔几个小时窗口开启,单位为小时,如配置成 3,表示每隔3个小时,开启时间窗口,如果配置格式不正确,默认值为 1 + checkIntervalHours: 1 + # windowMinutes,代表开启时间窗口后,多长时间内请求可以通过,单位为分钟。如配置成 60,表示开启窗口时间60分钟内请求可以通过。 + # 注意:该时间不能大于窗口每次开启的间隔时间,取值范围不能小于等于0,如果配置不正确,默认值为15 + windowMinutes: 15 + ## operationserver common config parameters + ## + operationServer: + ## @param common.operationServer.timer.spec operation statistic collecting time + ## 00:00-23:59,运营统计定时收集数据时间点,默认是为00:30 + ## + timer: + spec: 15:30 + ## @param common.operationServer.timer + ## 禁用运营统计数据统计功能,默认false,如果设置为true,将无法查看定时统计的主机、模型实例等的变化数据 + ## + disableOperationStatistic: false + ## webserver common config parameters + ## + webServer: + ## webserver common config site parameters + ## @param common.webServer.site.domainUrl bk-cmdb web domain address + ## @param common.webServer.site.httpsDomainUrl bk-cmdb web https domain address + ## @param common.webServer.site.appCode bk-cmdb app code + ## @param common.webServer.site.checkUrl bk-login user check url + ## @param common.webServer.site.resourcesPath bk-cmdb frontend resource path + ## @param common.webServer.site.htmlRoot bk-cmdb frontend html root + ## @param common.webServer.site.authScheme bk-cmdb authentication scheme + ## @param common.webServer.site.helDocUrl bk-cmdb help documents url + ## + site: + domainUrl: http://cmdb.example.com + httpsDomainUrl: + appCode: bk_cmdb + resourcesPath: /tmp/ + htmlRoot: /data/cmdb/cmdb_webserver/web + authScheme: internal + helpDocUrl: + ## webserver common config session parameters + ## @param common.webServer.session.name bk-cmdb session name + ## @param common.webServer.session.multipleOwner Enable one user with multiple logins at the same time + ## @param common.webServer.session.userInfo bk-cmdb login user name and password + ## + session: + name: cc3 + multipleOwner: "0" + userInfo: cc:cc + ## webserver common config app parameters + ## @param common.webServer.app.authAppCode bk-iam app code + ## @param common.webServer.app.authUrl bk-iam url + ## @param common.webServer.app.agentAppUrl bk-nodeman url + ## @param common.webServer.app.authScheme bk-cmdb app authentication scheme + ## + app: + authAppCode: + authUrl: + authScheme: + ## webserver common config login parameters + ## @param common.webServer.login.version bk-cmdb login mode + ## + login: + version: opensource + ## monitor common config parameters + ## + monitor: + ## @param common.monitor.enabled Enable monitor + enabled: false + ## @param common.monitor.pluginName Monitor plugin name + ## 监控插件名称,有noop,blueking,不填时默认为noop + ## + pluginName: noop + ## @param common.monitor.dataId Monitor plugin data report id + ## 当使用blueking监控插件时,上报数据所需要的数据通道标识,如1500000 + ## + dataId: 0 + ## @param common.monitor.queueSize Monitor plugin data collecting cache queue size + ## 采集数据后能够缓存的队列长度,设置范围为1~1000, 默认为100 + ## + queueSize: 100 + ## @param common.monitor.gsecmdlinePath Monitor plugin gsecmdbline path + ## 采集数据用的gsecmdline命令绝对路径,默认版本需要大于等于2.0.2 ,默认路径:/usr/local/gse/plugins/bin/gsecmdline + ## + gsecmdlinePath: + ## @param common.monitor.domainSocketPath Domain socket path for monitor plugin gsecmdbline data report + ## 对应的domainsocket绝对路径,默认路径:/usr/local/gse/agent/data/ipc.state.report + ## + domainSocketPath: + ## @param common.monitor.rateLimiter Monitor plugin data report rate limiter + ## 用于对数据上报进行频率控制和限流 + ## qps的设置范围为1~50,默认值为10 + ## burst的设置范围为1~100,默认值为20 + ## + rateLimiter: + qps: 10 + burst: 20 + ## monitor common config parameters + ## + cacheService: + ## @param common.cacheService.briefTopologySyncIntervalMinutes bk-cmdb cacheservice sync brief topo interval + ## 业务简要拓扑缓存的定时刷新时间,默认为15分钟,最小为2分钟。每次会将所有的业务的拓扑刷新一次到缓存中 + ## + briefTopologySyncIntervalMinutes: 15 + ## log platform openTelemetry config + ## + openTelemetry: + ## @param common.openTelemetry.enable enable openTelemetry function + ## 表示是否开启日志平台openTelemetry跟踪链接入相关功能,布尔值, 默认值为false不开启 + ## + enable: false + ## @param common.openTelemetry.endpoint the address about tracking chain function + ## 日志平台openTelemetry跟踪链功能的自定义上报服务地址 + ## + endpoint: + ## @param common.openTelemetry.bkDataID the bkDataID about tracking chain function + ## 日志平台openTelemetry跟踪链功能的上报data_id + ## + bkDataID: + ## @param common.openTelemetry.tls.insecureSkipVerify openTelemetry insecureSkipVerify config + ## @param common.openTelemetry.tls.certFile openTelemetry certFile + ## @param common.openTelemetry.tls.keyFile openTelemetry keyFile + ## @param common.openTelemetry.tls.caFile openTelemetry caFile + ## @param common.openTelemetry.tls.password openTelemetry password + ## + tls: + insecureSkipVerify: + certFile: + keyFile: + caFile: + password: + + ## eventServer common config parameters + ## + eventServer: + ## 下发主机身份相关配置 + hostIdentifier: + ## @param common.eventServer.hostIdentifier.startUp startUp sync host identifier + ## 是否开始下发主机身份功能, 有两个值,true和false,当处于true时,开启下发主机身份功能,false时,关闭该功能 + ## + startUp: false + ## @param common.eventServer.hostIdentifier.batchSyncIntervalHours batch sync interval hours + ## 每隔多少个小时进行一次全量主机身份批量的同步操作,整数值,单位为小时,注:刚启动服务时,会等一个周期后再进行全量同步操作 + ## + batchSyncIntervalHours: 6 + ## @param common.eventServer.hostIdentifier.rateLimiter.qps ratelimiter qps + ## @param common.eventServer.hostIdentifier.rateLimiter.burst ratelimiter burst + ## 用于设置推送主机身份请求gse的taskServer能力,起到限流的作用。qps的默认值为200, 代表每秒最多推送的主机数量,burst的默认值为200 + ## + rateLimiter: + qps: 200 + burst: 200 + ## @param common.eventServer.hostIdentifier.fileName host identifier file name + ## 下发主机身份文件名 + ## + fileName: "hostid" + ## 当下发主机为linux操作系统时,相关配置 + linux: + ## @param common.eventServer.hostIdentifier.linux.filePath host identifier linux filepath + ## 下发主机身份文件路径 + ## + filePath: "/var/lib/gse/host" + ## @param common.eventServer.hostIdentifier.linux.fileOwner host identifier linux file owner + ## 下发主机身份文件所有者 + ## + fileOwner: "root" + ## @param common.eventServer.hostIdentifier.linux.filePrivilege host identifier linux file privilege + ## 下发主机身份文件权限值 + ## + filePrivilege: 644 + ## 当下发主机为windows操作系统时,相关配置 + windows: + ## @param common.eventServer.hostIdentifier.windows.filePath host identifier windows file path + ## 下发主机身份文件路径 + ## + filePath: "c:/gse/data/host" + ## @param common.eventServer.hostIdentifier.windows.fileOwner host identifier windows file owner + ## 下发主机身份文件所有者 + ## + fileOwner: "root" + ## @param common.eventServer.hostIdentifier.windows.filePrivilege host identifier windows file privilege + ## 下发主机身份文件权限值 + ## + filePrivilege: 644 + + ## gse server config + ## + gse: + ## 调用gse的apiServer服务时相关配置 + apiServer: + ## @param common.gse.apiServer.endpoints the endpoints about gse api server + ## 此配置为数组类型,可配置连接gse的apiServer的多个host:port格式的值,去建立连接 + ## + endpoints: + - gse-api.example.com:59313 + ## @param common.gse.apiServer.insecureSkipVerify gse api server insecureSkipVerify config + ## @param common.gse.apiServer.certFile gse api server certFile + ## @param common.gse.apiServer.keyFile gse api server keyFile + ## @param common.gse.apiServer.caFile gse api server caFile + ## @param common.gse.apiServer.password gse api server password + ## 证书相关信息 + ## + insecureSkipVerify: true + certFile: "cmdb.cert" + keyFile: "cmdb.key" + caFile: "gseca.crt" + password: + ## 调用gse的taskServer服务时相关配置 + taskServer: + ## @param common.gse.taskServer.endpoints the endpoints about gse task server + ## 此配置为数组类型,可配置连接gse的taskServer的多个host:port格式的值,去建立连接 + ## + endpoints: + - gse-task.example.com:48673 + ## @param common.gse.apiServer.insecureSkipVerify gse task server insecureSkipVerify config + ## @param common.gse.apiServer.certFile gse task server certFile + ## @param common.gse.apiServer.keyFile gse task server keyFile + ## @param common.gse.apiServer.caFile gse task server caFile + ## @param common.gse.apiServer.password gse task server password + ## 证书相关信息 + ## + insecureSkipVerify: true + certFile: "cmdb.cert" + keyFile: "cmdb.key" + caFile: "gseca.crt" + password: + + ## host snapshot kafka parameters + ## + kafka: + ## @param common.kafka.groupID kafka group id + ## groupID为固定值,请勿随便修改,修改后会导致重复消费过去的数据 + ## + groupID: bk_cmdb_snapshot_group + ## @param common.kafka.partition kafka partition count + ## partition数量固定为1,保证消息的顺序性 + ## + partition: 1 + ## @param common.kafka.brokers kafka brokers config, the value is array type + ## + brokers: + ## @param common.kafka.brokers.user kafka user config + ## @param common.kafka.brokers.password kafka password config + ## 安全协议SASL_PLAINTEXT,SASL机制SCRAM-SHA-512的账号、密码信息 + ## + user: + password: + ## @param common.tls.insecureSkipVerify cmdb insecureSkipVerify config + ## @param common.tls.certFile cmdb certFile + ## @param common.tls.keyFile cmdb keyFile + ## @param common.tls.caFile cmdb caFile + ## @param common.tls.password cmdb password + ## cmdb证书相关信息 + ## + tls: + insecureSkipVerify: + certFile: + keyFile: + caFile: + password: + +## @section zookeeper parameters +## +zookeeper: + ## @param zookeeper.enabled Enable internal zookeeper + ## + enabled: true + ## @param zookeeper.persistence.size zookeeper persistence size + ## + persistence: + size: 10Gi + +## @section bk-cmdb config and service center parameters +## +# configAndServiceCenter: +# addr: + +## @section mongodb parameters +## +mongodb: + ## @param mongodb.enabled Enable internal mongodb + ## + enabled: true + ## @param mongodb.persistence.size mongodb persistence size + ## + persistence: + size: 10Gi + ## @param mongodb.architecture mongodb architecture + ## + architecture: replicaset + ## @param mongodb.replicaCount mongodb replica count + ## + replicaCount: 1 + ## @param mongodb.arbiter.enabled Enable mongodb arbiter + ## + arbiter: + enabled: false + ## @param mongodb.auth.enabled Enable mongodb authentication + ## @param mongodb.auth.username mongodb auth username + ## @param mongodb.auth.password mongodb auth password + ## @param mongodb.auth.database mongodb database + ## + auth: + enabled: true + username: cc + password: cc + database: cmdb + ## @param mongodb.host mongodb host + ## + host: mongodb-headless.default.svc.cluster.local + ## external mongodb parameters + ## + externalMongodb: + ## @param mongodb.externalMongodb.enabled Enable external mongodb + ## + enabled: true + ## @param mongodb.externalMongodb.usr mongodb auth username + ## + # usr: + ## @param mongodb.externalMongodb.pwd mongodb auth password + ## + # pwd: + ## @param mongodb.externalMongodb.database mongodb database + ## + database: cmdb + ## @param mongodb.externalMongodb.host mongodb host + ## + # host: + ## @param mongodb.externalMongodb.maxOpenConns mongodb max open connections + ## + maxOpenConns: 3000 + ## @param mongodb.externalMongodb.maxIdleConns mongodb max idle connections + ## + maxIdleConns: 100 + ## @param mongodb.externalMongodb.mechanism mongodb mechanism + ## + mechanism: SCRAM-SHA-1 + ## @param mongodb.externalMongodb.rsName mongodb replicaset name + ## + rsName: rs0 + ## @param mongodb.externalMongodb.socketTimeoutSeconds mongodb socket timeout + ## mongo的socket连接的超时时间,以秒为单位,默认10s,最小5s,最大30s。 + ## + socketTimeoutSeconds: 10 + ## external mongodb for event watch parameters + ## + watch: + ## @param mongodb.watch.usr mongodb auth username + ## + # usr: + ## @param mongodb.watch.pwd mongodb auth password + ## + # pwd: + ## @param mongodb.watch.database mongodb database + ## + database: cmdb + ## @param mongodb.watch.host mongodb host + ## + # host: + ## @param mongodb.watch.maxOpenConns mongodb max open connections + ## + maxOpenConns: 10 + ## @param mongodb.watch.maxIdleConns mongodb max idle connections + ## + maxIdleConns: 5 + ## @param mongodb.watch.mechanism mongodb mechanism + ## + mechanism: SCRAM-SHA-1 + ## @param mongodb.watch.rsName mongodb replicaset name + ## + rsName: rs0 + ## @param mongodb.watch.socketTimeoutSeconds mongodb socket timeout + ## mongo的socket连接的超时时间,以秒为单位,默认10s,最小5s,最大30s。 + ## + socketTimeoutSeconds: 10 + +## @section redis parameters +## +redis: + ## @param redis.enabled Enable internal redis + ## + enabled: true + ## @param redis.master.persistence.size redis master persistence size + ## + master: + persistence: + size: 10Gi + ## @param redis.architecture redis architecture + ## + architecture: standalone + ## @param redis.auth.enabled Enable redis authentication + ## @param redis.auth.password redis authentication password + auth: + enabled: true + password: blueking + ## external redis parameters + ## + redis: + ## @param redis.redis.host external redis host + ## + # host: + ## @param redis.redis.pwd external redis password + ## + # pwd: + ## @param redis.redis.database external redis database + ## + database: "0" + ## @param redis.redis.maxOpenConns external redis max open connections + ## + maxOpenConns: 3000 + ## @param redis.redis.maxIdleConns external redis max idle connections + ## + maxIdleConns: 100 + ## @param redis.redis.sentinelPwd external redis sentinel password + ## + sentinelPwd: + ## @param redis.redis.masterName external redis master name + ## + masterName: + ## external redis for host snapshot parameters + ## + snapshotRedis: + ## @param redis.snapshotRedis.host external redis host + ## + # host: + ## @param redis.snapshotRedis.pwd external redis password + ## + # pwd: + ## @param redis.snapshotRedis.database external redis database + ## + database: "0" + ## @param redis.snapshotRedis.maxOpenConns external redis max open connections + ## + maxOpenConns: 3000 + ## @param redis.snapshotRedis.maxIdleConns external redis max idle connections + ## + maxIdleConns: 100 + ## @param redis.redis.sentinelPwd external redis sentinel password + ## + sentinelPwd: + ## @param redis.redis.masterName external redis master name + ## + masterName: + ## external redis for discover parameters + ## + discoverRedis: + ## @param redis.discoverRedis.host external redis host + ## + # host: + ## @param redis.discoverRedis.pwd external redis password + ## + # pwd: + ## @param redis.discoverRedis.database external redis database + ## + database: "0" + ## @param redis.discoverRedis.maxOpenConns external redis max open connections + ## + maxOpenConns: 3000 + ## @param redis.discoverRedis.maxIdleConns external redis max idle connections + ## + maxIdleConns: 100 + ## @param redis.redis.sentinelPwd external redis sentinel password + ## + sentinelPwd: + ## @param redis.redis.masterName external redis master name + ## + masterName: + ## external redis for network device collecting parameters + ## + netCollectRedis: + ## @param redis.netCollectRedis.host external redis host + ## + # host: + ## @param redis.netCollectRedis.pwd external redis password + ## + # pwd: + ## @param redis.netCollectRedis.database external redis database + ## + database: "0" + ## @param redis.netCollectRedis.maxOpenConns external redis max open connections + ## + maxOpenConns: 3000 + ## @param redis.netCollectRedis.maxIdleConns external redis max idle connections + ## + maxIdleConns: 100 + ## @param redis.redis.sentinelPwd external redis sentinel password + ## + sentinelPwd: + ## @param redis.redis.masterName external redis master name + ## + masterName: + +## @section elasticsearch parameters +## +elasticsearch: + ## @param elasticsearch.enabled Enable elasticsearch + ## + enabled: false + ## @param elasticsearch.master.persistence.size elasticsearch master persistence size + ## @param elasticsearch.master.replicas elasticsearch master node replicas number + ## + master: + persistence: + size: 10Gi + replicas: 1 + ## @param elasticsearch.coordinating.replicas elasticsearch coordinating node replicas number + ## + coordinating: + replicas: 1 + ## @param elasticsearch.data.persistence.size elasticsearch data persistence size + ## @param elasticsearch.data.replicas elasticsearch data node replicas number + ## + data: + persistence: + size: 10Gi + replicas: 1 + +## @section monstache parameters +## +monstache: + ## @param monstache.enabled Enable monstache + ## + enabled: false + ## bk-cmdb monstache image parameters + ## @param monstache.image.repository monstache image repository + ## @param monstache.image.rag monstache image tag + ## + image: + repository: blueking/cmdb_monstache + tag: v1.0.0 + ## @param monstache.replicas Number of monstache replicas to deploy + ## + replicas: 1 + ## @param monstache.port monstache service HTTP port + ## + port: 80 + ## @param monstache.workDir monstache work directory + ## + workDir: /data/cmdb/monstache + ## @param monstache.configDir monstache config directory + ## + configDir: /data/cmdb/monstache/etc + ## @param monstache.directReadDynamicIncludeRegex monstache direct read dynamic include regex + ## + directReadDynamicIncludeRegex: cmdb.cc_ApplicationBase$|cc_SetBase$|cc_ModuleBase$|cmdb.cc_HostBase$|cmdb.cc_ObjDes$|cc_ObjAttDes$|cmdb.cc_ObjectBase_(.*)_pub_" + namespace-regex = "cmdb.cc_ApplicationBase$|cc_SetBase$|cc_ModuleBase$|cmdb.cc_HostBase$|cmdb.cc_ObjDes$|cc_ObjAttDes$|cmdb.cc_ObjectBase_(.*)_pub_ + ## @param monstache.mapperPluginPath monstache plugin path + ## + mapperPluginPath: /data/cmdb/monstache/monstache-plugin.so + ## @param monstache.elasticsearchShardNum elasticsearch sharding number + ## + elasticsearchShardNum: 1 + ## @param monstache.elasticsearchReplicaNum elasticsearch replicas number + ## + elasticsearchReplicaNum: 1 + ## @param podAnnotations Annotations for bk-panel pods + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + ## + podAnnotations: {} + ## @param affinity Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## NOTE: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set + ## + affinity: {} + ## @param nodeSelector Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + ## @param tolerations Tolerations for pod assignment + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + ## bk-cmdb containers' resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## @param resources.limits The resources limits for the bk-cmdb container + ## @param resources.requests [object] The requested resources for the bk-cmdb container + ## + resources: + limits: + cpu: 200m + memory: 1024Mi + requests: + memory: 512Mi + cpu: 200m + +## @section ServiceMonitor parameters +## +serviceMonitor: + ## @param serviceMonitor.enabled Creates a ServiceMonitor to monitor kube-state-metrics + ## + enabled: false + ## @param serviceMonitor.interval Scrape interval (use by default, falling back to Prometheus' default) + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint + ## + interval: "15s" + ## @param serviceMonitor.metricRelabelings ServiceMonitor metricRelabelings + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig + ## + metricRelabelings: [ ] + +## @section Blueking log collecting parameters +## +bkLogConfig: + ## @param bkLogConfig.file.enabled Enable container log file collecting + ## @param bkLogConfig.file.dataId Container log file collecting dataid + ## + file: + enabled: false + dataId: 1 + ## @param bkLogConfig.std.enabled Enable container std log collecting + ## @param bkLogConfig.std.dataId Container std log collecting dataid + ## + std: + enabled: false + dataId: 1 + +## @param certPath cert path. +## +certPath: "/data/cmdb/cert" + +## @section gse Certificate parameters +## +gseCert: + ## @param gseCert.ca the content of the gseca.crt from bk-gse + ## certificate package and encoded in base64 + ## + ca: "" + + ## @param gseCert.cmdbCert certificate to connect to gse + ## certificate package and encoded in base64 + ## + cmdbCert: "" + + ## @param gseCert.cmdbKey key to connect to gse + ## certificate package and encoded in base64 + ## + cmdbKey: "" \ No newline at end of file