Commit 76dd12db by 李辉02

feat(使用hostPath挂载文件): ifs

parent 18ccba76
{{- define "app.resources" -}} {{- define "app.resources" -}}
requests: requests:
memory: "400Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "512Mi" memory: "256Mi"
cpu: "500m" cpu: "350m"
{{- end -}} {{- end -}}
......
...@@ -50,5 +50,6 @@ spec: ...@@ -50,5 +50,6 @@ spec:
mountPath: {{ $storage.mountPath }} mountPath: {{ $storage.mountPath }}
volumes: volumes:
- name: app-files - name: app-files
persistentVolumeClaim: hostPath:
claimName: {{ .Chart.Name }}-pvc path: {{ $storage.hostPath }}
type: DirectoryOrCreate
{{- $storage := (index .Values.global .Chart.Name "storage") }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Chart.Name }}-pvc
namespace: {{ .Values.global.app.namespace }}
labels:
app: {{ .Chart.Name }}
spec:
accessModes:
- {{ $storage.accessMode | default "ReadWriteOnce" }}
resources:
requests:
storage: {{ $storage.size | quote }}
storageClassName: {{ $storage.storageClassName | quote }}
...@@ -28,8 +28,8 @@ global: ...@@ -28,8 +28,8 @@ global:
allowUserVariables: "true" allowUserVariables: "true"
# 存储配置 - 用于 /app/files/RevVideo/ 等目录 # 存储配置 - 用于 /app/files/RevVideo/ 等目录
storage: storage:
size: "20Gi"
mountPath: "/app/files" mountPath: "/app/files"
hostPath: "/data/commander-ifs/files" # 宿主机目录
# 需要初始化创建的子目录列表 # 需要初始化创建的子目录列表
initDirs: initDirs:
- RevVideo - RevVideo
......
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