Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 68c86de

Browse files
jmlrtnflaig
andauthored
[elasticsearch] add value to disable tests (#1116) (#1342)
* [elasticsearch] add value to disable tests Signed-off-by: nflaig <[email protected]> * [elasticsearch] add condition to not print test command when the test is disabled Signed-off-by: nflaig <[email protected]> Co-authored-by: Julien Mailleret <[email protected]> Co-authored-by: Nico Flaig <[email protected]>
1 parent d7d3224 commit 68c86de

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

elasticsearch/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ support multiple versions with minimal changes.
174174
| `sysctlInitContainer` | Allows you to disable the `sysctlInitContainer` if you are setting [sysctl vm.max_map_count][] with another method | `enabled: true` |
175175
| `sysctlVmMaxMapCount` | Sets the [sysctl vm.max_map_count][] needed for Elasticsearch | `262144` |
176176
| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` |
177+
| `tests.enabled` | Enable creating test related resources when running `helm template` or `helm test` | `true` |
177178
| `tolerations` | Configurable [tolerations][] | `[]` |
178179
| `transportPort` | The transport port that Kubernetes will use for the service. If you change this you will also need to set [transport port configuration][] in `extraEnvs` | `9300` |
179180
| `updateStrategy` | The [updateStrategy][] for the StatefulSet. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` |

elasticsearch/templates/NOTES.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
1. Watch all cluster members come up.
22
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "elasticsearch.uname" . }} -w
3+
{{- if .Values.tests.enabled -}}
34
2. Test cluster health using Helm test.
4-
$ helm test {{ .Release.Name }}
5+
$ helm --namespace={{ .Release.Namespace }} test {{ .Release.Name }}
6+
{{- end -}}

elasticsearch/templates/test/test-elasticsearch-health.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
{{- if .Values.tests.enabled -}}
23
apiVersion: v1
34
kind: Pod
45
metadata:
@@ -32,3 +33,4 @@ spec:
3233
{{ toYaml .Values.imagePullSecrets | indent 4 }}
3334
{{- end }}
3435
restartPolicy: Never
36+
{{- end -}}

elasticsearch/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ networkPolicy:
336336
# values:
337337
# - frontend
338338

339+
tests:
340+
enabled: true
341+
339342
# Deprecated
340343
# please use the above podSecurityContext.fsGroup instead
341344
fsGroup: ""

0 commit comments

Comments
 (0)