Skip to content

Commit 746c586

Browse files
author
Carlos Rodríguez Hernández
authored
[bitnami/elasticsearch] Simplify sysctl logic (#5685)
1 parent 2630349 commit 746c586

File tree

6 files changed

+20
-73
lines changed

6 files changed

+20
-73
lines changed

bitnami/elasticsearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ name: elasticsearch
2525
sources:
2626
- https://github.com/bitnami/bitnami-docker-elasticsearch
2727
- https://www.elastic.co/products/elasticsearch
28-
version: 14.3.1
28+
version: 14.4.0

bitnami/elasticsearch/templates/configmap-initcontainer.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

bitnami/elasticsearch/templates/coordinating-deploy.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,15 @@ spec:
6262
image: {{ include "elasticsearch.sysctl.image" . }}
6363
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
6464
command:
65-
- /scripts/sysctl.sh
65+
- /bin/bash
66+
- -ec
67+
- |
68+
sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536
6669
securityContext:
6770
privileged: true
6871
{{- if .Values.sysctlImage.resources }}
6972
resources: {{- toYaml .Values.sysctlImage.resources | nindent 12 }}
7073
{{- end }}
71-
volumeMounts:
72-
- name: initcontainer-script
73-
mountPath: /scripts/sysctl.sh
74-
subPath: sysctl.sh
7574
{{- end }}
7675
containers:
7776
- name: elasticsearch
@@ -168,12 +167,6 @@ spec:
168167
mountPath: /docker-entrypoint-initdb.d/init-scripts-secret
169168
{{- end }}
170169
volumes:
171-
{{- if .Values.sysctlImage.enabled }}
172-
- name: initcontainer-script
173-
configMap:
174-
name: {{ include "elasticsearch.fullname" . }}-initcontainer
175-
defaultMode: 0755
176-
{{- end }}
177170
{{- if .Values.config }}
178171
- name: config
179172
configMap:

bitnami/elasticsearch/templates/data-statefulset.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,15 @@ spec:
6868
image: {{ include "elasticsearch.sysctl.image" . }}
6969
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
7070
command:
71-
- /scripts/sysctl.sh
71+
- /bin/bash
72+
- -ec
73+
- |
74+
sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536
7275
securityContext:
7376
privileged: true
7477
{{- if .Values.sysctlImage.resources }}
7578
resources: {{- toYaml .Values.sysctlImage.resources | nindent 12 }}
7679
{{- end }}
77-
volumeMounts:
78-
- name: initcontainer-script
79-
mountPath: /scripts/sysctl.sh
80-
subPath: sysctl.sh
8180
{{- end }}
8281
{{- if and .Values.volumePermissions.enabled .Values.data.persistence.enabled }}
8382
- name: volume-permissions
@@ -197,12 +196,6 @@ spec:
197196
mountPath: /docker-entrypoint-initdb.d/init-scripts-secret
198197
{{- end }}
199198
volumes:
200-
{{- if .Values.sysctlImage.enabled }}
201-
- name: initcontainer-script
202-
configMap:
203-
name: {{ include "elasticsearch.fullname" . }}-initcontainer
204-
defaultMode: 0755
205-
{{- end }}
206199
{{- if .Values.config }}
207200
- name: "config"
208201
configMap:

bitnami/elasticsearch/templates/ingest-deploy.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ spec:
5757
image: {{ include "elasticsearch.sysctl.image" . }}
5858
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
5959
command:
60-
- /scripts/sysctl.sh
60+
- /bin/bash
61+
- -ec
62+
- |
63+
sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536
6164
securityContext:
6265
privileged: true
63-
volumeMounts:
64-
- name: initcontainer-script
65-
mountPath: /scripts/sysctl.sh
66-
subPath: sysctl.sh
66+
{{- if .Values.sysctlImage.resources }}
67+
resources: {{- toYaml .Values.sysctlImage.resources | nindent 12 }}
68+
{{- end }}
6769
{{- end }}
6870
containers:
6971
- name: elasticsearch
@@ -160,12 +162,6 @@ spec:
160162
mountPath: /docker-entrypoint-initdb.d/init-scripts-secret
161163
{{- end }}
162164
volumes:
163-
{{- if .Values.sysctlImage.enabled }}
164-
- name: initcontainer-script
165-
configMap:
166-
name: {{ include "elasticsearch.fullname" . }}-initcontainer
167-
defaultMode: 0755
168-
{{- end }}
169165
{{- if .Values.config }}
170166
- name: config
171167
configMap:

bitnami/elasticsearch/templates/master-statefulset.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,15 @@ spec:
6565
image: {{ include "elasticsearch.sysctl.image" . }}
6666
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
6767
command:
68-
- /scripts/sysctl.sh
68+
- /bin/bash
69+
- -ec
70+
- |
71+
sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536
6972
securityContext:
7073
privileged: true
7174
{{- if .Values.sysctlImage.resources }}
7275
resources: {{- toYaml .Values.sysctlImage.resources | nindent 12 }}
7376
{{- end }}
74-
volumeMounts:
75-
- name: initcontainer-script
76-
mountPath: /scripts/sysctl.sh
77-
subPath: sysctl.sh
7877
{{- end }}
7978
{{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }}
8079
- name: volume-permissions
@@ -200,12 +199,6 @@ spec:
200199
mountPath: /docker-entrypoint-initdb.d/init-scripts-secret
201200
{{- end }}
202201
volumes:
203-
{{- if .Values.sysctlImage.enabled }}
204-
- name: initcontainer-script
205-
configMap:
206-
name: {{ include "elasticsearch.fullname" . }}-initcontainer
207-
defaultMode: 0755
208-
{{- end }}
209202
{{- if .Values.config }}
210203
- name: config
211204
configMap:

0 commit comments

Comments
 (0)