apiVersion: v1
kind: ReplicationController
metadata:
  name: es-snapshot-v0.2.1
  labels:
    component: es-snapshot
    version: v0.2.1
spec:
  selector:
    component: es-snapshot
    version: v0.2.1
  template:
    metadata:
      labels:
        component: es-snapshot
        version: v0.2.1
    spec:
      containers:
      - name: es-snapshot
        image: samnco/es-snapshot:v0.2.1
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: "50m"
            memory: "32Mi"
          limits:
            cpu: "100m"
            memory: "128Mi"
        env:
        - name: ES_SNAPSHOT_NAME
          value: "es-s3-backup"
        - name: ES_HOST
          value: localhost
        - name: ES_PORT
          value: "9200"
        - name: PATTERN
          value: logstash
        - name: LOG_FILE
          value: /var/log/es-backup.log
        - name: RETENTION
          value: "7"
        volumeMounts:
        - mountPath: /var/log
          name: var-log
      volumes:
          - emptyDir:
              medium: ""
            name: "var-log"
