ElasticSearch chart cleanup
Updating ElasticSearch chart so that it is consistent with the charts from openstack-helm repository. Change-Id: Ife5004abf539cfeb5df34e922db984cdba3d0885 Signed-off-by: Mateusz Blaszkowski <mateusz.blaszkowski@intel.com>
This commit is contained in:
parent
fa0a64c6aa
commit
8d4f14995c
|
@ -14,30 +14,27 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: elasticsearch-client
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: client
|
||||
spec:
|
||||
replicas: {{ .Values.replicas.client }}
|
||||
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
|
||||
strategy:
|
||||
type: {{ .Values.upgrades.pod_replacement_strategy }}
|
||||
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
|
||||
rollingUpdate:
|
||||
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
|
||||
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
|
||||
{{ end }}
|
||||
replicas: {{ .Values.pod.replicas.client }}
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: client
|
||||
{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
annotations:
|
||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
spec:
|
||||
affinity:
|
||||
{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||
serviceAccount: elasticsearch
|
||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.client.timeout | default "600" }}
|
||||
initContainers:
|
||||
- name: memory-map-increase
|
||||
securityContext:
|
||||
|
@ -57,15 +54,7 @@ spec:
|
|||
- SYS_RESOURCE
|
||||
image: {{ .Values.images.elasticsearch }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ if .Values.resources.enabled }}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ .Values.resources.client.limits.cpu | quote }}
|
||||
memory: {{ .Values.resources.client.limits.memory | quote }}
|
||||
requests:
|
||||
cpu: {{ .Values.resources.client.requests.cpu | quote }}
|
||||
memory: {{ .Values.resources.client.requests.memory | quote }}
|
||||
{{ end }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
|
||||
command:
|
||||
- /tmp/elasticsearch.sh
|
||||
- start
|
||||
|
@ -91,16 +80,14 @@ spec:
|
|||
- name: HTTP_ENABLE
|
||||
value: "true"
|
||||
- name: DISCOVERY_SERVICE
|
||||
value: "elasticsearch-discovery"
|
||||
value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
value: "{{ .Values.conf.elasticsearch.env.java_opts }}"
|
||||
ports:
|
||||
- containerPort: {{ .Values.network.client.port }}
|
||||
name: {{ .Values.network.client.name }}
|
||||
protocol: {{ .Values.network.client.proto }}
|
||||
- containerPort: {{ .Values.network.discovery.port }}
|
||||
name: {{ .Values.network.discovery.name }}
|
||||
protocol: {{ .Values.network.discovery.proto }}
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
|
@ -128,5 +115,6 @@ spec:
|
|||
- name: elastic-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
defaultMode: 0444
|
||||
- name: storage
|
||||
emptyDir: {}
|
||||
|
|
|
@ -14,30 +14,27 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: elasticsearch-master
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: master
|
||||
spec:
|
||||
replicas: {{ .Values.replicas.master }}
|
||||
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
|
||||
strategy:
|
||||
type: {{ .Values.upgrades.pod_replacement_strategy }}
|
||||
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
|
||||
rollingUpdate:
|
||||
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
|
||||
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
|
||||
{{ end }}
|
||||
replicas: {{ .Values.pod.replicas.master }}
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: master
|
||||
{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
annotations:
|
||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
spec:
|
||||
affinity:
|
||||
{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||
serviceAccount: elasticsearch
|
||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.master.timeout | default "600" }}
|
||||
initContainers:
|
||||
- name: memory-map-increase
|
||||
securityContext:
|
||||
|
@ -57,15 +54,7 @@ spec:
|
|||
- SYS_RESOURCE
|
||||
image: {{ .Values.images.elasticsearch }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ if .Values.resources.enabled }}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ .Values.resources.master.limits.cpu | quote }}
|
||||
memory: {{ .Values.resources.master.limits.memory | quote }}
|
||||
requests:
|
||||
cpu: {{ .Values.resources.master.requests.cpu | quote }}
|
||||
memory: {{ .Values.resources.master.requests.memory | quote }}
|
||||
{{ end }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.master | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
|
||||
command:
|
||||
- /tmp/elasticsearch.sh
|
||||
- start
|
||||
|
@ -93,13 +82,12 @@ spec:
|
|||
- name: HTTP_ENABLE
|
||||
value: "false"
|
||||
- name: DISCOVERY_SERVICE
|
||||
value: "elasticsearch-discovery"
|
||||
value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
value: "{{ .Values.conf.elasticsearch.env.java_opts }}"
|
||||
ports:
|
||||
- containerPort: {{ .Values.network.discovery.port }}
|
||||
name: {{ .Values.network.discovery.name }}
|
||||
protocol: {{ .Values.network.discovery.proto }}
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
|
@ -127,5 +115,6 @@ spec:
|
|||
- name: elastic-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
defaultMode: 0444
|
||||
- name: storage
|
||||
emptyDir: {}
|
||||
|
|
|
@ -14,17 +14,21 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch-data
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: data
|
||||
name: {{ tuple "logging_db" "data" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
spec:
|
||||
selector:
|
||||
component: elasticsearch
|
||||
role: data
|
||||
ports:
|
||||
- port: {{ .Values.network.data.port }}
|
||||
name: transport
|
||||
{{- if .Values.network.data.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.data.node_port.port }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
{{- if .Values.network.data.node_port.enabled }}
|
||||
type: NodePort
|
||||
{{- end }}
|
|
@ -14,17 +14,21 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch-discovery
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: master
|
||||
name: {{ tuple "logging_db" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
spec:
|
||||
selector:
|
||||
component: elasticsearch
|
||||
role: master
|
||||
ports:
|
||||
- name: transport
|
||||
port: {{ .Values.network.discovery.port }}
|
||||
{{- if .Values.network.discovery.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.discovery.node_port.port }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
{{- if .Values.network.discovery.node_port.enabled }}
|
||||
type: NodePort
|
||||
{{- end }}
|
|
@ -14,17 +14,21 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch-logging
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: client
|
||||
name: {{ tuple "logging_db" "default" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
spec:
|
||||
selector:
|
||||
component: elasticsearch
|
||||
role: client
|
||||
ports:
|
||||
- name: {{ .Values.network.client.name }}
|
||||
port: {{ .Values.network.client.port }}
|
||||
{{- if .Values.network.client.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.client.node_port.port }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
{{- if .Values.network.client.node_port.enabled }}
|
||||
type: NodePort
|
||||
{{- end }}
|
|
@ -14,29 +14,31 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: elasticsearch-data
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: data
|
||||
spec:
|
||||
serviceName: elasticsearch-data
|
||||
replicas: {{ .Values.replicas.data }}
|
||||
replicas: {{ .Values.pod.replicas.data }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: elasticsearch
|
||||
role: data
|
||||
{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
spec:
|
||||
affinity:
|
||||
{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||
serviceAccount: elasticsearch
|
||||
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.data.timeout | default "600" }}
|
||||
initContainers:
|
||||
- name: memory-map-increase
|
||||
securityContext:
|
||||
privileged: true
|
||||
image: {{ .Values.images.memory_init }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
|
||||
command:
|
||||
- sysctl
|
||||
- -w
|
||||
|
@ -75,13 +77,12 @@ spec:
|
|||
- name: HTTP_ENABLE
|
||||
value: "false"
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
value: "{{ .Values.conf.elasticsearch.env.java_opts }}"
|
||||
- name: DISCOVERY_SERVICE
|
||||
value: "elasticsearch-discovery"
|
||||
value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.network.data.port }}
|
||||
name: {{ .Values.network.data.name }}
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
|
@ -109,6 +110,7 @@ spec:
|
|||
- name: elastic-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
defaultMode: 0444
|
||||
- name: storage
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.pvc.name }}
|
||||
|
|
|
@ -33,6 +33,8 @@ conf:
|
|||
logs: /var/lib/elasticsearch/data
|
||||
zen:
|
||||
min_masters: 2
|
||||
env:
|
||||
java_opts: "-Xms256m -Xmx256m"
|
||||
logging:
|
||||
override:
|
||||
prefix:
|
||||
|
@ -42,7 +44,9 @@ endpoints:
|
|||
logging_db:
|
||||
name: elasticsearch
|
||||
hosts:
|
||||
data: elasticsearch-data
|
||||
default: elasticsearch-logging
|
||||
discovery: elasticsearch-discovery
|
||||
public: elasticsearch
|
||||
path:
|
||||
default: null
|
||||
|
@ -52,48 +56,78 @@ endpoints:
|
|||
api:
|
||||
default: 9200
|
||||
|
||||
replicas:
|
||||
master: 3
|
||||
data: 3
|
||||
client: 2
|
||||
|
||||
images:
|
||||
memory_init: docker.io/kolla/ubuntu-source-elasticsearch:4.0.0
|
||||
elasticsearch: docker.io/kolla/ubuntu-source-elasticsearch:4.0.0
|
||||
helm_tests: docker.io/kolla/ubuntu-source-elasticsearch:4.0.0
|
||||
pull_policy: "IfNotPresent"
|
||||
|
||||
pod:
|
||||
affinity:
|
||||
anti:
|
||||
type:
|
||||
default: preferredDuringSchedulingIgnoredDuringExecution
|
||||
topologyKey:
|
||||
default: kubernetes.io/hostname
|
||||
replicas:
|
||||
master: 3
|
||||
data: 3
|
||||
client: 2
|
||||
lifecycle:
|
||||
upgrades:
|
||||
deployments:
|
||||
revision_history: 3
|
||||
pod_replacement_strategy: RollingUpdate
|
||||
rolling_update:
|
||||
max_unavailable: 1
|
||||
max_surge: 3
|
||||
termination_grace_period:
|
||||
master:
|
||||
timeout: 600
|
||||
data:
|
||||
timeout: 600
|
||||
client:
|
||||
timeout: 600
|
||||
resources:
|
||||
enabled: false
|
||||
client:
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
master:
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
data:
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
|
||||
network:
|
||||
client:
|
||||
port: 9200
|
||||
node_port:
|
||||
enabled: false
|
||||
port: 30920
|
||||
discovery:
|
||||
port: 9300
|
||||
node_port:
|
||||
enabled: false
|
||||
port: 30930
|
||||
data:
|
||||
port: 9300
|
||||
|
||||
upgrades:
|
||||
revision_history: 3
|
||||
pod_replacement_strategy: RollingUpdate
|
||||
rolling_update:
|
||||
max_unavailable: 1
|
||||
max_surge: 3
|
||||
|
||||
resources:
|
||||
enabled: false
|
||||
client:
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
master:
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
node_port:
|
||||
enabled: false
|
||||
port: 30931
|
||||
|
||||
pvc:
|
||||
name: pvc-elastic
|
||||
|
|
Loading…
Reference in New Issue