Commit eb90f3cf by 李辉02

feat(直接将/app/files/RevVideo /app/files/RevImages挂到主机上): ifs

parent 76dd12db
...@@ -19,20 +19,6 @@ spec: ...@@ -19,20 +19,6 @@ spec:
app: {{ .Chart.Name }} app: {{ .Chart.Name }}
spec: spec:
{{- include "app.imagePullSecrets" . | nindent 6 }} {{- include "app.imagePullSecrets" . | nindent 6 }}
initContainers:
- name: init-dirs
image: busybox:latest
command:
- sh
- -c
- |
{{- range $storage.initDirs }}
mkdir -p {{ $storage.mountPath }}/{{ . }}
{{- end }}
chmod -R 777 {{ $storage.mountPath }}
volumeMounts:
- name: app-files
mountPath: {{ $storage.mountPath }}
containers: containers:
- image: {{ .Values.global.app.imageUrl }}{{ .Chart.Name }}:{{ index .Values.global .Chart.Name "imageVersion" }} - image: {{ .Values.global.app.imageUrl }}{{ .Chart.Name }}:{{ index .Values.global .Chart.Name "imageVersion" }}
name: {{ .Chart.Name }} name: {{ .Chart.Name }}
...@@ -46,10 +32,14 @@ spec: ...@@ -46,10 +32,14 @@ spec:
resources: resources:
{{- include "app.resources" . | nindent 12 }} {{- include "app.resources" . | nindent 12 }}
volumeMounts: volumeMounts:
- name: app-files {{- range $storage.volumes }}
mountPath: {{ $storage.mountPath }} - name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
volumes: volumes:
- name: app-files {{- range $storage.volumes }}
- name: {{ .name }}
hostPath: hostPath:
path: {{ $storage.hostPath }} path: {{ .hostPath }}
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }}
...@@ -26,11 +26,12 @@ global: ...@@ -26,11 +26,12 @@ global:
charset: "utf8" charset: "utf8"
sslmode: "none" sslmode: "none"
allowUserVariables: "true" allowUserVariables: "true"
# 存储配置 - 用于 /app/files/RevVideo/ 等目录 # 存储配置 - 直接挂载宿主机目录
storage: storage:
mountPath: "/app/files" volumes:
hostPath: "/data/commander-ifs/files" # 宿主机目录 - name: rev-video
# 需要初始化创建的子目录列表 mountPath: "/app/files/RevVideo"
initDirs: hostPath: "/data/commander-ifs/RevVideo"
- RevVideo - name: rev-images
- RevImages mountPath: "/app/files/RevImages"
hostPath: "/data/commander-ifs/RevImages"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment