构建adapter-cm-generator的镜像,提升部署效率
This commit is contained in:
@@ -14,13 +14,9 @@ spec:
|
||||
serviceAccountName: {{ .Release.Name }}-maibot-adapter-cm-generator
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: python
|
||||
image: python:slim
|
||||
- name: adapter-cm-generator
|
||||
image: {{ .Values.adapter.cm_generator.image.repository }}:{{ .Values.adapter.cm_generator.image.tag }}
|
||||
workingDir: /app
|
||||
command:
|
||||
- sh
|
||||
args:
|
||||
- adapter-pip-installer.sh
|
||||
env:
|
||||
- name: PYTHONUNBUFFERED
|
||||
value: "1"
|
||||
@@ -32,21 +28,3 @@ spec:
|
||||
value: {{ .Release.Name }}
|
||||
- name: DATA_B64
|
||||
value: {{ .Values.config.adapter_config | b64enc }} # 将配置文件编码为base64,从环境变量注入
|
||||
volumeMounts:
|
||||
- mountPath: /app/adapter-pip-installer.sh
|
||||
name: scripts
|
||||
readOnly: true
|
||||
subPath: adapter-pip-installer.sh
|
||||
- mountPath: /app/adapter-cm-generator.py
|
||||
name: scripts
|
||||
readOnly: true
|
||||
subPath: adapter-cm-generator.py
|
||||
volumes:
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: {{ .Release.Name }}-maibot-scripts
|
||||
items:
|
||||
- key: adapter-pip-installer.sh
|
||||
path: adapter-pip-installer.sh
|
||||
- key: adapter-cm-generator.py
|
||||
path: adapter-cm-generator.py
|
||||
|
||||
@@ -4,12 +4,6 @@ metadata:
|
||||
name: {{ .Release.Name }}-maibot-scripts
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
# pre-install hook
|
||||
adapter-pip-installer.sh: |
|
||||
{{ .Files.Get "files/adapter-pip-installer.sh" | nindent 4 }}
|
||||
adapter-cm-generator.py: |
|
||||
{{ .Files.Get "files/adapter-cm-generator.py" | nindent 4 }}
|
||||
|
||||
# core
|
||||
volume-linker.sh: |
|
||||
{{ .Files.Get "files/volume-linker.sh" | nindent 4 }}
|
||||
|
||||
Reference in New Issue
Block a user