mirror of https://github.com/Mai-with-u/MaiBot.git
feat: helm chart新增配置,可选启用初始化容器自动安装默认插件功能
parent
56fd6f8ae8
commit
16059532d8
|
|
@ -62,6 +62,7 @@ spec:
|
|||
- mountPath: /MaiMBot/statistics
|
||||
name: statistics
|
||||
{{- end }}
|
||||
{{- if .Values.core.setup_default_plugins }}
|
||||
initContainers: # 用户插件目录存储在存储卷中,会在启动时覆盖掉容器的默认插件目录。此初始化容器用于默认插件更新后或麦麦首次启动时为用户自动安装默认插件到存储卷中
|
||||
- args:
|
||||
- setup-plugins.py
|
||||
|
|
@ -79,6 +80,7 @@ spec:
|
|||
name: scripts
|
||||
readOnly: true
|
||||
subPath: setup-plugins.py
|
||||
{{- end }}
|
||||
{{- if .Values.core.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.core.image.pullSecrets | nindent 8 }}
|
||||
|
|
@ -99,8 +101,10 @@ spec:
|
|||
items:
|
||||
- key: volume-linker.sh
|
||||
path: volume-linker.sh
|
||||
{{- if .Values.core.setup_default_plugins }}
|
||||
- key: setup-plugins.py
|
||||
path: setup-plugins.py
|
||||
{{- end }}
|
||||
name: {{ .Release.Name }}-maibot-scripts
|
||||
name: scripts
|
||||
- configMap:
|
||||
|
|
|
|||
|
|
@ -8,5 +8,7 @@ data:
|
|||
volume-linker.sh: |
|
||||
{{ .Files.Get "files/volume-linker.sh" | nindent 4 }}
|
||||
# core的初始化容器
|
||||
{{- if .Values.core.setup_default_plugins }}
|
||||
setup-plugins.py: |
|
||||
{{ .Files.Get "files/setup-plugins.py" | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ core:
|
|||
- ReadWriteOnce
|
||||
size: 10Gi
|
||||
|
||||
setup_default_plugins: true # 启用一个初始化容器,用于为用户自动安装默认插件到存储卷中
|
||||
|
||||
# 麦麦的运行统计看板配置
|
||||
# 麦麦每隔一段时间会自动输出html格式的运行统计报告,此统计报告可以作为静态网页访问
|
||||
# 此功能默认禁用。如果你认为报告可以被公开访问(报告包含联系人/群组名称、模型token花费信息等),则可以启用此功能
|
||||
|
|
|
|||
Loading…
Reference in New Issue