zammad-docker-compose/kubernetes/50_statefulset_elasticsearch.yaml

54 lines
1.5 KiB
YAML
Raw Normal View History

2017-10-24 13:57:42 +00:00
apiVersion: apps/v1beta1
kind: StatefulSet
2017-10-24 13:57:42 +00:00
metadata:
name: zammad-elasticsearch
namespace: zammad
labels:
app: elasticsearch
component: searchindex
2017-10-24 13:57:42 +00:00
spec:
serviceName: zammad-elasticsearch
2017-10-24 13:57:42 +00:00
replicas: 1
template:
metadata:
labels:
component: searchindex
app: elasticsearch
spec:
terminationGracePeriodSeconds: 10
volumes:
- name: zammad-elasticsearch
persistentVolumeClaim:
claimName: zammad-elasticsearch
initContainers:
2017-12-07 17:18:47 +00:00
- name: prepare-container
image: busybox
2017-12-07 17:18:47 +00:00
command: [ "sh", "-c", "sysctl -w vm.max_map_count=262144; chown -R 1000:1000 /usr/share/elasticsearch"]
securityContext:
2017-11-20 22:59:01 +00:00
privileged: true
2017-12-07 17:18:47 +00:00
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: zammad-elasticsearch
2017-10-24 13:57:42 +00:00
containers:
- name: zammad-elasticsearch
image: zammad/zammad-docker-compose:zammad-elasticsearch
2017-10-24 13:57:42 +00:00
ports:
- containerPort: 9200
name: elasticsearch
2017-10-24 13:57:42 +00:00
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