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

Commit

Permalink
[elasticsearch] add value to disable tests (elastic#1116)
Browse files Browse the repository at this point in the history
* [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]>
  • Loading branch information
nflaig and jmlrt committed Sep 13, 2021
1 parent ac77692 commit 7831750
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 @@ -173,6 +173,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 @@ -335,6 +335,9 @@ networkPolicy:
# values:
# - frontend

tests:
enabled: true

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

0 comments on commit 7831750

Please sign in to comment.