promote initContainers to podspec (#1737)

This commit is contained in:
Dhilip
2017-08-16 11:56:56 +01:00
committed by Adnan Abdulhussein
parent 229ba80b28
commit 6291ea4953
5 changed files with 29 additions and 43 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
name: elasticsearch
home: https://www.elastic.co/products/elasticsearch
version: 0.1.8
version: 0.1.9
description: Flexible and powerful open source, distributed real-time search and analytics engine.
icon: https://static-www.elastic.co/assets/blteb1c97719574938d/logo-elastic-elasticsearch-lt.svg
sources:
+1 -1
View File
@@ -7,7 +7,7 @@ elasticsearch and their
## Prerequisites Details
* Kubernetes 1.5
* Kubernetes 1.6+
* PV dynamic provisioning support on the underlying infrastructure
## StatefulSets Details
@@ -16,20 +16,6 @@ spec:
app: {{ template "name" . }}
component: "{{ .Values.client.name }}"
release: {{ .Release.Name }}
annotations:
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "sysctl",
"image": "busybox",
"imagePullPolicy": "Always",
"command": ["sysctl", "-w", "vm.max_map_count=262144"],
"securityContext": {
"privileged": true
}
}
]'
spec:
serviceAccountName: {{ template "fullname" . }}
{{- if eq .Values.client.antiAffinity "hard" }}
@@ -55,6 +41,15 @@ spec:
release: "{{ .Release.Name }}"
component: "{{ .Values.client.name }}"
{{- end }}
initContainers:
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
- name: "sysctl"
image: "busybox"
imagePullPolicy: "Always"
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: elasticsearch
env:
@@ -19,19 +19,6 @@ spec:
release: {{ .Release.Name }}
annotations:
pod.alpha.kubernetes.io/initialized: "true"
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "sysctl",
"image": "busybox",
"imagePullPolicy": "Always",
"command": ["sysctl", "-w", "vm.max_map_count=262144"],
"securityContext": {
"privileged": true
}
}
]'
spec:
serviceAccountName: {{ template "fullname" . }}
{{- if eq .Values.data.antiAffinity "hard" }}
@@ -57,6 +44,15 @@ spec:
release: "{{ .Release.Name }}"
component: "{{ .Values.data.name }}"
{{- end }}
initContainers:
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
- name: "sysctl"
image: "busybox"
imagePullPolicy: "Always"
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: elasticsearch
env:
@@ -16,20 +16,6 @@ spec:
app: {{ template "name" . }}
component: "{{ .Values.master.name }}"
release: {{ .Release.Name }}
annotations:
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "sysctl",
"image": "busybox",
"imagePullPolicy": "Always",
"command": ["sysctl", "-w", "vm.max_map_count=262144"],
"securityContext": {
"privileged": true
}
}
]'
spec:
serviceAccountName: {{ template "fullname" . }}
{{- if eq .Values.master.antiAffinity "hard" }}
@@ -55,6 +41,15 @@ spec:
release: "{{ .Release.Name }}"
component: "{{ .Values.master.name }}"
{{- end }}
initContainers:
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
- name: "sysctl"
image: "busybox"
imagePullPolicy: "Always"
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: elasticsearch
env: