apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.19.0 (f63a961c)
  creationTimestamp: null
  labels:
    io.kompose.service: capi-elasticsearch
  name: capi-elasticsearch
spec:
  type: NodePort
  ports:
  - name: '9200'
    port: 9200
    targetPort: 9200
  - name: '9300'
    port: 9300
    targetPort: 9300
  selector:
    service: elasticsearch
    stack: concierge-graphql
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    service: elasticsearch
    stack: concierge-graphql
  name: capi-elasticsearch
spec:
  replicas: 1
  selector:
    matchLabels:
      service: elasticsearch
      stack: concierge-graphql
  serviceName: capi-elasticsearch
  template:
    metadata:
      labels:
        service: elasticsearch
        stack: concierge-graphql
      name: capi-elasticsearch
    spec:
      #initContainers:
      #- image: elasticsearch:7.17.14
      #  name: install-plugins
      #  command:
      #    - bin/elasticsearch-plugin
      #    - install
      #    - repository-s3
      containers:
      - env: 
        - name: ES_JAVA_OPTS
          value: -Xmx2048m -Xms2048m
        - name: discovery.type
          value: single-node
        image: andyg42/elasticsearch-with-s3snap:7.17.14 
        name: capi-elasticsearch
        ports:
        - containerPort: 9200
        - containerPort: 9300
        volumeMounts:
        - mountPath: /usr/share/elasticsearch/data
          name: esdata
  volumeClaimTemplates:
      - metadata:
          name: esdata
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 80Gi

