---

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: odfe-node1
  name: odfe-node1
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: odfe-node1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.network/odfe-net: "true"
        io.kompose.service: odfe-node1
    spec:
      containers:
        - env:
            - name: ES_JAVA_OPTS
              value: -Xms512m -Xmx512m
            - name: MAX_LOCKED_MEMORY
              value: unlimited
            - name: bootstrap.memory_lock
              value: "true"
            - name: cluster.name
              value: odfe-cluster
            - name: discovery.type
              value: single-node
            - name: node.name
              value: odfe-node1
          image: amazon/opendistro-for-elasticsearch:1.12.0
          name: odfe-node1
          ports:
            - containerPort: 9200
              name: elasticsearch
            - containerPort: 9600
              name: elastic-metrics
            - containerPort: 9300
              name: elastic-node
          volumeMounts:
            - mountPath: /usr/share/elasticsearch/data
              name: odfe-data1
      restartPolicy: Always
      volumes:
        - name: odfe-data1
          persistentVolumeClaim:
            claimName: odfe-data1
