feat: 为helm chart兼容WebUI,添加禁止覆盖配置的选项
This commit is contained in:
@@ -58,5 +58,5 @@ spec:
|
||||
items:
|
||||
- key: config.toml
|
||||
path: config.toml
|
||||
name: {{ .Release.Name }}-maibot-adapter
|
||||
name: {{ .Release.Name }}-maibot-adapter-config
|
||||
name: config
|
||||
|
||||
12
helm-chart/templates/core/configmap-bot-config.yaml
Normal file
12
helm-chart/templates/core/configmap-bot-config.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- if or .Release.IsInstall .Values.config.enable_config_override }}
|
||||
# 渲染规则:
|
||||
# 初次安装,或配置了覆盖规则
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-core-bot-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
bot_config.toml: |
|
||||
{{ .Values.config.core_bot_config | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-core
|
||||
name: {{ .Release.Name }}-maibot-core-env-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
.env: |
|
||||
@@ -11,7 +11,3 @@ data:
|
||||
WEBUI_MODE=production
|
||||
WEBUI_HOST=0.0.0.0
|
||||
WEBUI_PORT=8001
|
||||
model_config.toml: |
|
||||
{{ .Values.config.core_model_config | nindent 4 }}
|
||||
bot_config.toml: |
|
||||
{{ .Values.config.core_bot_config | nindent 4 }}
|
||||
12
helm-chart/templates/core/configmap-model-config.yaml
Normal file
12
helm-chart/templates/core/configmap-model-config.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- if or .Release.IsInstall .Values.config.enable_config_override }}
|
||||
# 渲染规则:
|
||||
# 初次安装,或配置了覆盖规则
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-core-model-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
model_config.toml: |
|
||||
{{ .Values.config.core_model_config | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -56,16 +56,16 @@ spec:
|
||||
readOnly: true
|
||||
subPath: k8s-init.sh
|
||||
- mountPath: /MaiMBot/.env
|
||||
name: config
|
||||
name: env-config
|
||||
readOnly: true
|
||||
subPath: .env
|
||||
{{- if not .Values.core.webui.enabled }}
|
||||
- mountPath: /MaiMBot/config/model_config.toml
|
||||
name: config
|
||||
name: model-config
|
||||
readOnly: true
|
||||
subPath: model_config.toml
|
||||
- mountPath: /MaiMBot/config/bot_config.toml
|
||||
name: config
|
||||
name: bot-config
|
||||
readOnly: true
|
||||
subPath: bot_config.toml
|
||||
{{- end }}
|
||||
@@ -140,12 +140,20 @@ spec:
|
||||
items:
|
||||
- key: .env
|
||||
path: .env
|
||||
name: {{ .Release.Name }}-maibot-core-env-config
|
||||
name: env-config
|
||||
- configMap:
|
||||
items:
|
||||
- key: model_config.toml
|
||||
path: model_config.toml
|
||||
name: {{ .Release.Name }}-maibot-core-model-config
|
||||
name: model-config
|
||||
- configMap:
|
||||
items:
|
||||
- key: bot_config.toml
|
||||
path: bot_config.toml
|
||||
name: {{ .Release.Name }}-maibot-core
|
||||
name: config
|
||||
name: {{ .Release.Name }}-maibot-core-bot-config
|
||||
name: bot-config
|
||||
{{- if .Values.statistics_dashboard.enabled }}
|
||||
- name: statistics
|
||||
persistentVolumeClaim:
|
||||
|
||||
Reference in New Issue
Block a user