github.com/replicatedhq/ship@v0.55.0/integration/unfork/elastic-stack/expected/overlays/ship/master-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: master
     8      heritage: Tiller
     9      release: elastic-stack
    10    name: elastic-stack-elasticsearch-master
    11  spec:
    12    replicas: 2
    13    template:
    14      metadata:
    15        annotations:
    16          checksum/config: 4f07b9e19327171c37a9c353906c75a1f454cd31c3dfc600a8882d6e36713c49
    17          checksum/secret: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    18        labels:
    19          role: null
    20      spec:
    21        $setElementOrder/containers:
    22        - name: elasticsearch
    23        $setElementOrder/initContainers:
    24        - name: increase-memory-limits
    25        containers:
    26        - $setElementOrder/env:
    27          - name: DISCOVERY_SERVICE
    28          - name: NODE_DATA
    29          - name: NODE_INGEST
    30          - name: ES_HEAP_SIZE
    31          - name: PROCESSORS
    32          - name: ES_JAVA_OPTS
    33          - name: MINIMUM_MASTER_NODES
    34          $setElementOrder/volumeMounts:
    35          - mountPath: /usr/share/elasticsearch/data
    36          - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
    37          - mountPath: /usr/share/elasticsearch/config/log4j2.properties
    38          env:
    39          - name: DISCOVERY_SERVICE
    40            value: elastic-stack-elasticsearch-master.default.svc.cluster.local
    41          - name: NODE_INGEST
    42            value: "false"
    43          - name: ES_HEAP_SIZE
    44            value: 512m
    45          - name: ES_JAVA_OPTS
    46            value: -Djava.net.preferIPv4Stack=true
    47          image: gcr.io/cos-containers/elasticsearch:5.4.2-xpack
    48          imagePullPolicy: Always
    49          name: elasticsearch
    50          readinessProbe:
    51            exec:
    52              command:
    53              - sh
    54              - -c
    55              - curl --request GET --silent --output /dev/null http://127.0.0.1:9200/_cluster/health?local=true
    56            httpGet: null
    57          volumeMounts:
    58          - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
    59            readOnly: true
    60          - mountPath: /usr/share/elasticsearch/config/log4j2.properties
    61            name: config
    62            readOnly: true
    63            subPath: log4j2.properties
    64        initContainers:
    65        - command:
    66          - sh
    67          - -c
    68          - |-
    69            # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
    70            # and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
    71            # and https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode
    72            sysctl -w vm.max_map_count=262144
    73            # To increase the ulimit
    74            # https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_notes_for_production_use_and_defaults
    75            ulimit -l unlimited
    76          image: busybox
    77          name: increase-memory-limits
    78          securityContext:
    79            privileged: true
    80        - $patch: delete
    81          name: chown
    82        - $patch: delete
    83          name: sysctl
    84        serviceAccountName: elastic-stack-elasticsearch
    85    updateStrategy: null