clusterName: "elasticsearch"
nodeGroup: "auth"
replicas: 1
image: "us.gcr.io/yourpath/elastic/elasticsearch"
imageTag: "7.17.10"
roles:
   master: "false"
   ingest: "true"
   data: "true"
   remote_cluster_client: "true"
   ml: "false"
esJavaOpts: "-Xmx16g -Xms16g"
resources:
  requests:
    cpu: 6
    memory: "24Gi"
  limits:
    cpu: 10
    memory: "24Gi"
volumeClaimTemplate:
  accessModes: [ "ReadWriteOnce" ]
  storageClassName: premium-rwo
  resources:
    requests:
      storage: 200Gi
esConfig: 
  elasticsearch.yml: |
      node.attr.env: auth
      xpack.monitoring.collection.enabled: false
      ingest.geoip.downloader.enabled: false
      indices.query.bool.max_clause_count: 100000
      indices.recovery.max_bytes_per_sec: 192mb
nodeAffinity:
  requiredDuringSchedulingIgnoredDuringExecution:
    nodeSelectorTerms:
      - matchExpressions:
        - key: cloud.google.com/gke-nodepool
          operator: In
          values:
            - elastic-auth-pool
lifecycle:
  postStart:
    exec:
      command:
        - bash
        - -c
        - |
          #!/bin/bash
          while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' http://localhost:9200)" != "200" ]]; do sleep 1; done
          curl -XPUT -H "Content-Type: application/json" --data '{"index_patterns": [".auth*", "auth*", "log", "nlp", "run","live*"],"settings" : {"index.routing.allocation.require.env": "auth","number_of_shards":1,"number_of_replicas":0}}' http://localhost:9200/_template/auth-template
          