apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    role: logstash
  name: logstash
spec:
  replicas: 1
  selector:
    matchLabels:
        role: logstash
  template:
    metadata:
      labels:
        role: logstash
    spec:
      containers:
      - name: logstash
        image: docker.elastic.co/logstash/logstash:5.6.3
        env:
        - name: PATH_CONFIG
          value: "/usr/share/logstash/pipeline"
        - name: HTTP_HOST
          value: "0.0.0.0"
        - name: XPACK_MONITORING_ENABLED
          value: "false"
        - name: LS_JAVA_OPTS
          value: -Xmx256m -Xms256m
        ports:
        - containerPort: 5000
        volumeMounts:
        - name: config-volume
          mountPath: /usr/share/logstash/pipeline
      volumes:
        - name: config-volume
          configMap:
            name: logstash-config
