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

Commit

Permalink
[elasticsearch] add value to disable tests (#1116) (#1341)
Browse files Browse the repository at this point in the history
* [elasticsearch] add value to disable tests

Signed-off-by: nflaig <nflaig@protonmail.com>

* [elasticsearch] add condition to not print test command when the test is disabled

Signed-off-by: nflaig <nflaig@protonmail.com>

Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
  • Loading branch information
jmlrt and nflaig authored Sep 21, 2021
1 parent 4190bd7 commit 11483fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ support multiple versions with minimal changes.
| `sysctlInitContainer` | Allows you to disable the `sysctlInitContainer` if you are setting [sysctl vm.max_map_count][] with another method | `enabled: true` |
| `sysctlVmMaxMapCount` | Sets the [sysctl vm.max_map_count][] needed for Elasticsearch | `262144` |
| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` |
| `tests.enabled` | Enable creating test related resources when running `helm template` or `helm test` | `true` |
| `tolerations` | Configurable [tolerations][] | `[]` |
| `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` |
| `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` |
Expand Down
4 changes: 3 additions & 1 deletion elasticsearch/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
1. Watch all cluster members come up.
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "elasticsearch.uname" . }} -w
{{- if .Values.tests.enabled -}}
2. Test cluster health using Helm test.
$ helm test {{ .Release.Name }}
$ helm --namespace={{ .Release.Namespace }} test {{ .Release.Name }}
{{- end -}}
2 changes: 2 additions & 0 deletions elasticsearch/templates/test/test-elasticsearch-health.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
{{- if .Values.tests.enabled -}}
apiVersion: v1
kind: Pod
metadata:
Expand Down Expand Up @@ -32,3 +33,4 @@ spec:
{{ toYaml .Values.imagePullSecrets | indent 4 }}
{{- end }}
restartPolicy: Never
{{- end -}}
3 changes: 3 additions & 0 deletions elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ networkPolicy:
# values:
# - frontend

tests:
enabled: true

# Deprecated
# please use the above podSecurityContext.fsGroup instead
fsGroup: ""

0 comments on commit 11483fb

Please sign in to comment.