zammad-docker-compose/kubernetes/50_statefulset_elasticsearch.yaml
2017-12-07 18:18:47 +01:00

54 lines
1.5 KiB
YAML

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: zammad-elasticsearch
namespace: zammad
labels:
app: elasticsearch
component: searchindex
spec:
serviceName: zammad-elasticsearch
replicas: 1
template:
metadata:
labels:
component: searchindex
app: elasticsearch
spec:
terminationGracePeriodSeconds: 10
volumes:
- name: zammad-elasticsearch
persistentVolumeClaim:
claimName: zammad-elasticsearch
initContainers:
- name: prepare-container
image: busybox
command: [ "sh", "-c", "sysctl -w vm.max_map_count=262144; chown -R 1000:1000 /usr/share/elasticsearch"]
securityContext:
privileged: true
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: zammad-elasticsearch
containers:
- name: zammad-elasticsearch
image: zammad/zammad-docker-compose:zammad-elasticsearch
ports:
- containerPort: 9200
name: elasticsearch
imagePullPolicy: Always
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: zammad-elasticsearch
readinessProbe:
httpGet:
path: /_cluster/health?local=true
port: 9200
initialDelaySeconds: 60
periodSeconds: 10
livenessProbe:
httpGet:
path: /_cluster/health?local=true
port: 9200
initialDelaySeconds: 60
periodSeconds: 10