Skip to content

Instantly share code, notes, and snippets.

@mrballcb
Last active November 20, 2017 15:19
Show Gist options
  • Save mrballcb/db58d7da70e02a76d5222f39bdbf1c17 to your computer and use it in GitHub Desktop.
Save mrballcb/db58d7da70e02a76d5222f39bdbf1c17 to your computer and use it in GitHub Desktop.
ElasticSearch manual instantiation of container that runs index deletion cronjob
# The curator config file and index deletion action config are a configmap that gets mounted here.
# Test with:
# curator --config /etc/curator/curator.yml /etc/curator/delete_indices.yml --dry-run
# Execute with:
# curator --config /etc/curator/curator.yml /etc/curator/delete_indices.yml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: es-curator-manual
# namespace: foo
labels:
app: es-curator-manual
spec:
replicas: 1
template:
metadata:
labels:
app: es-curator-manual
spec:
containers:
- name: es-curator
image: imacube/es-curator:5-0
imagePullPolicy: IfNotPresent
# Cronjob executes this command:
# command: ["curator", "--config", "/etc/curator/curator.yml", "/etc/curator/delete_indices.yml"]
command: ["bash", "-c", "--"]
args: [ "trap : TERM INT; sleep infinity & wait" ]
volumeMounts:
- name: curator-config
mountPath: /etc/curator
volumes:
- name: curator-config
configMap:
name: es-curator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment