mirror of
https://github.com/bitnami/charts.git
synced 2026-03-09 15:38:00 +08:00
[bitnami/elasticsearch] use common template helpers (#5707)
Co-authored-by: Yevgeny Zegzhda <yevgeny.zegzhda@team.wrike.com>
This commit is contained in:
@@ -25,4 +25,4 @@ name: elasticsearch
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-elasticsearch
|
||||
- https://www.elastic.co/products/elasticsearch
|
||||
version: 14.4.0
|
||||
version: 14.5.0
|
||||
|
||||
@@ -63,8 +63,8 @@ The following table lists the configurable parameters of the Elasticsearch chart
|
||||
| `image.tag` | Elasticsearch image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `nameOverride` | String to partially override elasticsearch.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override elasticsearch.fullname template with a string | `nil` |
|
||||
| `nameOverride` | String to partially override common.names.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override common.names.fullname template with a string | `nil` |
|
||||
| `name` | Elasticsearch cluster name | `elastic` |
|
||||
| `plugins` | Comma, semi-colon or space separated list of plugins to install at initialization | `nil` |
|
||||
| `snapshotRepoPath` | File System snapshot repository path | `nil` |
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
below:
|
||||
|
||||
kubectl logs --namespace {{ .Release.Namespace }} $(kubectl get --namespace {{ .Release.Namespace }} \
|
||||
pods -l app={{ template "elasticsearch.name" . }},role=master -o jsonpath='{.items[0].metadata.name}') \
|
||||
pods -l app={{ template "common.names.name" . }},role=master -o jsonpath='{.items[0].metadata.name}') \
|
||||
elasticsearch
|
||||
|
||||
You can adapt the Kernel parameters on you cluster as described in the
|
||||
@@ -66,7 +66,7 @@
|
||||
The Jobs will not be removed automagically when deleting this Helm chart.
|
||||
To remove these jobs, run the following:
|
||||
|
||||
kubectl -n {{ .Release.Namespace }} delete job -l app={{ template "elasticsearch.name" . }},role=curator
|
||||
kubectl -n {{ .Release.Namespace }} delete job -l app={{ template "common.names.name" . }},role=curator
|
||||
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -1,97 +1,10 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for statefulset.
|
||||
*/}}
|
||||
{{- define "statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "apps/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for deployment.
|
||||
*/}}
|
||||
{{- define "deployment.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "elasticsearch.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "elasticsearch.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "elasticsearch.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "elasticsearch.name" . }}
|
||||
helm.sh/chart: {{ include "elasticsearch.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "elasticsearch.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "elasticsearch.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper ES image name
|
||||
*/}}
|
||||
{{- define "elasticsearch.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -99,8 +12,7 @@ Create a default fully qualified master name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.master.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.master.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.master.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -108,8 +20,7 @@ Create a default fully qualified ingest name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.ingest.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.ingest.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.ingest.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -120,8 +31,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- if .Values.global.kibanaEnabled -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -148,8 +58,7 @@ Create a default fully qualified data name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.data.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.data.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.data.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ template "elasticsearch.initScriptsSecret" . }}
|
||||
@@ -157,7 +66,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
Get the initialization scripts volume name.
|
||||
*/}}
|
||||
{{- define "elasticsearch.initScripts" -}}
|
||||
{{- printf "%s-init-scripts" (include "elasticsearch.fullname" .) -}}
|
||||
{{- printf "%s-init-scripts" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ template "elasticsearch.initScriptsCM" . }}
|
||||
@@ -214,99 +123,35 @@ Create a default fully qualified metrics name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.metrics.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.metrics.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.metrics.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper ES exporter image name
|
||||
*/}}
|
||||
{{- define "elasticsearch.metrics.image" -}}
|
||||
{{- $registryName := .Values.metrics.image.registry -}}
|
||||
{{- $repositoryName := .Values.metrics.image.repository -}}
|
||||
{{- $tag := .Values.metrics.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.metrics.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper sysctl image name
|
||||
*/}}
|
||||
{{- define "elasticsearch.sysctl.image" -}}
|
||||
{{- $registryName := .Values.sysctlImage.registry -}}
|
||||
{{- $repositoryName := .Values.sysctlImage.repository -}}
|
||||
{{- $tag := .Values.sysctlImage.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.sysctlImage "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "elasticsearch.imagePullSecrets" -}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets := coalesce .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.curator.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets -}}
|
||||
{{- if $imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range $imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.curator.image .Values.sysctlImage .Values.volumePermissions.image) "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "elasticsearch.volumePermissions.image" -}}
|
||||
{{- $registryName := .Values.volumePermissions.image.registry -}}
|
||||
{{- $repositoryName := .Values.volumePermissions.image.repository -}}
|
||||
{{- $tag := .Values.volumePermissions.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -368,28 +213,13 @@ Return the appropriate apiVersion for podsecuritypolicy.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}-curator
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.curator.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) .Values.curator.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -407,34 +237,5 @@ Create the name of the service account to use
|
||||
Return the proper ES curator image name
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.image" -}}
|
||||
{{- $registryName := .Values.curator.image.registry -}}
|
||||
{{- $repositoryName := .Values.curator.image.repository -}}
|
||||
{{- $tag := .Values.curator.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "elasticsearch.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "elasticsearch.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.curator.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: curator
|
||||
data:
|
||||
action_file.yml: {{ required "A valid .Values.curator.configMaps.action_file_yml entry is required!" (toYaml .Values.curator.configMaps.action_file_yml | indent 2) }}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
data:
|
||||
elasticsearch.yml: |- {{- toYaml .Values.config | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.fullname" . }}-init-scripts
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
name: {{ template "elasticsearch.initScripts" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
component: master
|
||||
data:
|
||||
{{- with .Values.initScripts }}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.coordinating.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: coordinating-only
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: coordinating-only
|
||||
@@ -13,17 +13,17 @@ spec:
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: coordinating-only
|
||||
replicas: {{ .Values.coordinating.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: coordinating-only
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: coordinating-only
|
||||
{{- if .Values.coordinating.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.coordinating.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coordinating.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 10 }}
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
schedulerName: {{ .Values.coordinating.schedulerName }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAffinityPreset "component" "coordinating-only" "context" $) | nindent 10 }}
|
||||
@@ -45,10 +45,10 @@ spec:
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.coordinating.nodeAffinityPreset.type "key" .Values.coordinating.nodeAffinityPreset.key "values" .Values.coordinating.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "elasticsearch.coordinating.serviceAccountName" . }}
|
||||
{{- if .Values.coordinating.securityContext.enabled }}
|
||||
@@ -100,17 +100,17 @@ spec:
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "coordinating"
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.extraEnvVarsConfigMap .Values.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.extraEnvVarsConfigMap }}
|
||||
- configMapRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
@@ -170,7 +170,7 @@ spec:
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- end }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
||||
@@ -2,9 +2,9 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.coordinating.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: coordinating-only
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.coordinating.service.annotations "context" $) | nindent 4 }}
|
||||
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.coordinating.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.coordinating.service.type | quote }}
|
||||
{{- if and (eq .Values.coordinating.service.type "LoadBalancer") (not (empty .Values.coordinating.service.loadBalancerIP)) }}
|
||||
@@ -22,5 +22,5 @@ spec:
|
||||
{{- end }}
|
||||
- name: tcp-transport
|
||||
port: 9300
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: coordinating-only
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: {{ template "cronjob.apiVersion" . }}
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: curator
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: curator
|
||||
@@ -23,17 +23,17 @@ spec:
|
||||
{{- end }}
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: curator
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: curator
|
||||
{{- if .Values.curator.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.curator.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.curator.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 12 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 12 }}
|
||||
app.kubernetes.io/component: curator
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: curator
|
||||
@@ -67,7 +67,7 @@ spec:
|
||||
serviceAccountName: {{ include "elasticsearch.curator.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.affinity "context" $) | nindent 12 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.curator.affinity "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.curator.podAffinityPreset "component" "curator" "context" $) | nindent 14 }}
|
||||
@@ -75,10 +75,10 @@ spec:
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.curator.nodeAffinityPreset.type "key" .Values.curator.nodeAffinityPreset.key "values" .Values.curator.nodeAffinityPreset.values) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.nodeSelector "context" $) | nindent 12 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.curator.nodeSelector "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.tolerations "context" $) | nindent 12 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.curator.tolerations "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.securityContext }}
|
||||
securityContext: {{- toYaml .Values.curator.securityContext | nindent 12 }}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: {{ template "statefulset.apiVersion" . }}
|
||||
apiVersion: {{ template "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.data.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: data
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: data
|
||||
@@ -16,19 +16,19 @@ spec:
|
||||
partition: {{ .Values.data.updateStrategy.rollingUpdatePartition }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: data
|
||||
podManagementPolicy: Parallel
|
||||
replicas: {{ .Values.data.replicas }}
|
||||
serviceName: {{ template "elasticsearch.data.fullname" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: data
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: data
|
||||
{{- if .Values.data.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.data.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.data.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.data.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 8 }}
|
||||
@@ -36,7 +36,7 @@ spec:
|
||||
spec:
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.data.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.data.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAffinityPreset "component" "data" "context" $) | nindent 10 }}
|
||||
@@ -50,10 +50,10 @@ spec:
|
||||
schedulerName: {{ .Values.data.schedulerName }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.data.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.data.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "elasticsearch.data.serviceAccountName" . }}
|
||||
{{- if .Values.data.securityContext.enabled }}
|
||||
@@ -129,17 +129,17 @@ spec:
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "data"
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.extraEnvVarsConfigMap .Values.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.extraEnvVarsConfigMap }}
|
||||
- configMapRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
@@ -199,7 +199,7 @@ spec:
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.data.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: data
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@@ -15,5 +15,5 @@ spec:
|
||||
port: 9300
|
||||
targetPort: transport
|
||||
nodePort: null
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: data
|
||||
|
||||
@@ -6,7 +6,7 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}-curator-on-{{ $kind }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: curator
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: curator
|
||||
@@ -19,7 +19,7 @@ metadata:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 10 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 10 }}
|
||||
app.kubernetes.io/component: curator
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: curator
|
||||
@@ -35,13 +35,13 @@ spec:
|
||||
schedulerName: {{ .Values.curator.schedulerName }}
|
||||
{{- end }}
|
||||
{{- if $.Values.curator.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" $.Values.curator.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" $.Values.curator.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.curator.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" $.Values.curator.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" $.Values.curator.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.curator.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" $.Values.curator.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" $.Values.curator.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
{{- if .Values.ingest.enabled }}
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.ingest.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ingest
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: ingest
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: ingest
|
||||
replicas: {{ .Values.ingest.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: ingest
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: ingest
|
||||
{{- if .Values.ingest.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingest.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingest.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 10 }}
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
schedulerName: {{ .Values.ingest.schedulerName }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.ingest.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAffinityPreset "component" "ingest" "context" $) | nindent 10 }}
|
||||
@@ -41,10 +41,10 @@ spec:
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.ingest.nodeAffinityPreset.type "key" .Values.ingest.nodeAffinityPreset.key "values" .Values.ingest.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.ingest.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.ingest.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.securityContext.enabled }}
|
||||
securityContext:
|
||||
@@ -95,17 +95,17 @@ spec:
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "ingest"
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.extraEnvVarsConfigMap .Values.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.extraEnvVarsConfigMap }}
|
||||
- configMapRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
@@ -165,7 +165,7 @@ spec:
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- end }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
|
||||
@@ -3,9 +3,9 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.ingest.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ingest
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.ingest.service.annotations "context" $) | nindent 4 }}
|
||||
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.ingest.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.ingest.service.type | quote }}
|
||||
{{- if and (eq .Values.ingest.service.type "LoadBalancer") (not (empty .Values.ingest.service.loadBalancerIP)) }}
|
||||
@@ -24,6 +24,6 @@ spec:
|
||||
{{- else if eq .Values.ingest.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: ingest
|
||||
{{- end }}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: {{ template "statefulset.apiVersion" . }}
|
||||
apiVersion: {{ template "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.master.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: master
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: master
|
||||
@@ -13,19 +13,19 @@ spec:
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: master
|
||||
podManagementPolicy: Parallel
|
||||
replicas: {{ .Values.master.replicas }}
|
||||
serviceName: {{ template "elasticsearch.master.fullname" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: master
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: master
|
||||
{{- if .Values.master.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.master.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.master.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.master.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 8 }}
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
schedulerName: {{ .Values.master.schedulerName }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.master.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "context" $) | nindent 10 }}
|
||||
@@ -47,10 +47,10 @@ spec:
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.master.nodeAffinityPreset.type "key" .Values.master.nodeAffinityPreset.key "values" .Values.master.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.master.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.master.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "elasticsearch.master.serviceAccountName" . }}
|
||||
{{- if .Values.master.securityContext.enabled }}
|
||||
@@ -132,17 +132,17 @@ spec:
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "master"
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.extraEnvVars "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.extraEnvVarsConfigMap .Values.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.extraEnvVarsConfigMap }}
|
||||
- configMapRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsConfigMap "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "elasticsearch.tplValue" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
name: {{ include "common.tplvalues.render" ( dict "value" .Values.extraEnvVarsSecret "context" $ ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
@@ -202,7 +202,7 @@ spec:
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
|
||||
@@ -2,9 +2,9 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.master.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: master
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.master.service.annotations "context" $) | nindent 4 }}
|
||||
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.master.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.master.service.type | quote }}
|
||||
{{- if and (eq .Values.master.service.type "LoadBalancer") (not (empty .Values.master.service.loadBalancerIP)) }}
|
||||
@@ -23,5 +23,5 @@ spec:
|
||||
{{- else if eq .Values.master.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: master
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
{{- if .Values.metrics.enabled }}
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.metrics.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: metrics
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
## Istio Labels: https://istio.io/docs/ops/deployment/requirements/
|
||||
app: metrics
|
||||
{{- if .Values.metrics.podLabels }}
|
||||
{{- include "elasticsearch.tplValue" (dict "value" .Values.metrics.podLabels "context" $) | nindent 8 }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metrics.podAnnotations }}
|
||||
annotations: {{ toYaml . | nindent 8 }}
|
||||
@@ -64,7 +64,7 @@ spec:
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.metrics.affinity "context" $) | nindent 8 }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metrics.podAffinityPreset "component" "metrics" "context" $) | nindent 10 }}
|
||||
@@ -72,9 +72,9 @@ spec:
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.metrics.nodeAffinityPreset.type "key" .Values.metrics.nodeAffinityPreset.key "values" .Values.metrics.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.metrics.nodeSelector "context" $) | nindent 8 }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.metrics.tolerations "context" $) | nindent 8 }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,15 +3,15 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.metrics.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
||||
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.metrics.service.type }}
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 9114
|
||||
targetPort: metrics
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
{{- end }}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
apiVersion: {{ include "podsecuritypolicy.apiVersion" . }}
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
name: {{ include "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: curator
|
||||
spec:
|
||||
privileged: true
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
kind: Role
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
name: {{ include "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: curator
|
||||
component: elasticsearch-curator-configmap
|
||||
rules:
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
kind: RoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
name: {{ include "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: curator
|
||||
component: elasticsearch-curator-configmap
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ template "elasticsearch.curator.name" . }}
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.serviceAccountName" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: curator
|
||||
{{- end }}
|
||||
{{- if .Values.data.serviceAccount.create }}
|
||||
@@ -12,7 +12,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.data.serviceAccountName" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: data
|
||||
{{- end }}
|
||||
{{- if .Values.master.serviceAccount.create }}
|
||||
@@ -21,7 +21,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.master.serviceAccountName" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: master
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.serviceAccount.create }}
|
||||
@@ -30,6 +30,6 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.coordinating.serviceAccountName" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
role: coordinating-only
|
||||
{{- end }}
|
||||
|
||||
@@ -6,14 +6,14 @@ metadata:
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: metrics
|
||||
endpoints:
|
||||
- port: http-metrics
|
||||
|
||||
@@ -35,11 +35,11 @@ image:
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override elasticsearch.fullname template (will maintain the release name)
|
||||
## String to partially override common.names.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override elasticsearch.fullname template
|
||||
## String to fully override common.names.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user