diff --git a/elasticsearch/README.md b/elasticsearch/README.md index d9c278b2a..95efdbaaf 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -123,6 +123,7 @@ support multiple versions with minimal changes. | `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `""` | | `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `""` | | `fullnameOverride` | Overrides the `clusterName` and `nodeGroup` when used in the naming of resources. This should only be used when using a single `nodeGroup`, otherwise you will have name conflicts | `""` | +| `healthNameOverride` | Overrides `test-elasticsearch-health` pod name | `""` | | `hostAliases` | Configurable [hostAliases][] | `[]` | | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. If you change this you will also need to set [http.port][] in `extraEnvs` | `9200` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | diff --git a/elasticsearch/templates/test/test-elasticsearch-health.yaml b/elasticsearch/templates/test/test-elasticsearch-health.yaml index dd5eaa043..18e10a884 100644 --- a/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ b/elasticsearch/templates/test/test-elasticsearch-health.yaml @@ -2,7 +2,11 @@ apiVersion: v1 kind: Pod metadata: +{{- if .Values.healthNameOverride }} + name: {{ .Values.healthNameOverride | quote }} +{{- else }} name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" +{{- end }} annotations: "helm.sh/hook": test "helm.sh/hook-delete-policy": hook-succeeded @@ -10,7 +14,11 @@ spec: securityContext: {{ toYaml .Values.podSecurityContext | indent 4 }} containers: +{{- if .Values.healthNameOverride }} + - name: {{ .Values.healthNameOverride | quote }} +{{- else }} - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" +{{- end }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" command: diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 4bb6850db..63a2aa60b 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -252,6 +252,7 @@ ingress: nameOverride: "" fullnameOverride: "" +healthNameOverride: "" lifecycle: {} # preStop: