apiVersion: v1
kind: ReplicationController
metadata:
  namespace: efk-logging
  name: es-master
  labels:
    component: elasticsearch
    role: master
spec:
  replicas: 1
  template:
    metadata:
      labels:
        component: elasticsearch
        role: master
    spec:
      containers:
      - name: es-master
        image: elasticsearch:5.2.2
        securityContext:
          capabilities:
            add:
              - IPC_LOCK
        args:
          - -Ecluster.name=k8s-es
          - -Enode.data=false
          - -Enode.ingest=false
          - -Ehttp.enabled=false
          - -Enetwork.host=_site_
          - -Ediscovery.zen.minimum_master_nodes=1
          - -Ediscovery.zen.ping.unicast.hosts=elasticsearch-discovery
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        ports:
        - containerPort: 9300
          name: transport
          protocol: TCP
        - containerPort: 9200
          name: http
          protocol: TCP
        #resources:
        #  limits:
        #    memory: 1.5Gi
        volumeMounts:
        - mountPath: /data
          name: storage
      volumes:
      - name: storage
        emptyDir: {}
