@leverege/build-tools 2.50.3 → 2.50.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/helm-charts/cnpg-db-psql-stack/cluster.yaml.ovh +0 -14
- package/src/helm-charts/cnpg-db-psql-stack/gitignore +1 -1
- package/src/helm-charts/cnpg-db-psql-stack/helmdn.plugin +1 -1
- package/src/helm-charts/cnpg-db-tsdb-basic/cluster.yaml.ovh +2 -2
- package/src/helm-charts/cnpg-db-tsdb-basic/gitignore +1 -1
- package/src/helm-charts/cnpg-db-tsdb-basic/helmdn.plugin +1 -1
- package/src/helm-charts/cnpg-db-tsdb-dense/{cluster.yalm.ovh → cluster.yaml.ovh} +2 -2
- package/src/helm-charts/cnpg-db-tsdb-dense/gitignore +1 -1
- package/src/helm-charts/cnpg-db-tsdb-dense/helmdn.plugin +1 -1
- package/src/helm-charts/velero/velero-local.yaml +1 -1
- package/src/helmup.sh +0 -1
- package/src/helm-charts/elasticsearch-helm-gke1.25/.helmignore +0 -2
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/Chart.yaml +0 -12
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/Makefile +0 -1
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/README.md +0 -1
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/NOTES.txt +0 -6
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/_helpers.tpl +0 -65
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/configmap.yaml +0 -34
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/ingress.yaml +0 -64
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/networkpolicy.yaml +0 -61
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/poddisruptionbudget.yaml +0 -12
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/podsecuritypolicy.yaml +0 -14
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/role.yaml +0 -25
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/rolebinding.yaml +0 -24
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/service.yaml +0 -76
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/serviceaccount.yaml +0 -20
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/templates/statefulset.yaml +0 -390
- package/src/helm-charts/elasticsearch-helm-gke1.25/helm/values.yaml +0 -352
package/package.json
CHANGED
|
@@ -90,17 +90,3 @@ spec:
|
|
|
90
90
|
method: volumeSnapshot
|
|
91
91
|
backupOwnerReference: self
|
|
92
92
|
immediate: true
|
|
93
|
-
---
|
|
94
|
-
apiVersion: postgresql.cnpg.io/v1
|
|
95
|
-
kind: ScheduledBackup
|
|
96
|
-
metadata:
|
|
97
|
-
name: cnpg-db-psql-stack-volsnap
|
|
98
|
-
namespace: cnpg-operands
|
|
99
|
-
spec:
|
|
100
|
-
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
101
|
-
schedule: "0 0 */4 * * *"
|
|
102
|
-
cluster:
|
|
103
|
-
name: cnpg-db-psql-stack
|
|
104
|
-
method: volumeSnapshot
|
|
105
|
-
backupOwnerReference: self
|
|
106
|
-
immediate: true
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
*.swp
|
|
2
|
-
|
|
2
|
+
cluster.yaml
|
|
@@ -9,4 +9,4 @@ kubectl cnpg hibernate on -n cnpg-operands cnpg-db-psql-stack
|
|
|
9
9
|
# *** DANGER ***
|
|
10
10
|
# kubectl delete will destroy the cluster
|
|
11
11
|
# *** DANGER ***
|
|
12
|
-
# kubectl delete -f cnpg-db-psql-stack/
|
|
12
|
+
# kubectl delete -f cnpg-db-psql-stack/cluster.yaml $K8S_WHAT
|
|
@@ -98,11 +98,11 @@ spec:
|
|
|
98
98
|
apiVersion: postgresql.cnpg.io/v1
|
|
99
99
|
kind: ScheduledBackup
|
|
100
100
|
metadata:
|
|
101
|
-
name: cnpg-db-tsdb-basic-
|
|
101
|
+
name: cnpg-db-tsdb-basic-backup
|
|
102
102
|
namespace: cnpg-operands
|
|
103
103
|
spec:
|
|
104
104
|
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
105
|
-
schedule: "0 0 */
|
|
105
|
+
schedule: "0 0 */12 * * *"
|
|
106
106
|
cluster:
|
|
107
107
|
name: cnpg-db-tsdb-basic
|
|
108
108
|
method: volumeSnapshot
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
*.swp
|
|
2
|
-
|
|
2
|
+
cluster.yaml
|
|
@@ -9,4 +9,4 @@ kubectl cnpg hibernate on -n cnpg-operands cnpg-db-tsdb-basic
|
|
|
9
9
|
# *** DANGER ***
|
|
10
10
|
# kubectl delete will destroy the cluster pods and PVCs!!!!!
|
|
11
11
|
# *** DANGER ***
|
|
12
|
-
# kubectl do-not-do-this-delete -f cnpg-db-tsdb-basic/
|
|
12
|
+
# kubectl do-not-do-this-delete -f cnpg-db-tsdb-basic/cluster.yaml $K8S_WHAT
|
|
@@ -97,11 +97,11 @@ spec:
|
|
|
97
97
|
apiVersion: postgresql.cnpg.io/v1
|
|
98
98
|
kind: ScheduledBackup
|
|
99
99
|
metadata:
|
|
100
|
-
name: cnpg-db-tsdb-dense-
|
|
100
|
+
name: cnpg-db-tsdb-dense-backup
|
|
101
101
|
namespace: cnpg-operands
|
|
102
102
|
spec:
|
|
103
103
|
# https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
|
|
104
|
-
schedule: "0 0 */
|
|
104
|
+
schedule: "0 0 */12 * * *"
|
|
105
105
|
cluster:
|
|
106
106
|
name: cnpg-db-tsdb-dense
|
|
107
107
|
method: volumeSnapshot
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
*.swp
|
|
2
|
-
|
|
2
|
+
cluster.yaml
|
|
@@ -9,4 +9,4 @@ kubectl cnpg hibernate on -n cnpg-operands cnpg-db-tsdb-dense
|
|
|
9
9
|
# *** DANGER ***
|
|
10
10
|
# kubectl delete will destroy the cluster
|
|
11
11
|
# *** DANGER ***
|
|
12
|
-
# kubectl delete -f cnpg-db-tsdb-dense/
|
|
12
|
+
# kubectl delete -f cnpg-db-tsdb-dense/cluster.yaml $K8S_WHAT
|
package/src/helmup.sh
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
apiVersion: v1
|
|
2
|
-
version: 7.16.4
|
|
3
|
-
appVersion: 7.16.3
|
|
4
|
-
description: Leverege Elasticsearch Chart
|
|
5
|
-
#home: https://github.com/elastic/helm-charts
|
|
6
|
-
icon: https://helm.elastic.co/icons/elasticsearch.png
|
|
7
|
-
#maintainers:
|
|
8
|
-
#- email: helm-charts@elastic.co
|
|
9
|
-
# name: Elastic
|
|
10
|
-
name: elasticsearch
|
|
11
|
-
#sources:
|
|
12
|
-
#- https://github.com/elastic/elasticsearch
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
include ../helpers/common.mk
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Elasticsearch Helm Chart v7.16.3 +plus gke1.25 mods for use at Leverege
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
1. Watch all cluster members come up.
|
|
2
|
-
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "elasticsearch.uname" . }} -w
|
|
3
|
-
{{- if .Values.tests.enabled -}}
|
|
4
|
-
2. Test cluster health using Helm test.
|
|
5
|
-
$ helm --namespace={{ .Release.Namespace }} test {{ .Release.Name }}
|
|
6
|
-
{{- end -}}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{{/* vim: set filetype=mustache: */}}
|
|
2
|
-
{{/*
|
|
3
|
-
Expand the name of the chart.
|
|
4
|
-
*/}}
|
|
5
|
-
{{- define "elasticsearch.name" -}}
|
|
6
|
-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
7
|
-
{{- end -}}
|
|
8
|
-
|
|
9
|
-
{{/*
|
|
10
|
-
Create a default fully qualified app name.
|
|
11
|
-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
12
|
-
*/}}
|
|
13
|
-
{{- define "elasticsearch.fullname" -}}
|
|
14
|
-
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
15
|
-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
16
|
-
{{- end -}}
|
|
17
|
-
|
|
18
|
-
{{- define "elasticsearch.uname" -}}
|
|
19
|
-
{{- if empty .Values.fullnameOverride -}}
|
|
20
|
-
{{- if empty .Values.nameOverride -}}
|
|
21
|
-
{{ .Values.clusterName }}-{{ .Values.nodeGroup }}
|
|
22
|
-
{{- else -}}
|
|
23
|
-
{{ .Values.nameOverride }}-{{ .Values.nodeGroup }}
|
|
24
|
-
{{- end -}}
|
|
25
|
-
{{- else -}}
|
|
26
|
-
{{ .Values.fullnameOverride }}
|
|
27
|
-
{{- end -}}
|
|
28
|
-
{{- end -}}
|
|
29
|
-
|
|
30
|
-
{{- define "elasticsearch.masterService" -}}
|
|
31
|
-
{{- if empty .Values.masterService -}}
|
|
32
|
-
{{- if empty .Values.fullnameOverride -}}
|
|
33
|
-
{{- if empty .Values.nameOverride -}}
|
|
34
|
-
{{ .Values.clusterName }}-master
|
|
35
|
-
{{- else -}}
|
|
36
|
-
{{ .Values.nameOverride }}-master
|
|
37
|
-
{{- end -}}
|
|
38
|
-
{{- else -}}
|
|
39
|
-
{{ .Values.fullnameOverride }}
|
|
40
|
-
{{- end -}}
|
|
41
|
-
{{- else -}}
|
|
42
|
-
{{ .Values.masterService }}
|
|
43
|
-
{{- end -}}
|
|
44
|
-
{{- end -}}
|
|
45
|
-
|
|
46
|
-
{{- define "elasticsearch.endpoints" -}}
|
|
47
|
-
{{- $replicas := int (toString (.Values.replicas)) }}
|
|
48
|
-
{{- $uname := (include "elasticsearch.uname" .) }}
|
|
49
|
-
{{- range $i, $e := untilStep 0 $replicas 1 -}}
|
|
50
|
-
{{ $uname }}-{{ $i }},
|
|
51
|
-
{{- end -}}
|
|
52
|
-
{{- end -}}
|
|
53
|
-
|
|
54
|
-
{{- define "elasticsearch.esMajorVersion" -}}
|
|
55
|
-
{{- if .Values.esMajorVersion -}}
|
|
56
|
-
{{ .Values.esMajorVersion }}
|
|
57
|
-
{{- else -}}
|
|
58
|
-
{{- $version := int (index (.Values.imageTag | splitList ".") 0) -}}
|
|
59
|
-
{{- if and (contains "docker.elastic.co/elasticsearch/elasticsearch" .Values.image) (not (eq $version 0)) -}}
|
|
60
|
-
{{ $version }}
|
|
61
|
-
{{- else -}}
|
|
62
|
-
7
|
|
63
|
-
{{- end -}}
|
|
64
|
-
{{- end -}}
|
|
65
|
-
{{- end -}}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{{- if .Values.esConfig }}
|
|
2
|
-
---
|
|
3
|
-
apiVersion: v1
|
|
4
|
-
kind: ConfigMap
|
|
5
|
-
metadata:
|
|
6
|
-
name: {{ template "elasticsearch.uname" . }}-config
|
|
7
|
-
labels:
|
|
8
|
-
heritage: {{ .Release.Service | quote }}
|
|
9
|
-
release: {{ .Release.Name | quote }}
|
|
10
|
-
chart: "{{ .Chart.Name }}"
|
|
11
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
12
|
-
data:
|
|
13
|
-
{{- range $path, $config := .Values.esConfig }}
|
|
14
|
-
{{ $path }}: |
|
|
15
|
-
{{ $config | indent 4 -}}
|
|
16
|
-
{{- end -}}
|
|
17
|
-
{{- end -}}
|
|
18
|
-
{{- if .Values.esJvmOptions }}
|
|
19
|
-
---
|
|
20
|
-
apiVersion: v1
|
|
21
|
-
kind: ConfigMap
|
|
22
|
-
metadata:
|
|
23
|
-
name: {{ template "elasticsearch.uname" . }}-jvm-options
|
|
24
|
-
labels:
|
|
25
|
-
heritage: {{ .Release.Service | quote }}
|
|
26
|
-
release: {{ .Release.Name | quote }}
|
|
27
|
-
chart: "{{ .Chart.Name }}"
|
|
28
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
29
|
-
data:
|
|
30
|
-
{{- range $path, $config := .Values.esJvmOptions }}
|
|
31
|
-
{{ $path }}: |
|
|
32
|
-
{{ $config | indent 4 -}}
|
|
33
|
-
{{- end -}}
|
|
34
|
-
{{- end -}}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{{- if .Values.ingress.enabled -}}
|
|
2
|
-
{{- $fullName := include "elasticsearch.uname" . -}}
|
|
3
|
-
{{- $httpPort := .Values.httpPort -}}
|
|
4
|
-
{{- $pathtype := .Values.ingress.pathtype -}}
|
|
5
|
-
{{- $ingressPath := .Values.ingress.path -}}
|
|
6
|
-
apiVersion: networking.k8s.io/v1
|
|
7
|
-
kind: Ingress
|
|
8
|
-
metadata:
|
|
9
|
-
name: {{ $fullName }}
|
|
10
|
-
labels:
|
|
11
|
-
app: {{ .Chart.Name }}
|
|
12
|
-
release: {{ .Release.Name }}
|
|
13
|
-
heritage: {{ .Release.Service }}
|
|
14
|
-
{{- with .Values.ingress.annotations }}
|
|
15
|
-
annotations:
|
|
16
|
-
{{ toYaml . | indent 4 }}
|
|
17
|
-
{{- end }}
|
|
18
|
-
spec:
|
|
19
|
-
{{- if .Values.ingress.className }}
|
|
20
|
-
ingressClassName: {{ .Values.ingress.className | quote }}
|
|
21
|
-
{{- end }}
|
|
22
|
-
{{- if .Values.ingress.tls }}
|
|
23
|
-
tls:
|
|
24
|
-
{{- if .ingressPath }}
|
|
25
|
-
{{- range .Values.ingress.tls }}
|
|
26
|
-
- hosts:
|
|
27
|
-
{{- range .hosts }}
|
|
28
|
-
- {{ . }}
|
|
29
|
-
{{- end }}
|
|
30
|
-
secretName: {{ .secretName }}
|
|
31
|
-
{{- end }}
|
|
32
|
-
{{- else }}
|
|
33
|
-
{{ toYaml .Values.ingress.tls | indent 4 }}
|
|
34
|
-
{{- end }}
|
|
35
|
-
{{- end}}
|
|
36
|
-
rules:
|
|
37
|
-
{{- range .Values.ingress.hosts }}
|
|
38
|
-
{{- if $ingressPath }}
|
|
39
|
-
- host: {{ . }}
|
|
40
|
-
http:
|
|
41
|
-
paths:
|
|
42
|
-
- path: {{ $ingressPath }}
|
|
43
|
-
pathType: {{ $pathtype }}
|
|
44
|
-
backend:
|
|
45
|
-
service:
|
|
46
|
-
name: {{ $fullName }}
|
|
47
|
-
port:
|
|
48
|
-
number: {{ $httpPort }}
|
|
49
|
-
{{- else }}
|
|
50
|
-
- host: {{ .host }}
|
|
51
|
-
http:
|
|
52
|
-
paths:
|
|
53
|
-
{{- range .paths }}
|
|
54
|
-
- path: {{ .path }}
|
|
55
|
-
pathType: {{ $pathtype }}
|
|
56
|
-
backend:
|
|
57
|
-
service:
|
|
58
|
-
name: {{ $fullName }}
|
|
59
|
-
port:
|
|
60
|
-
number: {{ .servicePort | default $httpPort }}
|
|
61
|
-
{{- end }}
|
|
62
|
-
{{- end }}
|
|
63
|
-
{{- end }}
|
|
64
|
-
{{- end }}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{{- if (or .Values.networkPolicy.http.enabled .Values.networkPolicy.transport.enabled) }}
|
|
2
|
-
kind: NetworkPolicy
|
|
3
|
-
apiVersion: networking.k8s.io/v1
|
|
4
|
-
metadata:
|
|
5
|
-
name: {{ template "elasticsearch.uname" . }}
|
|
6
|
-
labels:
|
|
7
|
-
heritage: {{ .Release.Service | quote }}
|
|
8
|
-
release: {{ .Release.Name | quote }}
|
|
9
|
-
chart: "{{ .Chart.Name }}"
|
|
10
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
11
|
-
spec:
|
|
12
|
-
podSelector:
|
|
13
|
-
matchLabels:
|
|
14
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
15
|
-
ingress: # Allow inbound connections
|
|
16
|
-
|
|
17
|
-
{{- if .Values.networkPolicy.http.enabled }}
|
|
18
|
-
# For HTTP access
|
|
19
|
-
- ports:
|
|
20
|
-
- port: {{ .Values.httpPort }}
|
|
21
|
-
from:
|
|
22
|
-
# From authorized Pods (having the correct label)
|
|
23
|
-
- podSelector:
|
|
24
|
-
matchLabels:
|
|
25
|
-
{{ template "elasticsearch.uname" . }}-http-client: "true"
|
|
26
|
-
{{- with .Values.networkPolicy.http.explicitNamespacesSelector }}
|
|
27
|
-
# From authorized namespaces
|
|
28
|
-
namespaceSelector:
|
|
29
|
-
{{ toYaml . | indent 12 }}
|
|
30
|
-
{{- end }}
|
|
31
|
-
{{- with .Values.networkPolicy.http.additionalRules }}
|
|
32
|
-
# Or from custom additional rules
|
|
33
|
-
{{ toYaml . | indent 8 }}
|
|
34
|
-
{{- end }}
|
|
35
|
-
{{- end }}
|
|
36
|
-
|
|
37
|
-
{{- if .Values.networkPolicy.transport.enabled }}
|
|
38
|
-
# For transport access
|
|
39
|
-
- ports:
|
|
40
|
-
- port: {{ .Values.transportPort }}
|
|
41
|
-
from:
|
|
42
|
-
# From authorized Pods (having the correct label)
|
|
43
|
-
- podSelector:
|
|
44
|
-
matchLabels:
|
|
45
|
-
{{ template "elasticsearch.uname" . }}-transport-client: "true"
|
|
46
|
-
{{- with .Values.networkPolicy.transport.explicitNamespacesSelector }}
|
|
47
|
-
# From authorized namespaces
|
|
48
|
-
namespaceSelector:
|
|
49
|
-
{{ toYaml . | indent 12 }}
|
|
50
|
-
{{- end }}
|
|
51
|
-
{{- with .Values.networkPolicy.transport.additionalRules }}
|
|
52
|
-
# Or from custom additional rules
|
|
53
|
-
{{ toYaml . | indent 8 }}
|
|
54
|
-
{{- end }}
|
|
55
|
-
# Or from other ElasticSearch Pods
|
|
56
|
-
- podSelector:
|
|
57
|
-
matchLabels:
|
|
58
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
59
|
-
{{- end }}
|
|
60
|
-
|
|
61
|
-
{{- end }}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{{- if .Values.maxUnavailable }}
|
|
3
|
-
apiVersion: policy/v1
|
|
4
|
-
kind: PodDisruptionBudget
|
|
5
|
-
metadata:
|
|
6
|
-
name: "{{ template "elasticsearch.uname" . }}-pdb"
|
|
7
|
-
spec:
|
|
8
|
-
maxUnavailable: {{ .Values.maxUnavailable }}
|
|
9
|
-
selector:
|
|
10
|
-
matchLabels:
|
|
11
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
12
|
-
{{- end }}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{{- if .Values.podSecurityPolicy.create -}}
|
|
2
|
-
{{- $fullName := include "elasticsearch.uname" . -}}
|
|
3
|
-
apiVersion: policy/v1beta1
|
|
4
|
-
kind: PodSecurityPolicy
|
|
5
|
-
metadata:
|
|
6
|
-
name: {{ default $fullName .Values.podSecurityPolicy.name | quote }}
|
|
7
|
-
labels:
|
|
8
|
-
heritage: {{ .Release.Service | quote }}
|
|
9
|
-
release: {{ .Release.Name | quote }}
|
|
10
|
-
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
11
|
-
app: {{ $fullName | quote }}
|
|
12
|
-
spec:
|
|
13
|
-
{{ toYaml .Values.podSecurityPolicy.spec | indent 2 }}
|
|
14
|
-
{{- end -}}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{{- if .Values.rbac.create -}}
|
|
2
|
-
{{- $fullName := include "elasticsearch.uname" . -}}
|
|
3
|
-
apiVersion: rbac.authorization.k8s.io/v1
|
|
4
|
-
kind: Role
|
|
5
|
-
metadata:
|
|
6
|
-
name: {{ $fullName | quote }}
|
|
7
|
-
labels:
|
|
8
|
-
heritage: {{ .Release.Service | quote }}
|
|
9
|
-
release: {{ .Release.Name | quote }}
|
|
10
|
-
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
11
|
-
app: {{ $fullName | quote }}
|
|
12
|
-
rules:
|
|
13
|
-
- apiGroups:
|
|
14
|
-
- extensions
|
|
15
|
-
resources:
|
|
16
|
-
- podsecuritypolicies
|
|
17
|
-
resourceNames:
|
|
18
|
-
{{- if eq .Values.podSecurityPolicy.name "" }}
|
|
19
|
-
- {{ $fullName | quote }}
|
|
20
|
-
{{- else }}
|
|
21
|
-
- {{ .Values.podSecurityPolicy.name | quote }}
|
|
22
|
-
{{- end }}
|
|
23
|
-
verbs:
|
|
24
|
-
- use
|
|
25
|
-
{{- end -}}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{{- if .Values.rbac.create -}}
|
|
2
|
-
{{- $fullName := include "elasticsearch.uname" . -}}
|
|
3
|
-
apiVersion: rbac.authorization.k8s.io/v1
|
|
4
|
-
kind: RoleBinding
|
|
5
|
-
metadata:
|
|
6
|
-
name: {{ $fullName | quote }}
|
|
7
|
-
labels:
|
|
8
|
-
heritage: {{ .Release.Service | quote }}
|
|
9
|
-
release: {{ .Release.Name | quote }}
|
|
10
|
-
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
11
|
-
app: {{ $fullName | quote }}
|
|
12
|
-
subjects:
|
|
13
|
-
- kind: ServiceAccount
|
|
14
|
-
{{- if eq .Values.rbac.serviceAccountName "" }}
|
|
15
|
-
name: {{ $fullName | quote }}
|
|
16
|
-
{{- else }}
|
|
17
|
-
name: {{ .Values.rbac.serviceAccountName | quote }}
|
|
18
|
-
{{- end }}
|
|
19
|
-
namespace: {{ .Release.Namespace | quote }}
|
|
20
|
-
roleRef:
|
|
21
|
-
kind: Role
|
|
22
|
-
name: {{ $fullName | quote }}
|
|
23
|
-
apiGroup: rbac.authorization.k8s.io
|
|
24
|
-
{{- end -}}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
{{- if .Values.service.enabled -}}
|
|
2
|
-
kind: Service
|
|
3
|
-
apiVersion: v1
|
|
4
|
-
metadata:
|
|
5
|
-
{{- if eq .Values.nodeGroup "master" }}
|
|
6
|
-
name: {{ template "elasticsearch.masterService" . }}
|
|
7
|
-
{{- else }}
|
|
8
|
-
name: {{ template "elasticsearch.uname" . }}
|
|
9
|
-
{{- end }}
|
|
10
|
-
labels:
|
|
11
|
-
heritage: {{ .Release.Service | quote }}
|
|
12
|
-
release: {{ .Release.Name | quote }}
|
|
13
|
-
chart: "{{ .Chart.Name }}"
|
|
14
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
15
|
-
{{- if .Values.service.labels }}
|
|
16
|
-
{{ toYaml .Values.service.labels | indent 4}}
|
|
17
|
-
{{- end }}
|
|
18
|
-
annotations:
|
|
19
|
-
{{ toYaml .Values.service.annotations | indent 4 }}
|
|
20
|
-
spec:
|
|
21
|
-
type: {{ .Values.service.type }}
|
|
22
|
-
selector:
|
|
23
|
-
release: {{ .Release.Name | quote }}
|
|
24
|
-
chart: "{{ .Chart.Name }}"
|
|
25
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
26
|
-
ports:
|
|
27
|
-
- name: {{ .Values.service.httpPortName | default "http" }}
|
|
28
|
-
protocol: TCP
|
|
29
|
-
port: {{ .Values.httpPort }}
|
|
30
|
-
{{- if .Values.service.nodePort }}
|
|
31
|
-
nodePort: {{ .Values.service.nodePort }}
|
|
32
|
-
{{- end }}
|
|
33
|
-
- name: {{ .Values.service.transportPortName | default "transport" }}
|
|
34
|
-
protocol: TCP
|
|
35
|
-
port: {{ .Values.transportPort }}
|
|
36
|
-
{{- if .Values.service.loadBalancerIP }}
|
|
37
|
-
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
|
38
|
-
{{- end }}
|
|
39
|
-
{{- with .Values.service.loadBalancerSourceRanges }}
|
|
40
|
-
loadBalancerSourceRanges:
|
|
41
|
-
{{ toYaml . | indent 4 }}
|
|
42
|
-
{{- end }}
|
|
43
|
-
{{- if .Values.service.externalTrafficPolicy }}
|
|
44
|
-
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
|
45
|
-
{{- end }}
|
|
46
|
-
{{- end }}
|
|
47
|
-
---
|
|
48
|
-
kind: Service
|
|
49
|
-
apiVersion: v1
|
|
50
|
-
metadata:
|
|
51
|
-
{{- if eq .Values.nodeGroup "master" }}
|
|
52
|
-
name: {{ template "elasticsearch.masterService" . }}-headless
|
|
53
|
-
{{- else }}
|
|
54
|
-
name: {{ template "elasticsearch.uname" . }}-headless
|
|
55
|
-
{{- end }}
|
|
56
|
-
labels:
|
|
57
|
-
heritage: {{ .Release.Service | quote }}
|
|
58
|
-
release: {{ .Release.Name | quote }}
|
|
59
|
-
chart: "{{ .Chart.Name }}"
|
|
60
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
61
|
-
{{- if .Values.service.labelsHeadless }}
|
|
62
|
-
{{ toYaml .Values.service.labelsHeadless | indent 4 }}
|
|
63
|
-
{{- end }}
|
|
64
|
-
annotations:
|
|
65
|
-
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
|
66
|
-
spec:
|
|
67
|
-
clusterIP: None # This is needed for statefulset hostnames like elasticsearch-0 to resolve
|
|
68
|
-
# Create endpoints also if the related pod isn't ready
|
|
69
|
-
publishNotReadyAddresses: true
|
|
70
|
-
selector:
|
|
71
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
72
|
-
ports:
|
|
73
|
-
- name: {{ .Values.service.httpPortName | default "http" }}
|
|
74
|
-
port: {{ .Values.httpPort }}
|
|
75
|
-
- name: {{ .Values.service.transportPortName | default "transport" }}
|
|
76
|
-
port: {{ .Values.transportPort }}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{{- if .Values.rbac.create -}}
|
|
2
|
-
{{- $fullName := include "elasticsearch.uname" . -}}
|
|
3
|
-
apiVersion: v1
|
|
4
|
-
kind: ServiceAccount
|
|
5
|
-
metadata:
|
|
6
|
-
{{- if eq .Values.rbac.serviceAccountName "" }}
|
|
7
|
-
name: {{ $fullName | quote }}
|
|
8
|
-
{{- else }}
|
|
9
|
-
name: {{ .Values.rbac.serviceAccountName | quote }}
|
|
10
|
-
{{- end }}
|
|
11
|
-
annotations:
|
|
12
|
-
{{- with .Values.rbac.serviceAccountAnnotations }}
|
|
13
|
-
{{- toYaml . | nindent 4 }}
|
|
14
|
-
{{- end }}
|
|
15
|
-
labels:
|
|
16
|
-
heritage: {{ .Release.Service | quote }}
|
|
17
|
-
release: {{ .Release.Name | quote }}
|
|
18
|
-
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
19
|
-
app: {{ $fullName | quote }}
|
|
20
|
-
{{- end -}}
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: StatefulSet
|
|
4
|
-
metadata:
|
|
5
|
-
name: {{ template "elasticsearch.uname" . }}
|
|
6
|
-
labels:
|
|
7
|
-
heritage: {{ .Release.Service | quote }}
|
|
8
|
-
release: {{ .Release.Name | quote }}
|
|
9
|
-
chart: "{{ .Chart.Name }}"
|
|
10
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
11
|
-
{{- range $key, $value := .Values.labels }}
|
|
12
|
-
{{ $key }}: {{ $value | quote }}
|
|
13
|
-
{{- end }}
|
|
14
|
-
annotations:
|
|
15
|
-
esMajorVersion: "{{ include "elasticsearch.esMajorVersion" . }}"
|
|
16
|
-
spec:
|
|
17
|
-
serviceName: {{ template "elasticsearch.uname" . }}-headless
|
|
18
|
-
selector:
|
|
19
|
-
matchLabels:
|
|
20
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
21
|
-
replicas: {{ .Values.replicas }}
|
|
22
|
-
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
|
23
|
-
updateStrategy:
|
|
24
|
-
type: {{ .Values.updateStrategy }}
|
|
25
|
-
{{- if .Values.persistence.enabled }}
|
|
26
|
-
volumeClaimTemplates:
|
|
27
|
-
- metadata:
|
|
28
|
-
name: {{ template "elasticsearch.uname" . }}
|
|
29
|
-
{{- if .Values.persistence.labels.enabled }}
|
|
30
|
-
labels:
|
|
31
|
-
release: {{ .Release.Name | quote }}
|
|
32
|
-
chart: "{{ .Chart.Name }}"
|
|
33
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
34
|
-
{{- range $key, $value := .Values.labels }}
|
|
35
|
-
{{ $key }}: {{ $value | quote }}
|
|
36
|
-
{{- end }}
|
|
37
|
-
{{- end }}
|
|
38
|
-
{{- with .Values.persistence.annotations }}
|
|
39
|
-
annotations:
|
|
40
|
-
{{ toYaml . | indent 8 }}
|
|
41
|
-
{{- end }}
|
|
42
|
-
spec:
|
|
43
|
-
{{ toYaml .Values.volumeClaimTemplate | indent 6 }}
|
|
44
|
-
{{- end }}
|
|
45
|
-
template:
|
|
46
|
-
metadata:
|
|
47
|
-
name: "{{ template "elasticsearch.uname" . }}"
|
|
48
|
-
labels:
|
|
49
|
-
release: {{ .Release.Name | quote }}
|
|
50
|
-
chart: "{{ .Chart.Name }}"
|
|
51
|
-
app: "{{ template "elasticsearch.uname" . }}"
|
|
52
|
-
{{- range $key, $value := .Values.labels }}
|
|
53
|
-
{{ $key }}: {{ $value | quote }}
|
|
54
|
-
{{- end }}
|
|
55
|
-
annotations:
|
|
56
|
-
{{- range $key, $value := .Values.podAnnotations }}
|
|
57
|
-
{{ $key }}: {{ $value | quote }}
|
|
58
|
-
{{- end }}
|
|
59
|
-
{{/* This forces a restart if the configmap has changed */}}
|
|
60
|
-
{{- if or .Values.esConfig .Values.esJvmOptions }}
|
|
61
|
-
configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
|
|
62
|
-
{{- end }}
|
|
63
|
-
spec:
|
|
64
|
-
{{- if .Values.schedulerName }}
|
|
65
|
-
schedulerName: "{{ .Values.schedulerName }}"
|
|
66
|
-
{{- end }}
|
|
67
|
-
securityContext:
|
|
68
|
-
{{ toYaml .Values.podSecurityContext | indent 8 }}
|
|
69
|
-
{{- if .Values.fsGroup }}
|
|
70
|
-
fsGroup: {{ .Values.fsGroup }} # Deprecated value, please use .Values.podSecurityContext.fsGroup
|
|
71
|
-
{{- end }}
|
|
72
|
-
{{- if .Values.rbac.create }}
|
|
73
|
-
serviceAccountName: "{{ template "elasticsearch.uname" . }}"
|
|
74
|
-
{{- else if not (eq .Values.rbac.serviceAccountName "") }}
|
|
75
|
-
serviceAccountName: {{ .Values.rbac.serviceAccountName | quote }}
|
|
76
|
-
{{- end }}
|
|
77
|
-
automountServiceAccountToken: {{ .Values.rbac.automountToken }}
|
|
78
|
-
{{- with .Values.tolerations }}
|
|
79
|
-
tolerations:
|
|
80
|
-
{{ toYaml . | indent 6 }}
|
|
81
|
-
{{- end }}
|
|
82
|
-
{{- with .Values.nodeSelector }}
|
|
83
|
-
nodeSelector:
|
|
84
|
-
{{ toYaml . | indent 8 }}
|
|
85
|
-
{{- end }}
|
|
86
|
-
{{- if or (eq .Values.antiAffinity "hard") (eq .Values.antiAffinity "soft") .Values.nodeAffinity }}
|
|
87
|
-
{{- if .Values.priorityClassName }}
|
|
88
|
-
priorityClassName: {{ .Values.priorityClassName }}
|
|
89
|
-
{{- end }}
|
|
90
|
-
affinity:
|
|
91
|
-
{{- end }}
|
|
92
|
-
{{- if eq .Values.antiAffinity "hard" }}
|
|
93
|
-
podAntiAffinity:
|
|
94
|
-
requiredDuringSchedulingIgnoredDuringExecution:
|
|
95
|
-
- labelSelector:
|
|
96
|
-
matchExpressions:
|
|
97
|
-
- key: app
|
|
98
|
-
operator: In
|
|
99
|
-
values:
|
|
100
|
-
- "{{ template "elasticsearch.uname" .}}"
|
|
101
|
-
topologyKey: {{ .Values.antiAffinityTopologyKey }}
|
|
102
|
-
{{- else if eq .Values.antiAffinity "soft" }}
|
|
103
|
-
podAntiAffinity:
|
|
104
|
-
preferredDuringSchedulingIgnoredDuringExecution:
|
|
105
|
-
- weight: 1
|
|
106
|
-
podAffinityTerm:
|
|
107
|
-
topologyKey: {{ .Values.antiAffinityTopologyKey }}
|
|
108
|
-
labelSelector:
|
|
109
|
-
matchExpressions:
|
|
110
|
-
- key: app
|
|
111
|
-
operator: In
|
|
112
|
-
values:
|
|
113
|
-
- "{{ template "elasticsearch.uname" . }}"
|
|
114
|
-
{{- end }}
|
|
115
|
-
{{- with .Values.nodeAffinity }}
|
|
116
|
-
nodeAffinity:
|
|
117
|
-
{{ toYaml . | indent 10 }}
|
|
118
|
-
{{- end }}
|
|
119
|
-
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }}
|
|
120
|
-
volumes:
|
|
121
|
-
{{- range .Values.secretMounts }}
|
|
122
|
-
- name: {{ .name }}
|
|
123
|
-
secret:
|
|
124
|
-
secretName: {{ .secretName }}
|
|
125
|
-
{{- if .defaultMode }}
|
|
126
|
-
defaultMode: {{ .defaultMode }}
|
|
127
|
-
{{- end }}
|
|
128
|
-
{{- end }}
|
|
129
|
-
{{- if .Values.esConfig }}
|
|
130
|
-
- name: esconfig
|
|
131
|
-
configMap:
|
|
132
|
-
name: {{ template "elasticsearch.uname" . }}-config
|
|
133
|
-
{{- end }}
|
|
134
|
-
{{- if .Values.esJvmOptions }}
|
|
135
|
-
- name: esjvmoptions
|
|
136
|
-
configMap:
|
|
137
|
-
name: {{ template "elasticsearch.uname" . }}-jvm-options
|
|
138
|
-
{{- end }}
|
|
139
|
-
{{- if .Values.keystore }}
|
|
140
|
-
- name: keystore
|
|
141
|
-
emptyDir: {}
|
|
142
|
-
{{- range .Values.keystore }}
|
|
143
|
-
- name: keystore-{{ .secretName }}
|
|
144
|
-
secret: {{ toYaml . | nindent 12 }}
|
|
145
|
-
{{- end }}
|
|
146
|
-
{{ end }}
|
|
147
|
-
{{- if .Values.extraVolumes }}
|
|
148
|
-
# Currently some extra blocks accept strings
|
|
149
|
-
# to continue with backwards compatibility this is being kept
|
|
150
|
-
# whilst also allowing for yaml to be specified too.
|
|
151
|
-
{{- if eq "string" (printf "%T" .Values.extraVolumes) }}
|
|
152
|
-
{{ tpl .Values.extraVolumes . | indent 8 }}
|
|
153
|
-
{{- else }}
|
|
154
|
-
{{ toYaml .Values.extraVolumes | indent 8 }}
|
|
155
|
-
{{- end }}
|
|
156
|
-
{{- end }}
|
|
157
|
-
{{- if .Values.imagePullSecrets }}
|
|
158
|
-
imagePullSecrets:
|
|
159
|
-
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
|
160
|
-
{{- end }}
|
|
161
|
-
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
|
162
|
-
{{- if .Values.hostAliases }}
|
|
163
|
-
hostAliases: {{ toYaml .Values.hostAliases | nindent 8 }}
|
|
164
|
-
{{- end }}
|
|
165
|
-
{{- if or (.Values.extraInitContainers) (.Values.sysctlInitContainer.enabled) (.Values.keystore) }}
|
|
166
|
-
initContainers:
|
|
167
|
-
{{- if .Values.sysctlInitContainer.enabled }}
|
|
168
|
-
- name: configure-sysctl
|
|
169
|
-
securityContext:
|
|
170
|
-
runAsUser: 0
|
|
171
|
-
privileged: true
|
|
172
|
-
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
173
|
-
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
|
174
|
-
command: ["sysctl", "-w", "vm.max_map_count={{ .Values.sysctlVmMaxMapCount}}"]
|
|
175
|
-
resources:
|
|
176
|
-
{{ toYaml .Values.initResources | indent 10 }}
|
|
177
|
-
{{- end }}
|
|
178
|
-
{{ if .Values.keystore }}
|
|
179
|
-
- name: keystore
|
|
180
|
-
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
181
|
-
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
|
182
|
-
command:
|
|
183
|
-
- bash
|
|
184
|
-
- -c
|
|
185
|
-
- |
|
|
186
|
-
set -euo pipefail
|
|
187
|
-
|
|
188
|
-
elasticsearch-keystore create
|
|
189
|
-
|
|
190
|
-
for i in /tmp/keystoreSecrets/*/*; do
|
|
191
|
-
key=$(basename $i)
|
|
192
|
-
echo "Adding file $i to keystore key $key"
|
|
193
|
-
elasticsearch-keystore add-file "$key" "$i"
|
|
194
|
-
done
|
|
195
|
-
|
|
196
|
-
# Add the bootstrap password since otherwise the Elasticsearch entrypoint tries to do this on startup
|
|
197
|
-
if [ ! -z ${ELASTIC_PASSWORD+x} ]; then
|
|
198
|
-
echo 'Adding env $ELASTIC_PASSWORD to keystore as key bootstrap.password'
|
|
199
|
-
echo "$ELASTIC_PASSWORD" | elasticsearch-keystore add -x bootstrap.password
|
|
200
|
-
fi
|
|
201
|
-
|
|
202
|
-
cp -a /usr/share/elasticsearch/config/elasticsearch.keystore /tmp/keystore/
|
|
203
|
-
env: {{ toYaml .Values.extraEnvs | nindent 10 }}
|
|
204
|
-
envFrom: {{ toYaml .Values.envFrom | nindent 10 }}
|
|
205
|
-
resources: {{ toYaml .Values.initResources | nindent 10 }}
|
|
206
|
-
volumeMounts:
|
|
207
|
-
- name: keystore
|
|
208
|
-
mountPath: /tmp/keystore
|
|
209
|
-
{{- range .Values.keystore }}
|
|
210
|
-
- name: keystore-{{ .secretName }}
|
|
211
|
-
mountPath: /tmp/keystoreSecrets/{{ .secretName }}
|
|
212
|
-
{{- end }}
|
|
213
|
-
{{ end }}
|
|
214
|
-
{{- if .Values.extraInitContainers }}
|
|
215
|
-
# Currently some extra blocks accept strings
|
|
216
|
-
# to continue with backwards compatibility this is being kept
|
|
217
|
-
# whilst also allowing for yaml to be specified too.
|
|
218
|
-
{{- if eq "string" (printf "%T" .Values.extraInitContainers) }}
|
|
219
|
-
{{ tpl .Values.extraInitContainers . | indent 6 }}
|
|
220
|
-
{{- else }}
|
|
221
|
-
{{ toYaml .Values.extraInitContainers | indent 6 }}
|
|
222
|
-
{{- end }}
|
|
223
|
-
{{- end }}
|
|
224
|
-
{{- end }}
|
|
225
|
-
containers:
|
|
226
|
-
- name: "{{ template "elasticsearch.name" . }}"
|
|
227
|
-
securityContext:
|
|
228
|
-
{{ toYaml .Values.securityContext | indent 10 }}
|
|
229
|
-
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
|
230
|
-
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
|
231
|
-
readinessProbe:
|
|
232
|
-
exec:
|
|
233
|
-
command:
|
|
234
|
-
- bash
|
|
235
|
-
- -c
|
|
236
|
-
- |
|
|
237
|
-
set -e
|
|
238
|
-
# If the node is starting up wait for the cluster to be ready (request params: "{{ .Values.clusterHealthCheckParams }}" )
|
|
239
|
-
# Once it has started only check that the node itself is responding
|
|
240
|
-
START_FILE=/tmp/.es_start_file
|
|
241
|
-
|
|
242
|
-
# Disable nss cache to avoid filling dentry cache when calling curl
|
|
243
|
-
# This is required with Elasticsearch Docker using nss < 3.52
|
|
244
|
-
export NSS_SDB_USE_CACHE=no
|
|
245
|
-
|
|
246
|
-
http () {
|
|
247
|
-
local path="${1}"
|
|
248
|
-
local args="${2}"
|
|
249
|
-
set -- -XGET -s
|
|
250
|
-
|
|
251
|
-
if [ "$args" != "" ]; then
|
|
252
|
-
set -- "$@" $args
|
|
253
|
-
fi
|
|
254
|
-
|
|
255
|
-
if [ -n "${ELASTIC_PASSWORD}" ]; then
|
|
256
|
-
set -- "$@" -u "elastic:${ELASTIC_PASSWORD}"
|
|
257
|
-
fi
|
|
258
|
-
|
|
259
|
-
curl --output /dev/null -k "$@" "{{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}${path}"
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if [ -f "${START_FILE}" ]; then
|
|
263
|
-
echo 'Elasticsearch is already running, lets check the node is healthy'
|
|
264
|
-
HTTP_CODE=$(http "/" "-w %{http_code}")
|
|
265
|
-
RC=$?
|
|
266
|
-
if [[ ${RC} -ne 0 ]]; then
|
|
267
|
-
echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with RC ${RC}"
|
|
268
|
-
exit ${RC}
|
|
269
|
-
fi
|
|
270
|
-
# ready if HTTP code 200, 503 is tolerable if ES version is 6.x
|
|
271
|
-
if [[ ${HTTP_CODE} == "200" ]]; then
|
|
272
|
-
exit 0
|
|
273
|
-
elif [[ ${HTTP_CODE} == "503" && "{{ include "elasticsearch.esMajorVersion" . }}" == "6" ]]; then
|
|
274
|
-
exit 0
|
|
275
|
-
else
|
|
276
|
-
echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with HTTP code ${HTTP_CODE}"
|
|
277
|
-
exit 1
|
|
278
|
-
fi
|
|
279
|
-
|
|
280
|
-
else
|
|
281
|
-
echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
|
|
282
|
-
if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" "--fail" ; then
|
|
283
|
-
touch ${START_FILE}
|
|
284
|
-
exit 0
|
|
285
|
-
else
|
|
286
|
-
echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
|
|
287
|
-
exit 1
|
|
288
|
-
fi
|
|
289
|
-
fi
|
|
290
|
-
{{ toYaml .Values.readinessProbe | indent 10 }}
|
|
291
|
-
ports:
|
|
292
|
-
- name: http
|
|
293
|
-
containerPort: {{ .Values.httpPort }}
|
|
294
|
-
- name: transport
|
|
295
|
-
containerPort: {{ .Values.transportPort }}
|
|
296
|
-
resources:
|
|
297
|
-
{{ toYaml .Values.resources | indent 10 }}
|
|
298
|
-
env:
|
|
299
|
-
- name: node.name
|
|
300
|
-
valueFrom:
|
|
301
|
-
fieldRef:
|
|
302
|
-
fieldPath: metadata.name
|
|
303
|
-
{{- if eq .Values.roles.master "true" }}
|
|
304
|
-
{{- if ge (int (include "elasticsearch.esMajorVersion" .)) 7 }}
|
|
305
|
-
- name: cluster.initial_master_nodes
|
|
306
|
-
value: "{{ template "elasticsearch.endpoints" . }}"
|
|
307
|
-
{{- else }}
|
|
308
|
-
- name: discovery.zen.minimum_master_nodes
|
|
309
|
-
value: "{{ .Values.minimumMasterNodes }}"
|
|
310
|
-
{{- end }}
|
|
311
|
-
{{- end }}
|
|
312
|
-
{{- if lt (int (include "elasticsearch.esMajorVersion" .)) 7 }}
|
|
313
|
-
- name: discovery.zen.ping.unicast.hosts
|
|
314
|
-
value: "{{ template "elasticsearch.masterService" . }}-headless"
|
|
315
|
-
{{- else }}
|
|
316
|
-
- name: discovery.seed_hosts
|
|
317
|
-
value: "{{ template "elasticsearch.masterService" . }}-headless"
|
|
318
|
-
{{- end }}
|
|
319
|
-
- name: cluster.name
|
|
320
|
-
value: "{{ .Values.clusterName }}"
|
|
321
|
-
- name: network.host
|
|
322
|
-
value: "{{ .Values.networkHost }}"
|
|
323
|
-
- name: cluster.deprecation_indexing.enabled
|
|
324
|
-
value: "{{ .Values.clusterDeprecationIndexing }}"
|
|
325
|
-
{{- if .Values.esJavaOpts }}
|
|
326
|
-
- name: ES_JAVA_OPTS
|
|
327
|
-
value: "{{ .Values.esJavaOpts }}"
|
|
328
|
-
{{- end }}
|
|
329
|
-
{{- range $role, $enabled := .Values.roles }}
|
|
330
|
-
- name: node.{{ $role }}
|
|
331
|
-
value: "{{ $enabled }}"
|
|
332
|
-
{{- end }}
|
|
333
|
-
{{- if .Values.extraEnvs }}
|
|
334
|
-
{{ toYaml .Values.extraEnvs | indent 10 }}
|
|
335
|
-
{{- end }}
|
|
336
|
-
{{- if .Values.envFrom }}
|
|
337
|
-
envFrom:
|
|
338
|
-
{{ toYaml .Values.envFrom | indent 10 }}
|
|
339
|
-
{{- end }}
|
|
340
|
-
volumeMounts:
|
|
341
|
-
{{- if .Values.persistence.enabled }}
|
|
342
|
-
- name: "{{ template "elasticsearch.uname" . }}"
|
|
343
|
-
mountPath: /usr/share/elasticsearch/data
|
|
344
|
-
{{- end }}
|
|
345
|
-
{{ if .Values.keystore }}
|
|
346
|
-
- name: keystore
|
|
347
|
-
mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore
|
|
348
|
-
subPath: elasticsearch.keystore
|
|
349
|
-
{{ end }}
|
|
350
|
-
{{- range .Values.secretMounts }}
|
|
351
|
-
- name: {{ .name }}
|
|
352
|
-
mountPath: {{ .path }}
|
|
353
|
-
{{- if .subPath }}
|
|
354
|
-
subPath: {{ .subPath }}
|
|
355
|
-
{{- end }}
|
|
356
|
-
{{- end }}
|
|
357
|
-
{{- range $path, $config := .Values.esConfig }}
|
|
358
|
-
- name: esconfig
|
|
359
|
-
mountPath: /usr/share/elasticsearch/config/{{ $path }}
|
|
360
|
-
subPath: {{ $path }}
|
|
361
|
-
{{- end -}}
|
|
362
|
-
{{- range $path, $config := .Values.esJvmOptions }}
|
|
363
|
-
- name: esjvmoptions
|
|
364
|
-
mountPath: /usr/share/elasticsearch/config/jvm.options.d/{{ $path }}
|
|
365
|
-
subPath: {{ $path }}
|
|
366
|
-
{{- end -}}
|
|
367
|
-
{{- if .Values.extraVolumeMounts }}
|
|
368
|
-
# Currently some extra blocks accept strings
|
|
369
|
-
# to continue with backwards compatibility this is being kept
|
|
370
|
-
# whilst also allowing for yaml to be specified too.
|
|
371
|
-
{{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }}
|
|
372
|
-
{{ tpl .Values.extraVolumeMounts . | indent 10 }}
|
|
373
|
-
{{- else }}
|
|
374
|
-
{{ toYaml .Values.extraVolumeMounts | indent 10 }}
|
|
375
|
-
{{- end }}
|
|
376
|
-
{{- end }}
|
|
377
|
-
{{- if .Values.lifecycle }}
|
|
378
|
-
lifecycle:
|
|
379
|
-
{{ toYaml .Values.lifecycle | indent 10 }}
|
|
380
|
-
{{- end }}
|
|
381
|
-
{{- if .Values.extraContainers }}
|
|
382
|
-
# Currently some extra blocks accept strings
|
|
383
|
-
# to continue with backwards compatibility this is being kept
|
|
384
|
-
# whilst also allowing for yaml to be specified too.
|
|
385
|
-
{{- if eq "string" (printf "%T" .Values.extraContainers) }}
|
|
386
|
-
{{ tpl .Values.extraContainers . | indent 6 }}
|
|
387
|
-
{{- else }}
|
|
388
|
-
{{ toYaml .Values.extraContainers | indent 6 }}
|
|
389
|
-
{{- end }}
|
|
390
|
-
{{- end }}
|
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
clusterName: "elasticsearch"
|
|
3
|
-
nodeGroup: "master"
|
|
4
|
-
|
|
5
|
-
# The service that non master groups will try to connect to when joining the cluster
|
|
6
|
-
# This should be set to clusterName + "-" + nodeGroup for your master group
|
|
7
|
-
masterService: ""
|
|
8
|
-
|
|
9
|
-
# Elasticsearch roles that will be applied to this nodeGroup
|
|
10
|
-
# These will be set as environment variables. E.g. node.master=true
|
|
11
|
-
roles:
|
|
12
|
-
master: "true"
|
|
13
|
-
ingest: "true"
|
|
14
|
-
data: "true"
|
|
15
|
-
remote_cluster_client: "true"
|
|
16
|
-
ml: "true"
|
|
17
|
-
|
|
18
|
-
replicas: 3
|
|
19
|
-
minimumMasterNodes: 2
|
|
20
|
-
|
|
21
|
-
esMajorVersion: ""
|
|
22
|
-
|
|
23
|
-
clusterDeprecationIndexing: "false"
|
|
24
|
-
|
|
25
|
-
# Allows you to add any config files in /usr/share/elasticsearch/config/
|
|
26
|
-
# such as elasticsearch.yml and log4j2.properties
|
|
27
|
-
esConfig: {}
|
|
28
|
-
# elasticsearch.yml: |
|
|
29
|
-
# key:
|
|
30
|
-
# nestedkey: value
|
|
31
|
-
# log4j2.properties: |
|
|
32
|
-
# key = value
|
|
33
|
-
|
|
34
|
-
esJvmOptions: {}
|
|
35
|
-
# processors.options: |
|
|
36
|
-
# -XX:ActiveProcessorCount=3
|
|
37
|
-
|
|
38
|
-
# Extra environment variables to append to this nodeGroup
|
|
39
|
-
# This will be appended to the current 'env:' key. You can use any of the kubernetes env
|
|
40
|
-
# syntax here
|
|
41
|
-
extraEnvs: []
|
|
42
|
-
# - name: MY_ENVIRONMENT_VAR
|
|
43
|
-
# value: the_value_goes_here
|
|
44
|
-
|
|
45
|
-
# Allows you to load environment variables from kubernetes secret or config map
|
|
46
|
-
envFrom: []
|
|
47
|
-
# - secretRef:
|
|
48
|
-
# name: env-secret
|
|
49
|
-
# - configMapRef:
|
|
50
|
-
# name: config-map
|
|
51
|
-
|
|
52
|
-
# A list of secrets and their paths to mount inside the pod
|
|
53
|
-
# This is useful for mounting certificates for security and for mounting
|
|
54
|
-
# the X-Pack license
|
|
55
|
-
secretMounts: []
|
|
56
|
-
# - name: elastic-certificates
|
|
57
|
-
# secretName: elastic-certificates
|
|
58
|
-
# path: /usr/share/elasticsearch/config/certs
|
|
59
|
-
# defaultMode: 0755
|
|
60
|
-
|
|
61
|
-
hostAliases: []
|
|
62
|
-
#- ip: "127.0.0.1"
|
|
63
|
-
# hostnames:
|
|
64
|
-
# - "foo.local"
|
|
65
|
-
# - "bar.local"
|
|
66
|
-
|
|
67
|
-
image: "docker.elastic.co/elasticsearch/elasticsearch"
|
|
68
|
-
imageTag: "7.16.3"
|
|
69
|
-
imagePullPolicy: "IfNotPresent"
|
|
70
|
-
|
|
71
|
-
podAnnotations:
|
|
72
|
-
{}
|
|
73
|
-
# iam.amazonaws.com/role: es-cluster
|
|
74
|
-
|
|
75
|
-
# additionals labels
|
|
76
|
-
labels: {}
|
|
77
|
-
|
|
78
|
-
esJavaOpts: "" # example: "-Xmx1g -Xms1g"
|
|
79
|
-
|
|
80
|
-
resources:
|
|
81
|
-
requests:
|
|
82
|
-
cpu: "1000m"
|
|
83
|
-
memory: "2Gi"
|
|
84
|
-
limits:
|
|
85
|
-
cpu: "1000m"
|
|
86
|
-
memory: "2Gi"
|
|
87
|
-
|
|
88
|
-
initResources:
|
|
89
|
-
{}
|
|
90
|
-
# limits:
|
|
91
|
-
# cpu: "25m"
|
|
92
|
-
# # memory: "128Mi"
|
|
93
|
-
# requests:
|
|
94
|
-
# cpu: "25m"
|
|
95
|
-
# memory: "128Mi"
|
|
96
|
-
|
|
97
|
-
networkHost: "0.0.0.0"
|
|
98
|
-
|
|
99
|
-
volumeClaimTemplate:
|
|
100
|
-
accessModes: ["ReadWriteOnce"]
|
|
101
|
-
resources:
|
|
102
|
-
requests:
|
|
103
|
-
storage: 30Gi
|
|
104
|
-
|
|
105
|
-
rbac:
|
|
106
|
-
create: false
|
|
107
|
-
serviceAccountAnnotations: {}
|
|
108
|
-
serviceAccountName: ""
|
|
109
|
-
automountToken: true
|
|
110
|
-
|
|
111
|
-
podSecurityPolicy:
|
|
112
|
-
create: false
|
|
113
|
-
name: ""
|
|
114
|
-
spec:
|
|
115
|
-
privileged: true
|
|
116
|
-
fsGroup:
|
|
117
|
-
rule: RunAsAny
|
|
118
|
-
runAsUser:
|
|
119
|
-
rule: RunAsAny
|
|
120
|
-
seLinux:
|
|
121
|
-
rule: RunAsAny
|
|
122
|
-
supplementalGroups:
|
|
123
|
-
rule: RunAsAny
|
|
124
|
-
volumes:
|
|
125
|
-
- secret
|
|
126
|
-
- configMap
|
|
127
|
-
- persistentVolumeClaim
|
|
128
|
-
- emptyDir
|
|
129
|
-
|
|
130
|
-
persistence:
|
|
131
|
-
enabled: true
|
|
132
|
-
labels:
|
|
133
|
-
# Add default labels for the volumeClaimTemplate of the StatefulSet
|
|
134
|
-
enabled: false
|
|
135
|
-
annotations: {}
|
|
136
|
-
|
|
137
|
-
extraVolumes:
|
|
138
|
-
[]
|
|
139
|
-
# - name: extras
|
|
140
|
-
# emptyDir: {}
|
|
141
|
-
|
|
142
|
-
extraVolumeMounts:
|
|
143
|
-
[]
|
|
144
|
-
# - name: extras
|
|
145
|
-
# mountPath: /usr/share/extras
|
|
146
|
-
# readOnly: true
|
|
147
|
-
|
|
148
|
-
extraContainers:
|
|
149
|
-
[]
|
|
150
|
-
# - name: do-something
|
|
151
|
-
# image: busybox
|
|
152
|
-
# command: ['do', 'something']
|
|
153
|
-
|
|
154
|
-
extraInitContainers:
|
|
155
|
-
[]
|
|
156
|
-
# - name: do-something
|
|
157
|
-
# image: busybox
|
|
158
|
-
# command: ['do', 'something']
|
|
159
|
-
|
|
160
|
-
# This is the PriorityClass settings as defined in
|
|
161
|
-
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
|
|
162
|
-
priorityClassName: ""
|
|
163
|
-
|
|
164
|
-
# By default this will make sure two pods don't end up on the same node
|
|
165
|
-
# Changing this to a region would allow you to spread pods across regions
|
|
166
|
-
antiAffinityTopologyKey: "kubernetes.io/hostname"
|
|
167
|
-
|
|
168
|
-
# Hard means that by default pods will only be scheduled if there are enough nodes for them
|
|
169
|
-
# and that they will never end up on the same node. Setting this to soft will do this "best effort"
|
|
170
|
-
antiAffinity: "hard"
|
|
171
|
-
|
|
172
|
-
# This is the node affinity settings as defined in
|
|
173
|
-
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
|
174
|
-
nodeAffinity: {}
|
|
175
|
-
|
|
176
|
-
# The default is to deploy all pods serially. By setting this to parallel all pods are started at
|
|
177
|
-
# the same time when bootstrapping the cluster
|
|
178
|
-
podManagementPolicy: "Parallel"
|
|
179
|
-
|
|
180
|
-
# The environment variables injected by service links are not used, but can lead to slow Elasticsearch boot times when
|
|
181
|
-
# there are many services in the current namespace.
|
|
182
|
-
# If you experience slow pod startups you probably want to set this to `false`.
|
|
183
|
-
enableServiceLinks: true
|
|
184
|
-
|
|
185
|
-
protocol: http
|
|
186
|
-
httpPort: 9200
|
|
187
|
-
transportPort: 9300
|
|
188
|
-
|
|
189
|
-
service:
|
|
190
|
-
enabled: true
|
|
191
|
-
labels: {}
|
|
192
|
-
labelsHeadless: {}
|
|
193
|
-
type: ClusterIP
|
|
194
|
-
nodePort: ""
|
|
195
|
-
annotations: {}
|
|
196
|
-
httpPortName: http
|
|
197
|
-
transportPortName: transport
|
|
198
|
-
loadBalancerIP: ""
|
|
199
|
-
loadBalancerSourceRanges: []
|
|
200
|
-
externalTrafficPolicy: ""
|
|
201
|
-
|
|
202
|
-
updateStrategy: RollingUpdate
|
|
203
|
-
|
|
204
|
-
# This is the max unavailable setting for the pod disruption budget
|
|
205
|
-
# The default value of 1 will make sure that kubernetes won't allow more than 1
|
|
206
|
-
# of your pods to be unavailable during maintenance
|
|
207
|
-
maxUnavailable: 1
|
|
208
|
-
|
|
209
|
-
podSecurityContext:
|
|
210
|
-
fsGroup: 1000
|
|
211
|
-
runAsUser: 1000
|
|
212
|
-
|
|
213
|
-
securityContext:
|
|
214
|
-
capabilities:
|
|
215
|
-
drop:
|
|
216
|
-
- ALL
|
|
217
|
-
# readOnlyRootFilesystem: true
|
|
218
|
-
runAsNonRoot: true
|
|
219
|
-
runAsUser: 1000
|
|
220
|
-
|
|
221
|
-
# How long to wait for elasticsearch to stop gracefully
|
|
222
|
-
terminationGracePeriod: 120
|
|
223
|
-
|
|
224
|
-
sysctlVmMaxMapCount: 262144
|
|
225
|
-
|
|
226
|
-
readinessProbe:
|
|
227
|
-
failureThreshold: 3
|
|
228
|
-
initialDelaySeconds: 10
|
|
229
|
-
periodSeconds: 10
|
|
230
|
-
successThreshold: 3
|
|
231
|
-
timeoutSeconds: 5
|
|
232
|
-
|
|
233
|
-
# https://www.elastic.co/guide/en/elasticsearch/reference/7.16/cluster-health.html#request-params wait_for_status
|
|
234
|
-
clusterHealthCheckParams: "wait_for_status=green&timeout=1s"
|
|
235
|
-
|
|
236
|
-
## Use an alternate scheduler.
|
|
237
|
-
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
|
238
|
-
##
|
|
239
|
-
schedulerName: ""
|
|
240
|
-
|
|
241
|
-
imagePullSecrets: []
|
|
242
|
-
nodeSelector: {}
|
|
243
|
-
tolerations: []
|
|
244
|
-
|
|
245
|
-
# Enabling this will publicly expose your Elasticsearch instance.
|
|
246
|
-
# Only enable this if you have security enabled on your cluster
|
|
247
|
-
ingress:
|
|
248
|
-
enabled: false
|
|
249
|
-
annotations: {}
|
|
250
|
-
# kubernetes.io/ingress.class: nginx
|
|
251
|
-
# kubernetes.io/tls-acme: "true"
|
|
252
|
-
className: "nginx"
|
|
253
|
-
pathtype: ImplementationSpecific
|
|
254
|
-
hosts:
|
|
255
|
-
- host: chart-example.local
|
|
256
|
-
paths:
|
|
257
|
-
- path: /
|
|
258
|
-
tls: []
|
|
259
|
-
# - secretName: chart-example-tls
|
|
260
|
-
# hosts:
|
|
261
|
-
# - chart-example.local
|
|
262
|
-
|
|
263
|
-
nameOverride: ""
|
|
264
|
-
fullnameOverride: ""
|
|
265
|
-
healthNameOverride: ""
|
|
266
|
-
|
|
267
|
-
lifecycle:
|
|
268
|
-
{}
|
|
269
|
-
# preStop:
|
|
270
|
-
# exec:
|
|
271
|
-
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
|
|
272
|
-
# postStart:
|
|
273
|
-
# exec:
|
|
274
|
-
# command:
|
|
275
|
-
# - bash
|
|
276
|
-
# - -c
|
|
277
|
-
# - |
|
|
278
|
-
# #!/bin/bash
|
|
279
|
-
# # Add a template to adjust number of shards/replicas
|
|
280
|
-
# TEMPLATE_NAME=my_template
|
|
281
|
-
# INDEX_PATTERN="logstash-*"
|
|
282
|
-
# SHARD_COUNT=8
|
|
283
|
-
# REPLICA_COUNT=1
|
|
284
|
-
# ES_URL=http://localhost:9200
|
|
285
|
-
# while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done
|
|
286
|
-
# curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}'
|
|
287
|
-
|
|
288
|
-
sysctlInitContainer:
|
|
289
|
-
enabled: true
|
|
290
|
-
|
|
291
|
-
keystore: []
|
|
292
|
-
|
|
293
|
-
networkPolicy:
|
|
294
|
-
## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
|
|
295
|
-
## In order for a Pod to access Elasticsearch, it needs to have the following label:
|
|
296
|
-
## {{ template "uname" . }}-client: "true"
|
|
297
|
-
## Example for default configuration to access HTTP port:
|
|
298
|
-
## elasticsearch-master-http-client: "true"
|
|
299
|
-
## Example for default configuration to access transport port:
|
|
300
|
-
## elasticsearch-master-transport-client: "true"
|
|
301
|
-
|
|
302
|
-
http:
|
|
303
|
-
enabled: false
|
|
304
|
-
## if explicitNamespacesSelector is not set or set to {}, only client Pods being in the networkPolicy's namespace
|
|
305
|
-
## and matching all criteria can reach the DB.
|
|
306
|
-
## But sometimes, we want the Pods to be accessible to clients from other namespaces, in this case, we can use this
|
|
307
|
-
## parameter to select these namespaces
|
|
308
|
-
##
|
|
309
|
-
# explicitNamespacesSelector:
|
|
310
|
-
# # Accept from namespaces with all those different rules (only from whitelisted Pods)
|
|
311
|
-
# matchLabels:
|
|
312
|
-
# role: frontend
|
|
313
|
-
# matchExpressions:
|
|
314
|
-
# - {key: role, operator: In, values: [frontend]}
|
|
315
|
-
## Additional NetworkPolicy Ingress "from" rules to set. Note that all rules are OR-ed.
|
|
316
|
-
##
|
|
317
|
-
# additionalRules:
|
|
318
|
-
# - podSelector:
|
|
319
|
-
# matchLabels:
|
|
320
|
-
# role: frontend
|
|
321
|
-
# - podSelector:
|
|
322
|
-
# matchExpressions:
|
|
323
|
-
# - key: role
|
|
324
|
-
# operator: In
|
|
325
|
-
# values:
|
|
326
|
-
# - frontend
|
|
327
|
-
|
|
328
|
-
transport:
|
|
329
|
-
## Note that all Elasticsearch Pods can talk to themselves using transport port even if enabled.
|
|
330
|
-
enabled: false
|
|
331
|
-
# explicitNamespacesSelector:
|
|
332
|
-
# matchLabels:
|
|
333
|
-
# role: frontend
|
|
334
|
-
# matchExpressions:
|
|
335
|
-
# - {key: role, operator: In, values: [frontend]}
|
|
336
|
-
# additionalRules:
|
|
337
|
-
# - podSelector:
|
|
338
|
-
# matchLabels:
|
|
339
|
-
# role: frontend
|
|
340
|
-
# - podSelector:
|
|
341
|
-
# matchExpressions:
|
|
342
|
-
# - key: role
|
|
343
|
-
# operator: In
|
|
344
|
-
# values:
|
|
345
|
-
# - frontend
|
|
346
|
-
|
|
347
|
-
tests:
|
|
348
|
-
enabled: true
|
|
349
|
-
|
|
350
|
-
# Deprecated
|
|
351
|
-
# please use the above podSecurityContext.fsGroup instead
|
|
352
|
-
fsGroup: ""
|