From 3ce8d71483745dda6683625c5579e83e6c8f3a2b Mon Sep 17 00:00:00 2001 From: "Ritchie, Frank (fr801x)" Date: Thu, 31 Mar 2022 12:16:56 -0500 Subject: [PATCH] Use python3 when present Some newer images include python3 but not python. This change will alias python to python3 when the executable is found. Change-Id: I752a265c67887b6e6b2389bf4009bdbf8e2aed09 --- elasticsearch/Chart.yaml | 2 +- elasticsearch/templates/bin/_helm-tests.sh.tpl | 4 ++++ releasenotes/notes/elasticsearch.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index ffde00b76..77c65f597 100644 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v7.6.2 description: OpenStack-Helm ElasticSearch name: elasticsearch -version: 0.2.15 +version: 0.2.16 home: https://www.elastic.co/ sources: - https://github.com/elastic/elasticsearch diff --git a/elasticsearch/templates/bin/_helm-tests.sh.tpl b/elasticsearch/templates/bin/_helm-tests.sh.tpl index bf13480cf..bd980398f 100644 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ b/elasticsearch/templates/bin/_helm-tests.sh.tpl @@ -15,6 +15,10 @@ limitations under the License. set -ex +if [[ $(which python3) ]]; then + alias python=python3 +fi + function create_test_index () { index_result=$(curl ${CACERT_OPTION} -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \ -XPUT "${ELASTICSEARCH_ENDPOINT}/test_index?pretty" -H 'Content-Type: application/json' -d' diff --git a/releasenotes/notes/elasticsearch.yaml b/releasenotes/notes/elasticsearch.yaml index 907550ce6..b94cf2f8f 100644 --- a/releasenotes/notes/elasticsearch.yaml +++ b/releasenotes/notes/elasticsearch.yaml @@ -25,4 +25,5 @@ elasticsearch: - 0.2.13 Update htk requirements - 0.2.14 Fix cronjob rendering - 0.2.15 Fix elasticsearch-data shutdown + - 0.2.16 Use python3 for helm tests when possible ...