Skip to content

Commit 111b8d9

Browse files
test(opensearch-dashboards): Use the OpenSearch discovery ConfigMap for OpenSearch Dashboards
1 parent efbaffc commit 111b8d9

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

tests/templates/kuttl/opensearch-dashboards/20-install-opensearch-dashboards.yaml.j2

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
apiVersion: kuttl.dev/v1beta1
33
kind: TestStep
44
commands:
5-
# TODO Get opensearchHosts from discovery ConfigMap
6-
- script: >
7-
helm install opensearch-dashboards opensearch-dashboards
8-
--repo https://opensearch-project.github.io/helm-charts
9-
--version "{{ test_scenario['values']['opensearch'].split(',')[0] }}"
10-
--values 20_opensearch-dashboards-values.yaml
11-
{% if test_scenario['values']['server-use-tls'] == 'true' %}
12-
--set opensearchHosts=https://opensearch-nodes-default-headless.$NAMESPACE.svc.cluster.local:9200
13-
{% else %}
14-
--set opensearchHosts=http://opensearch-nodes-default-headless.$NAMESPACE.svc.cluster.local:9200
15-
{% endif %}
16-
--namespace $NAMESPACE
17-
--wait
5+
- script: |
6+
{% raw %}
7+
OPENSEARCH_URL=$(kubectl get configmaps opensearch \
8+
--namespace $NAMESPACE \
9+
--output=template='{{.data.OPENSEARCH_PROTOCOL}}://{{.data.OPENSEARCH_HOST}}:{{.data.OPENSEARCH_PORT}}')
10+
{% endraw %}
11+
12+
helm install opensearch-dashboards opensearch-dashboards \
13+
--repo https://opensearch-project.github.io/helm-charts \
14+
--version "{{ test_scenario['values']['opensearch'].split(',')[0] }}" \
15+
--values 20_opensearch-dashboards-values.yaml \
16+
--set opensearchHosts=$OPENSEARCH_URL \
17+
--namespace $NAMESPACE \
18+
--wait
1819
timeout: 600

tests/test-definition.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dimensions:
33
- name: opensearch
44
values:
55
# - 3.1.0
6+
# - 3.4.0
67
# To use a custom image, add a comma and the full name after the product version, e.g.:
78
# - 3.1.0,oci.stackable.tech/sandbox/opensearch:3.1.0-stackable0.0.0-dev
89
# - 3.1.0,localhost:5000/sdp/opensearch:3.1.0-stackable0.0.0-dev

0 commit comments

Comments
 (0)