From e55402c12e85d3a017943a76755ca8b5d7c97223 Mon Sep 17 00:00:00 2001 From: liaozan <378024053@qq.com> Date: Tue, 20 Sep 2022 15:40:53 +0800 Subject: [PATCH] Add volume folder for pod to save persistent data --- k8s-deploy-template.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index b25bf5f..e57729c 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -61,4 +61,12 @@ spec: scheme: HTTP path: /actuator/health/readiness port: 1024 - periodSeconds: 10 \ No newline at end of file + periodSeconds: 10 + volumeMounts: + - name: ${APP_NAME}-volume + mountPath: / + volumes: + name: ${APP_NAME}-volume + hostPath: + path: /data/share/pod/data/${APP_NAME} + type: DirectoryOrCreate \ No newline at end of file -- GitLab