diff --git a/dev-upgrade/elastic/elastic-dev.yaml b/dev-upgrade/elastic/elastic-dev.yaml index dda3601..2c1617e 100644 --- a/dev-upgrade/elastic/elastic-dev.yaml +++ b/dev-upgrade/elastic/elastic-dev.yaml @@ -88,9 +88,12 @@ spec: - name: init image: busybox imagePullPolicy: IfNotPresent - command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144"] + command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144;chown -R 1000:1000 /usr/share/elasticsearch/data"] securityContext: privileged: true + volumeMounts: + - name: elastic-dev + mountPath: /usr/share/elasticsearch/data containers: - name: elasticsearch image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0 diff --git a/dev-upgrade/elastic/elastic-release.yaml b/dev-upgrade/elastic/elastic-release.yaml index b67f445..93e17c4 100644 --- a/dev-upgrade/elastic/elastic-release.yaml +++ b/dev-upgrade/elastic/elastic-release.yaml @@ -88,9 +88,12 @@ spec: - name: init image: busybox imagePullPolicy: IfNotPresent - command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144"] + command: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144;chown -R 1000:1000 /usr/share/elasticsearch/data"] securityContext: privileged: true + volumeMounts: + - name: elastic-dev + mountPath: /usr/share/elasticsearch/data containers: - name: elasticsearch image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0 @@ -174,3 +177,4 @@ spec: clusterIP: None selector: app: elastic +