From fbe685ee636d1df4b3bace5ec706dec1dfcb5f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sun, 19 Nov 2017 10:22:32 +0100 Subject: [PATCH] added elasticsearch init container which sets sysctl vm.max_map_count --- kubernetes/51_statefulset_elasticsearch.yaml | 8 +++++++- kubernetes/Readme.md | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kubernetes/51_statefulset_elasticsearch.yaml b/kubernetes/51_statefulset_elasticsearch.yaml index 46f65db..d6e5f4b 100644 --- a/kubernetes/51_statefulset_elasticsearch.yaml +++ b/kubernetes/51_statefulset_elasticsearch.yaml @@ -20,6 +20,12 @@ spec: - name: zammad-elasticsearch persistentVolumeClaim: claimName: zammad-elasticsearch + initContainers: + - name: sysctl + image: busybox + command: ["sysctl", "-w", "vm.max_map_count=262144"] + securityContext: + privileged: true containers: - name: zammad-elasticsearch image: zammad/zammad-docker-compose:zammad-elasticsearch @@ -29,4 +35,4 @@ spec: imagePullPolicy: Always volumeMounts: - mountPath: /usr/share/elasticsearch/data - name: zammad-elasticsearch \ No newline at end of file + name: zammad-elasticsearch diff --git a/kubernetes/Readme.md b/kubernetes/Readme.md index 9d24b83..97697b6 100644 --- a/kubernetes/Readme.md +++ b/kubernetes/Readme.md @@ -17,9 +17,6 @@ * minikube start --memory=4096 --cpus=2 * minikube addons enable ingress * echo "$(minikube ip) zammad.example.com" | sudo tee -a /etc/hosts -* minikube ssh - * su - - * sysctl -w vm.max_map_count=262144 * kubectl apply -f . * minikube dashboard * switch to namespace "zammad"