apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch
spec:
  selector:
    matchLabels:
      app: elasticsearch
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
      - name: elasticsearch
        image: divante/vue-storefront-elasticsearch:5.6.9
        env:
        - name: ES_JAVA_OPTS
          value: -Xms512m -Xmx512m
        - name: bootstrap.memory_lock
          value: "true"
        - name: discovery.type
          value: single-node
        securityContext:
          privileged: false
          capabilities:
            add:
              - IPC_LOCK
              - SYS_RESOURCE
        ports:
        - containerPort: 9200
        volumeMounts:
        - mountPath: /usr/share/elasticsearch/data
          name: data
      volumes:
      - name: data
        emptyDir: {}
