summaryrefslogtreecommitdiff
path: root/contrib/k8s-emc/elasticsearch-statefulset.yml
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/k8s-emc/elasticsearch-statefulset.yml')
-rw-r--r--contrib/k8s-emc/elasticsearch-statefulset.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/contrib/k8s-emc/elasticsearch-statefulset.yml b/contrib/k8s-emc/elasticsearch-statefulset.yml
new file mode 100644
index 0000000..4bd73b9
--- /dev/null
+++ b/contrib/k8s-emc/elasticsearch-statefulset.yml
@@ -0,0 +1,53 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ namespace: emc
+ name: es-stats
+ labels:
+ app: elasticsearch
+ tier: stats
+spec:
+ serviceName: es-stats
+ replicas: 1
+ selector:
+ matchLabels:
+ app: elasticsearch
+ tier: stats
+ updateStrategy:
+ type: RollingUpdate
+ template:
+ metadata:
+ labels:
+ app: elasticsearch
+ tier: stats
+ spec:
+ nodeName: emc-stats
+ securityContext:
+ runAsUser: 998
+ fsGroup: 998
+ containers:
+ - name: elasticsearch
+ image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.1
+ imagePullPolicy: Always
+ resources:
+ limits:
+ memory: 3072Mi
+ requests:
+ memory: 2048Mi
+ env:
+ - name: ES_JAVA_OPTS
+ value: "-Xms1536m -Xmx1536m"
+ - name: cluster.name
+ value: emc-stats
+ - name: node.name
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ volumeMounts:
+ - name: es-data
+ mountPath: /usr/share/elasticsearch/data
+ volumes:
+ - name: es-data
+ hostPath:
+ type: DirectoryOrCreate
+ path: /srv/stats/elasticsearch