summaryrefslogtreecommitdiffstats
path: root/k8s-bootstrap-container
diff options
context:
space:
mode:
authorJack Lucas <jflucas@research.att.com>2018-05-10 18:55:45 +0000
committerJack Lucas <jflucas@research.att.com>2018-05-10 18:56:44 +0000
commitbb206c72f598a5527b1b2606366b52ab18d8246f (patch)
tree9bb08e2312876928729df123732517a42c4bdc94 /k8s-bootstrap-container
parente6d18573f4a45b144e0b56dd1e59715a1bdd2c58 (diff)
Remove hard-coded namespace reference
Change-Id: I5f500c0f00ea8188a3eaffcde7a10807a03fc59c Issue-ID: DCAEGEN2-496 Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'k8s-bootstrap-container')
-rwxr-xr-xk8s-bootstrap-container/bootstrap.sh12
-rw-r--r--k8s-bootstrap-container/pom.xml2
2 files changed, 10 insertions, 4 deletions
diff --git a/k8s-bootstrap-container/bootstrap.sh b/k8s-bootstrap-container/bootstrap.sh
index cea06ce..f3e9b5d 100755
--- a/k8s-bootstrap-container/bootstrap.sh
+++ b/k8s-bootstrap-container/bootstrap.sh
@@ -32,9 +32,15 @@ CBS_REG='{"ID": "dcae-cbs0", "Name": "config_binding_service", "Address": "confi
CBS_REG1='{"ID": "dcae-cbs1", "Name": "config-binding-service", "Address": "config-binding-service", "Port": 10000}'
CM_REG='{"ID": "dcae-cm0", "Name": "cloudify_manager", "Address": "cloudify-manager.onap", "Port": 80}'
INV_REG='{"ID": "dcae-inv0", "Name": "inventory", "Address": "inventory", "Port": 8080}'
-# Policy handler will be looked up from a plugin on CM, which is running in the "onap" namespace,
-# so the Address field has to add the .dcae qualifier.
-PH_REG='{"ID": "dcae-ph0", "Name": "policy_handler", "Address": "policy-handler.dcae", "Port": 25577}'
+# Policy handler will be looked up from a plugin on CM. If DCAE components are running in a different k8s
+# namespace than CM (which always runs in the common ONAP namespace), then the policy handler address must
+# be qualified with the DCAE namespace.
+PH_REG='{"ID": "dcae-ph0", "Name": "policy_handler", "Port": 25577, "Address: policy-handler'
+if [ ! -z "${DCAE_NAMESPACE}" ]
+then
+ PH_REG="${PH_REG}.${DCAE_NAMESPACE}"
+fi
+PH_REG="${PH_REG}\"}"
# Deploy components
# $1 -- name (for bp and deployment)
diff --git a/k8s-bootstrap-container/pom.xml b/k8s-bootstrap-container/pom.xml
index 85b99bc..782577d 100644
--- a/k8s-bootstrap-container/pom.xml
+++ b/k8s-bootstrap-container/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
<groupId>org.onap.dcaegen2.deployments</groupId>
<artifactId>k8s-bootstrap-container</artifactId>
<name>dcaegen2-deployments-k8s-bootstrap-container</name>
- <version>1.1.8</version>
+ <version>1.1.9</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>