apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-tubearchivist
  namespace: tubearchivist
  labels:
    app.kubernetes.io/name: elasticsearch-tubearchivist
    app.kubernetes.io/instance: tubearchivist
    app.kubernetes.io/part-of: tubearchivist
spec:
  version: 8.19.8
  auth:
    fileRealm:
      - secretName: tubearchivist-elasticsearch-secret
  nodeSets:
    - name: default
      count: 2
      config:
        node.store.allow_mmap: false
        path.repo: /usr/share/elasticsearch/data/snapshot
      podTemplate:
        spec:
          volumes:
            - name: tubearchivist-snapshot-nfs-storage
              nfs:
                path: /volume2/Storage/TubeArchivist
                server: synologybond.alexlebens.net
          containers:
            - name: elasticsearch
              volumeMounts:
                - name: tubearchivist-snapshot-nfs-storage
                  mountPath: /usr/share/elasticsearch/data/snapshot
      volumeClaimTemplates:
        - metadata:
            name: elasticsearch-data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi
            storageClassName: ceph-block
