[CORD-3201]

Use new tosca-loader

Change-Id: I2f4ee6753e597417cc6e8031e386b167348479ac
diff --git a/xos-profiles/base-kubernetes/templates/tosca-job.yaml b/xos-profiles/base-kubernetes/templates/tosca-job.yaml
index fbc8ed0..ded25f3 100644
--- a/xos-profiles/base-kubernetes/templates/tosca-job.yaml
+++ b/xos-profiles/base-kubernetes/templates/tosca-job.yaml
@@ -36,18 +36,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: base-kubernetes-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/base-kubernetes/values.yaml b/xos-profiles/base-kubernetes/values.yaml
index 15b7d6c..a9e490d 100644
--- a/xos-profiles/base-kubernetes/values.yaml
+++ b/xos-profiles/base-kubernetes/values.yaml
@@ -25,7 +25,7 @@
 imagePullPolicy: 'IfNotPresent'
 
 rcord_synchronizerImage: "xosproject/rcord-synchronizer:master"
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
diff --git a/xos-profiles/base-openstack/templates/tosca-job.yaml b/xos-profiles/base-openstack/templates/tosca-job.yaml
index ca3d280..764595c 100644
--- a/xos-profiles/base-openstack/templates/tosca-job.yaml
+++ b/xos-profiles/base-openstack/templates/tosca-job.yaml
@@ -35,18 +35,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: base-openstack-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/base-openstack/values.yaml b/xos-profiles/base-openstack/values.yaml
index a56e377..d5c1d86 100644
--- a/xos-profiles/base-openstack/values.yaml
+++ b/xos-profiles/base-openstack/values.yaml
@@ -24,7 +24,7 @@
 
 imagePullPolicy: 'Always'
 
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
diff --git a/xos-profiles/demo-exampleservice/templates/tosca-job.yaml b/xos-profiles/demo-exampleservice/templates/tosca-job.yaml
index 6b9b529..e08cf33 100644
--- a/xos-profiles/demo-exampleservice/templates/tosca-job.yaml
+++ b/xos-profiles/demo-exampleservice/templates/tosca-job.yaml
@@ -35,18 +35,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: demo-exampleservice-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/demo-exampleservice/values.yaml b/xos-profiles/demo-exampleservice/values.yaml
index 59fc79f..eccf195 100644
--- a/xos-profiles/demo-exampleservice/values.yaml
+++ b/xos-profiles/demo-exampleservice/values.yaml
@@ -24,7 +24,7 @@
 
 imagePullPolicy: 'IfNotPresent'
 
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
diff --git a/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml b/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
index 7de92a2..3c5380d 100644
--- a/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
+++ b/xos-profiles/demo-simpleexampleservice/templates/tosca-job.yaml
@@ -35,18 +35,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: demo-simpleexampleservice-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/demo-simpleexampleservice/values.yaml b/xos-profiles/demo-simpleexampleservice/values.yaml
index e61ec52..1a4c19a 100644
--- a/xos-profiles/demo-simpleexampleservice/values.yaml
+++ b/xos-profiles/demo-simpleexampleservice/values.yaml
@@ -24,7 +24,7 @@
 
 imagePullPolicy: 'IfNotPresent'
 
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
diff --git a/xos-profiles/mcord/templates/tosca-job.yaml b/xos-profiles/mcord/templates/tosca-job.yaml
index 290bd5b..4410b85 100644
--- a/xos-profiles/mcord/templates/tosca-job.yaml
+++ b/xos-profiles/mcord/templates/tosca-job.yaml
@@ -35,18 +35,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: mcord-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/mcord/values.yaml b/xos-profiles/mcord/values.yaml
index 3c916d2..9c0b385 100644
--- a/xos-profiles/mcord/values.yaml
+++ b/xos-profiles/mcord/values.yaml
@@ -24,7 +24,7 @@
 
 imagePullPolicy: 'IfNotPresent'
 
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xosAdminUser: &adminuser "admin@opencord.org"
 xosAdminPassword: &adminpass "letmein"
diff --git a/xos-profiles/rcord-lite/templates/tosca-job.yaml b/xos-profiles/rcord-lite/templates/tosca-job.yaml
index 739d39a..ae4f9da 100644
--- a/xos-profiles/rcord-lite/templates/tosca-job.yaml
+++ b/xos-profiles/rcord-lite/templates/tosca-job.yaml
@@ -36,18 +36,16 @@
       restartPolicy: OnFailure
       containers:
         - name: {{ .Chart.Name }}-tosca-loader
-          image: {{ .Values.httpieImage | quote }}
+          image: {{ .Values.tosca_loaderImage | quote }}
           imagePullPolicy: {{ .Values.imagePullPolicy }}
-          command: ["/bin/sh"]
-          args:
-            - "-c"
-            - |
-              for recipe in /opt/tosca/*
-              do
-                echo $recipe
-                http --check-status --ignore-stdin POST http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run xos-username:{{ .Values.xosAdminUser }} xos-password:{{ .Values.xosAdminPassword }} @$recipe || exit 1
-                echo ''
-              done
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
           volumeMounts:
             - name: rcord-lite-tosca
               mountPath: /opt/tosca
diff --git a/xos-profiles/rcord-lite/values.yaml b/xos-profiles/rcord-lite/values.yaml
index f39a806..e0b0cd6 100644
--- a/xos-profiles/rcord-lite/values.yaml
+++ b/xos-profiles/rcord-lite/values.yaml
@@ -25,7 +25,7 @@
 imagePullPolicy: 'Always'
 
 rcord_synchronizerImage: "xosproject/rcord-synchronizer:master"
-httpieImage: "clue/httpie:latest"
+tosca_loaderImage: "xosproject/tosca-loader:master"
 
 xos_api_testerImage: 'xosproject/xos-api-tester:master'