From fa6773a8d400d0f11b5e6c5b9f13153eb4cc3c78 Mon Sep 17 00:00:00 2001 From: johnson684 Date: Thu, 28 Sep 2023 09:28:54 +0000 Subject: [PATCH] make cache delete pod disappear from kubcetl --- buildup.sh | 4 ++-- yamls/cache-deleter-disk.yaml | 3 ++- yamls/cache-deleter.yaml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/buildup.sh b/buildup.sh index 0747c2a..80cfcd5 100755 --- a/buildup.sh +++ b/buildup.sh @@ -45,14 +45,14 @@ kubectl apply -f yamls/pv-disk.yaml kubectl apply -f yamls/pvc-disk.yaml # memory storage -kubectl delete -f yamls/apps.yaml +# kubectl delete -f yamls/apps.yaml kubectl delete -f yamls/new-apps.yaml kubectl delete -f yamls/manager.yaml kubectl delete -f yamls/data-serve.yaml kubectl delete -f yamls/cache-deleter.yaml -kubectl apply -f yamls/apps.yaml +# kubectl apply -f yamls/apps.yaml kubectl apply -f yamls/new-apps.yaml kubectl apply -f yamls/manager.yaml kubectl apply -f yamls/data-serve.yaml diff --git a/yamls/cache-deleter-disk.yaml b/yamls/cache-deleter-disk.yaml index 6358e7a..cc70ec1 100644 --- a/yamls/cache-deleter-disk.yaml +++ b/yamls/cache-deleter-disk.yaml @@ -3,7 +3,8 @@ kind: CronJob metadata: name: cache-deleter-disk spec: - schedule: "*/1 * * * *" + schedule: "* * * * */1" + successfulJobsHistoryLimit: 0 jobTemplate: spec: template: diff --git a/yamls/cache-deleter.yaml b/yamls/cache-deleter.yaml index a9670ce..28b5d6a 100644 --- a/yamls/cache-deleter.yaml +++ b/yamls/cache-deleter.yaml @@ -4,6 +4,7 @@ metadata: name: cache-deleter spec: schedule: "* * * * */1" + successfulJobsHistoryLimit: 0 jobTemplate: spec: template: