github.com/replicatedhq/ship@v0.55.0/integration/unfork/elastic-stack/expected/overlays/ship/data-statefulset.yaml (about) 1 apiVersion: apps/v1beta1 2 kind: StatefulSet 3 metadata: 4 labels: 5 app: elasticsearch 6 chart: elasticsearch-1.16.0 7 component: data 8 heritage: Tiller 9 release: elastic-stack 10 name: elastic-stack-elasticsearch-data 11 spec: 12 template: 13 metadata: 14 annotations: 15 checksum/config: 4f07b9e19327171c37a9c353906c75a1f454cd31c3dfc600a8882d6e36713c49 16 checksum/secret: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 17 labels: 18 role: null 19 spec: 20 $setElementOrder/containers: 21 - name: elasticsearch 22 $setElementOrder/initContainers: 23 - name: increase-memory-limits 24 containers: 25 - $setElementOrder/env: 26 - name: DISCOVERY_SERVICE 27 - name: NODE_MASTER 28 - name: PROCESSORS 29 - name: ES_HEAP_SIZE 30 - name: ES_JAVA_OPTS 31 - name: MINIMUM_MASTER_NODES 32 $setElementOrder/volumeMounts: 33 - mountPath: /usr/share/elasticsearch/data 34 - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml 35 - mountPath: /usr/share/elasticsearch/config/log4j2.properties 36 - mountPath: /pre-stop-hook.sh 37 env: 38 - name: DISCOVERY_SERVICE 39 value: elastic-stack-elasticsearch-master.default.svc.cluster.local 40 - name: ES_HEAP_SIZE 41 value: 1536m 42 - name: ES_JAVA_OPTS 43 value: -Djava.net.preferIPv4Stack=true 44 image: gcr.io/cos-containers/elasticsearch:5.4.2-xpack 45 imagePullPolicy: Always 46 lifecycle: 47 postStart: null 48 name: elasticsearch 49 readinessProbe: 50 exec: 51 command: 52 - sh 53 - -c 54 - curl --request GET --silent --output /dev/null http://127.0.0.1:9200/_cluster/health?local=true 55 httpGet: null 56 volumeMounts: 57 - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml 58 readOnly: true 59 - mountPath: /usr/share/elasticsearch/config/log4j2.properties 60 name: config 61 readOnly: true 62 subPath: log4j2.properties 63 - $patch: delete 64 mountPath: /post-start-hook.sh 65 initContainers: 66 - command: 67 - sh 68 - -c 69 - |- 70 # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html 71 # and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall 72 # and https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode 73 sysctl -w vm.max_map_count=262144 74 # To increase the ulimit 75 # https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_notes_for_production_use_and_defaults 76 ulimit -l unlimited 77 image: busybox 78 name: increase-memory-limits 79 securityContext: 80 privileged: true 81 - $patch: delete 82 name: chown 83 - $patch: delete 84 name: sysctl 85 serviceAccountName: elastic-stack-elasticsearch 86 updateStrategy: null 87 volumeClaimTemplates: 88 - metadata: 89 name: data 90 spec: 91 accessModes: 92 - ReadWriteOnce 93 resources: 94 requests: 95 storage: 4Gi