Skip to content

Commit

Permalink
rename delete-es to purge-es in cronjob (#126)
Browse files Browse the repository at this point in the history
* rename from delete-es to purge-es

Signed-off-by: “ponsAoki” <“aokishogo20pk@gmail.com”>

* rename ConfigMap delete-index-script to purge-index-script

Signed-off-by: “ponsAoki” <“aokishogo20pk@gmail.com”>

---------

Signed-off-by: “ponsAoki” <“aokishogo20pk@gmail.com”>
  • Loading branch information
ponsAoki authored Jul 1, 2024
1 parent dee688d commit f31ad5b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: delete-es-index
name: purge-es-index
namespace: {{ .Values.namespace }}
spec:
schedule: "{{ .Values.esCleanSchedule }}"
Expand All @@ -10,14 +10,14 @@ spec:
template:
spec:
containers:
- name: delete-es-index
- name: purge-es-index
image: {{ .Values.lunettesImage }}
command:
- /bin/bash
- -c
- |
# 这里直接执行ConfigMap中的脚本
/scripts/delete_index.sh es-cluster-svc.{{ .Values.namespace }}:9200 \
/scripts/purge_index.sh es-cluster-svc.{{ .Values.namespace }}:9200 \
${{ .Values.esDataKeepDays }} \
audit_{{ .Values.cluster }}:@timestamp \
slo_trace_data_daily:CreatedTime \
Expand All @@ -33,17 +33,17 @@ spec:
volumes:
- name: script-volume
configMap:
name: delete-index-script
name: purge-index-script
defaultMode: 0744 # 为脚本文件设置执行权限
restartPolicy: OnFailure
---
apiVersion: v1
kind: ConfigMap
metadata:
name: delete-index-script
name: purge-index-script
namespace: {{ .Values.namespace }}
data:
delete_index.sh: |
purge_index.sh: |
#!/bin/bash
# 参数检查
Expand Down

0 comments on commit f31ad5b

Please sign in to comment.