Rename to opensearch

Change-Id: I132123d4ac3a6e865c14e71806450aa760c50a15
diff --git a/logging/opendistro_setting/Chart.yaml b/logging/opensearch_setting/Chart.yaml
similarity index 97%
rename from logging/opendistro_setting/Chart.yaml
rename to logging/opensearch_setting/Chart.yaml
index 8d7ea20..bc6258c 100644
--- a/logging/opendistro_setting/Chart.yaml
+++ b/logging/opensearch_setting/Chart.yaml
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
 apiVersion: v2
-name: opendistro-setting
+name: opensearch-setting
 description: A Helm chart deploying container to config opensearch services
 
 # A chart can be either an 'application' or a 'library' chart.
diff --git a/logging/opendistro_setting/templates/configmap-script.yml b/logging/opensearch_setting/templates/configmap-script.yml
similarity index 92%
rename from logging/opendistro_setting/templates/configmap-script.yml
rename to logging/opensearch_setting/templates/configmap-script.yml
index 126300e..a90adcb 100644
--- a/logging/opendistro_setting/templates/configmap-script.yml
+++ b/logging/opensearch_setting/templates/configmap-script.yml
@@ -20,7 +20,7 @@
     dest_dir=${DEST_DIR}
     monitor_dir=${MONITOR_DIR}
     setting_dir=${SETTING_DIR}
-    temp_dir=${OUTPUT_DIR:-/opendistro_temp}
+    temp_dir=${OUTPUT_DIR:-/opensearch_temp}
 
     curl_opts=""
     if [ ! -z $auth_username ]; then
@@ -38,7 +38,7 @@
 
     #return destination id if exist
     check_destination() { name=$1
-        curl -s $curl_opts -H "content-type: application/json" "$host/_opendistro/_alerting/destinations" | jq -r ".destinations[] | select(.name == \"$name\").id"
+        curl -s $curl_opts -H "content-type: application/json" "$host/_opensearch/_alerting/destinations" | jq -r ".destinations[] | select(.name == \"$name\").id"
     }
 
     update_destination() {
@@ -48,7 +48,7 @@
         #compress the json file to reduce the http size
         new_file="$temp_dir/$file"
         jq -c '' < "$file" > "$new_file"
-        curl -s $curl_opts -X PUT -H "content-type: application/json" -d "@$new_file" "$host/_opendistro/_alerting/destinations/$id"
+        curl -s $curl_opts -X PUT -H "content-type: application/json" -d "@$new_file" "$host/_opensearch/_alerting/destinations/$id"
         rm "$new_file"
         echo "  "
     }
@@ -58,7 +58,7 @@
         file=$1
         new_file="$temp_dir/$file"
         jq -c '' < "$file" > "$new_file"
-        curl -s $curl_opts -X POST -H "content-type: application/json" -d "@$new_file" "$host/_opendistro/_alerting/destinations"
+        curl -s $curl_opts -X POST -H "content-type: application/json" -d "@$new_file" "$host/_opensearch/_alerting/destinations"
         rm "$new_file"
         echo "  "
     }
@@ -68,7 +68,7 @@
         name=$1
         curl -s $curl_opts -H "content-type: application/json" \
             --data "{\"query\":{\"match\":{ \"monitor.name\": \"$name\"}}}" \
-            "$host/_opendistro/_alerting/monitors/_search" | jq -r '.hits.hits[0]._id'
+            "$host/_opensearch/_alerting/monitors/_search" | jq -r '.hits.hits[0]._id'
     }
 
     create_monitor() {
@@ -77,7 +77,7 @@
         new_file="$temp_dir/$file"
         echo "create monitor"
         jq -c ".triggers[0].actions[0].destination_id=\"$dest_id\""  "$file" > "$new_file"
-        curl -s $curl_opts -X POST -H "content-type: application/json" -d "@$new_file" "$host/_opendistro/_alerting/monitors/"
+        curl -s $curl_opts -X POST -H "content-type: application/json" -d "@$new_file" "$host/_opensearch/_alerting/monitors/"
         rm "$new_file"
         echo " "
     }
@@ -89,7 +89,7 @@
         new_file="$temp_dir/$file"
         echo "update monitor"
         jq -c ".triggers[0].actions[0].destination_id=\"$dest_id\""  "$file" > "$new_file"
-        curl -s $curl_opts -X PUT -H "content-type: application/json" -d "@$new_file" "$host/_opendistro/_alerting/monitors/$monitor_id"
+        curl -s $curl_opts -X PUT -H "content-type: application/json" -d "@$new_file" "$host/_opensearch/_alerting/monitors/$monitor_id"
         rm "$new_file"
         echo " "
     }
diff --git a/logging/opendistro_setting/templates/deployment.yml b/logging/opensearch_setting/templates/deployment.yml
similarity index 97%
rename from logging/opendistro_setting/templates/deployment.yml
rename to logging/opensearch_setting/templates/deployment.yml
index af9515c..3f284a6 100644
--- a/logging/opendistro_setting/templates/deployment.yml
+++ b/logging/opensearch_setting/templates/deployment.yml
@@ -9,11 +9,11 @@
   replicas: 1
   selector:
     matchLabels:
-      app: opendistro-config
+      app: opensearch-config
   template:
     metadata:
       labels:
-        app: opendistro-config
+        app: opensearch-config
     spec:
       containers:
         - name: config
diff --git a/logging/opendistro_setting/values.yaml b/logging/opensearch_setting/values.yaml
similarity index 79%
rename from logging/opendistro_setting/values.yaml
rename to logging/opensearch_setting/values.yaml
index 52841e6..b540c46 100644
--- a/logging/opendistro_setting/values.yaml
+++ b/logging/opensearch_setting/values.yaml
@@ -11,13 +11,13 @@
     skip_tls: true
 
 configuration:
-  base_dir: /tmp/opendistro
+  base_dir: /tmp/opensearch
   # Have to prepare the configmap first
   # setting_configmap: opensearch-kibana-setting
   # setting: settings/
   # Have to prepare the configmap first
-  # monitor_configmap: opendistro-kibana-monitor
+  # monitor_configmap: opensearch-kibana-monitor
   # monitor: monitor/
   # Have to prepare the secret first
-  # destination_secret: opendistro-kibana-destination
+  # destination_secret: opensearch-kibana-destination
   # destination: destination/