diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 8956dcc71..8e1a210f1 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -174,6 +174,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` | diff --git a/elasticsearch/templates/NOTES.txt b/elasticsearch/templates/NOTES.txt index 73edf425a..88b5dd5b1 100755 --- a/elasticsearch/templates/NOTES.txt +++ b/elasticsearch/templates/NOTES.txt @@ -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 -}} diff --git a/elasticsearch/templates/test/test-elasticsearch-health.yaml b/elasticsearch/templates/test/test-elasticsearch-health.yaml index 18e10a884..704cd3d59 100644 --- a/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ b/elasticsearch/templates/test/test-elasticsearch-health.yaml @@ -1,4 +1,5 @@ --- +{{- if .Values.tests.enabled -}} apiVersion: v1 kind: Pod metadata: @@ -32,3 +33,4 @@ spec: {{ toYaml .Values.imagePullSecrets | indent 4 }} {{- end }} restartPolicy: Never +{{- end -}} diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 4d107f1f9..36b0ef02d 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -335,6 +335,9 @@ networkPolicy: # values: # - frontend +tests: + enabled: true + # Deprecated # please use the above podSecurityContext.fsGroup instead fsGroup: ""