Rename elasticsearch configmaps and provide config via toYaml
This brings the elasticsearch configmaps, volume and mount names inline with other charts by naming them after the service. This also moves the configuration for elasticsearch to the values file to bring it inline with other charts that do the same Change-Id: I61f7c740d830a9a0567f8b72a0f815a09407b90c
This commit is contained in:
parent
45ba95a2de
commit
9b32ba17f4
@ -20,7 +20,7 @@ limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
data:
|
||||
elasticsearch.sh: |
|
||||
{{ tuple "bin/_elasticsearch.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
@ -20,14 +20,14 @@ limitations under the License.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: elastic-etc
|
||||
name: elasticsearch-etc
|
||||
data:
|
||||
elasticsearch.yml: |+
|
||||
{{- tuple .Values.conf.elasticsearch "etc/_elasticsearch.yml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
||||
{{ toYaml .Values.conf.elasticsearch.config | indent 4 }}
|
||||
log4j2.properties: |+
|
||||
{{- tuple .Values.conf.elasticsearch "etc/_log4j2.properties.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
||||
action_file.yml: |-
|
||||
action_file.yml: |+
|
||||
{{ toYaml .Values.conf.curator.action_file | indent 4 }}
|
||||
config.yml: |-
|
||||
config.yml: |+
|
||||
{{ toYaml .Values.conf.curator.config | indent 4 }}
|
||||
{{- end }}
|
||||
|
@ -48,28 +48,28 @@ spec:
|
||||
volumeMounts:
|
||||
- name: pod-etc-curator
|
||||
mountPath: /etc/config
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/curator.sh
|
||||
subPath: curator.sh
|
||||
readOnly: true
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /etc/config/config.yml
|
||||
subPath: config.yml
|
||||
readOnly: true
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /etc/config/action_file.yml
|
||||
subPath: action_file.yml
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: pod-etc-curator
|
||||
emptyDir: {}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
name: elasticsearch-etc
|
||||
defaultMode: 0444
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -110,41 +110,41 @@ spec:
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "{{ .Values.conf.elasticsearch.env.java_opts }}"
|
||||
volumeMounts:
|
||||
- name: elastic-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.logs }}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.logs }}
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
subPath: elasticsearch.sh
|
||||
readOnly: true
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
mountPath: /usr/share/elasticsearch/config
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
|
||||
subPath: elasticsearch.yml
|
||||
readOnly: true
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/log4j2.properties
|
||||
subPath: log4j2.properties
|
||||
readOnly: true
|
||||
- name: storage
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.data }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.data }}
|
||||
{{ if .Values.storage.filesystem_repository.enabled }}
|
||||
- name: snapshots
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.repo }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.repo }}
|
||||
{{ end }}
|
||||
{{ if $mounts_elasticsearch.volumeMounts }}{{ toYaml $mounts_elasticsearch.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: elastic-logs
|
||||
- name: elasticsearch-logs
|
||||
emptyDir: {}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
emptyDir: {}
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
name: elasticsearch-etc
|
||||
defaultMode: 0444
|
||||
- name: storage
|
||||
emptyDir: {}
|
||||
|
@ -104,41 +104,41 @@ spec:
|
||||
- name: ES_JAVA_OPTS
|
||||
value: "{{ .Values.conf.elasticsearch.env.java_opts }}"
|
||||
volumeMounts:
|
||||
- name: elastic-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.logs }}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.logs }}
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
subPath: elasticsearch.sh
|
||||
readOnly: true
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
mountPath: /usr/share/elasticsearch/config
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
|
||||
subPath: elasticsearch.yml
|
||||
readOnly: true
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/log4j2.properties
|
||||
subPath: log4j2.properties
|
||||
readOnly: true
|
||||
- name: storage
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.data }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.data }}
|
||||
{{ if .Values.storage.filesystem_repository.enabled }}
|
||||
- name: snapshots
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.repo }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.repo }}
|
||||
{{ end }}
|
||||
{{ if $mounts_elasticsearch.volumeMounts }}{{ toYaml $mounts_elasticsearch.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: elastic-logs
|
||||
- name: elasticsearch-logs
|
||||
emptyDir: {}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
emptyDir: {}
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
name: elasticsearch-etc
|
||||
defaultMode: 0444
|
||||
- name: storage
|
||||
emptyDir: {}
|
||||
|
@ -1,43 +0,0 @@
|
||||
{{/*
|
||||
Copyright 2017 The Openstack-Helm Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
cluster:
|
||||
name: {{ .Values.conf.elasticsearch.cluster.name }}
|
||||
|
||||
node:
|
||||
master: ${NODE_MASTER}
|
||||
data: ${NODE_DATA}
|
||||
name: ${NODE_NAME}
|
||||
max_local_storage_nodes: {{ .Values.pod.replicas.data }}
|
||||
|
||||
network.host: {{ .Values.conf.elasticsearch.network.host }}
|
||||
|
||||
path:
|
||||
data: {{ .Values.conf.elasticsearch.path.data }}
|
||||
logs: {{ .Values.conf.elasticsearch.path.logs }}
|
||||
repo: {{ .Values.conf.elasticsearch.path.repo }}
|
||||
|
||||
bootstrap:
|
||||
memory_lock: {{ .Values.conf.elasticsearch.bootstrap.memory_lock }}
|
||||
|
||||
http:
|
||||
enabled: ${HTTP_ENABLE}
|
||||
compression: true
|
||||
|
||||
discovery:
|
||||
zen:
|
||||
ping.unicast.hosts: ${DISCOVERY_SERVICE}
|
||||
minimum_master_nodes: {{ .Values.conf.elasticsearch.zen.min_masters }}
|
@ -50,16 +50,16 @@ spec:
|
||||
command:
|
||||
- /tmp/image-repo-sync.sh
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/image-repo-sync.sh
|
||||
subPath: image-repo-sync.sh
|
||||
readOnly: true
|
||||
- name: docker-socket
|
||||
mountPath: /var/run/docker.sock
|
||||
volumes:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
- name: docker-socket
|
||||
hostPath:
|
||||
|
@ -49,17 +49,17 @@ spec:
|
||||
- name: REPO_TYPE
|
||||
value: {{ .Values.conf.elasticsearch.repository.type | quote }}
|
||||
- name: REPO_LOCATION
|
||||
value: {{ .Values.conf.elasticsearch.path.repo | quote }}
|
||||
value: {{ .Values.conf.elasticsearch.config.path.repo | quote }}
|
||||
command:
|
||||
- /tmp/register-repository.sh
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/register-repository.sh
|
||||
subPath: register-repository.sh
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
{{- end }}
|
||||
|
@ -35,13 +35,13 @@ spec:
|
||||
- name: ELASTICSEARCH_ENDPOINT
|
||||
value: {{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
|
||||
volumeMounts:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/helm-tests.sh
|
||||
subPath: helm-tests.sh
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
{{- end }}
|
||||
|
@ -101,41 +101,41 @@ spec:
|
||||
- name: DISCOVERY_SERVICE
|
||||
value: {{ tuple "elasticsearch" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
volumeMounts:
|
||||
- name: elastic-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.logs }}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-logs
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.logs }}
|
||||
- name: elasticsearch-bin
|
||||
mountPath: /tmp/elasticsearch.sh
|
||||
subPath: elasticsearch.sh
|
||||
readOnly: true
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
mountPath: /usr/share/elasticsearch/config
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
|
||||
subPath: elasticsearch.yml
|
||||
readOnly: true
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
mountPath: /usr/share/elasticsearch/config/log4j2.properties
|
||||
subPath: log4j2.properties
|
||||
readOnly: true
|
||||
{{ if .Values.storage.filesystem_repository.enabled }}
|
||||
- name: snapshots
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.repo }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.repo }}
|
||||
{{ end }}
|
||||
- name: storage
|
||||
mountPath: {{ .Values.conf.elasticsearch.path.data }}
|
||||
mountPath: {{ .Values.conf.elasticsearch.config.path.data }}
|
||||
{{ if $mounts_elasticsearch.volumeMounts }}{{ toYaml $mounts_elasticsearch.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: elastic-logs
|
||||
- name: elasticsearch-logs
|
||||
emptyDir: {}
|
||||
- name: elastic-bin
|
||||
- name: elasticsearch-bin
|
||||
configMap:
|
||||
name: elastic-bin
|
||||
name: elasticsearch-bin
|
||||
defaultMode: 0555
|
||||
- name: elastic-config
|
||||
- name: elasticsearch-config
|
||||
emptyDir: {}
|
||||
- name: elastic-etc
|
||||
- name: elasticsearch-etc
|
||||
configMap:
|
||||
name: elastic-etc
|
||||
name: elasticsearch-etc
|
||||
defaultMode: 0444
|
||||
{{ if .Values.storage.filesystem_repository.enabled }}
|
||||
- name: snapshots
|
||||
|
@ -224,24 +224,32 @@ conf:
|
||||
logformat: default
|
||||
blacklist: ['elasticsearch', 'urllib3']
|
||||
elasticsearch:
|
||||
override:
|
||||
prefix:
|
||||
append:
|
||||
config:
|
||||
bootstrap:
|
||||
memory_lock: true
|
||||
cluster:
|
||||
name: elasticsearch
|
||||
discovery:
|
||||
zen:
|
||||
ping.unicast.hosts: ${DISCOVERY_SERVICE}
|
||||
minimum_master_nodes: 2
|
||||
http:
|
||||
enabled: ${HTTP_ENABLE}
|
||||
compression: true
|
||||
network:
|
||||
host: 0.0.0.0
|
||||
node:
|
||||
master: ${NODE_MASTER}
|
||||
data: ${NODE_DATA}
|
||||
name: ${NODE_NAME}
|
||||
max_local_storage_nodes: 3
|
||||
path:
|
||||
data: /usr/share/elasticsearch/data
|
||||
logs: /usr/share/elasticsearch/logs
|
||||
repo: /usr/share/elasticsearch/repo
|
||||
repo: /var/lib/openstack-helm/elasticsearch
|
||||
repository:
|
||||
name: default_repo
|
||||
type: fs
|
||||
zen:
|
||||
min_masters: 2
|
||||
env:
|
||||
java_opts: "-Xms256m -Xmx256m"
|
||||
log4j2:
|
||||
|
Loading…
Reference in New Issue
Block a user