From 33577d40ca02429b31944668a46f49210e9989d7 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Tue, 29 Aug 2023 19:46:06 -0700 Subject: [PATCH] fix: add opensearch relationship generation (#115) --- install.yaml | 3 +- .../generate_opensearch_relationship.sh | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 platformsh/generate_opensearch_relationship.sh diff --git a/install.yaml b/install.yaml index 1fd335c..ef3c53f 100644 --- a/install.yaml +++ b/install.yaml @@ -7,6 +7,7 @@ project_files: - platformsh/generate_db_relationship.sh - platformsh/generate_elasticsearch_relationship.sh - platformsh/generate_memcached_relationship.sh + - platformsh/generate_opensearch_relationship.sh - platformsh/generate_redis_relationship.sh - platformsh/generate_redis-persistent_relationship.sh - platformsh/generate_route.sh @@ -185,7 +186,7 @@ post_install_actions: {{ $supported_db_types := list "postgres" "mysql" "mariadb" }} {{/* For supported services, key is the service name and value is the corresponding add-on to install if applicable (nil if not needed) */}} - {{ $supported_services := dict "redis" "ddev/ddev-redis" "redis-persistent" "ddev/ddev-redis" "memcached" "ddev/ddev-memcached" "elasticsearch" "ddev/ddev-elasticsearch" }} + {{ $supported_services := dict "redis" "ddev/ddev-redis" "redis-persistent" "ddev/ddev-redis" "memcached" "ddev/ddev-memcached" "elasticsearch" "ddev/ddev-elasticsearch" "opensearch" "ddev/ddev-elasticsearch" }} {{ if $supported_db_types | has $service_def.type }} {{/* Databases */}} diff --git a/platformsh/generate_opensearch_relationship.sh b/platformsh/generate_opensearch_relationship.sh new file mode 100755 index 0000000..adba083 --- /dev/null +++ b/platformsh/generate_opensearch_relationship.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +#ddev-generated + +export relationshipname=$1 + +read -r -d '' search_stanza <