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

[elasticsearch] remove usage of ELASTIC_USERNAME (#1506) #1507

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions elasticsearch/examples/config/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ http:
http://localhost:9200/_cluster/health:
status: 200
timeout: 2000
username: "{{ .Env.ELASTIC_USERNAME }}"
username: elastic
password: "{{ .Env.ELASTIC_PASSWORD }}"
body:
- "green"
Expand All @@ -12,7 +12,7 @@ http:
http://localhost:9200:
status: 200
timeout: 2000
username: "{{ .Env.ELASTIC_USERNAME }}"
username: elastic
password: "{{ .Env.ELASTIC_PASSWORD }}"
body:
- '"cluster_name" : "config"'
Expand Down
5 changes: 0 additions & 5 deletions elasticsearch/examples/config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ extraEnvs:
secretKeyRef:
name: elastic-config-credentials
key: password
- name: ELASTIC_USERNAME
valueFrom:
secretKeyRef:
name: elastic-config-credentials
key: username

# This is just a dummy file to make sure that
# the keystore can be mounted at the same time
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch/examples/security/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ http:
status: 200
timeout: 2000
allow-insecure: true
username: "{{ .Env.ELASTIC_USERNAME }}"
username: elastic
password: "{{ .Env.ELASTIC_PASSWORD }}"
body:
- "green"
Expand All @@ -14,7 +14,7 @@ http:
status: 200
timeout: 2000
allow-insecure: true
username: "{{ .Env.ELASTIC_USERNAME }}"
username: elastic
password: "{{ .Env.ELASTIC_PASSWORD }}"
body:
- '"cluster_name" : "security"'
Expand All @@ -24,7 +24,7 @@ http:
status: 200
timeout: 2000
allow-insecure: true
username: "{{ .Env.ELASTIC_USERNAME }}"
username: elastic
password: "{{ .Env.ELASTIC_PASSWORD }}"
body:
- "active"
Expand Down
5 changes: 0 additions & 5 deletions elasticsearch/examples/security/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ extraEnvs:
secretKeyRef:
name: elastic-credentials
key: password
- name: ELASTIC_USERNAME
valueFrom:
secretKeyRef:
name: elastic-credentials
key: username

secretMounts:
- name: elastic-certificates
Expand Down
4 changes: 2 additions & 2 deletions elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ spec:
set -- "$@" $args
fi

if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then
set -- "$@" -u "${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}"
if [ -n "${ELASTIC_PASSWORD}" ]; then
set -- "$@" -u "elastic:${ELASTIC_PASSWORD}"
fi

curl --output /dev/null -k "$@" "{{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}${path}"
Expand Down