Fixed templating of values in k8s components 94/120294/1
authorLukasz Rajewski <lukasz.rajewski@orange.com>
Fri, 9 Apr 2021 21:15:52 +0000 (23:15 +0200)
committerLukasz Rajewski <lukasz.rajewski@orange.com>
Sun, 11 Apr 2021 19:43:34 +0000 (19:43 +0000)
Fixed templating of values in k8s components

Issue-ID: CCSDK-3265
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Change-Id: If6a10c9ae0157a873433f7c3e7c12d90eb5c2cf6
(cherry picked from commit 5d9ac2bf09f44885df819d5182ba48c37be66ac6)

ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt
ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt

index 5e853d0..80531b1 100644 (file)
@@ -355,7 +355,7 @@ open class K8sProfileUploadComponent(
         val fileContent = templatedFile.bufferedReader().readText()
         val finalFileContent = BlueprintVelocityTemplateService.generateContent(
             fileContent,
-            params, true
+            params.toString(), true
         )
         if (!destinationFolder.exists())
             Files.createDirectories(destinationFolder.toPath())
index 87a4d4e..ceb4e80 100644 (file)
@@ -258,7 +258,7 @@ open class K8sConfigTemplateComponent(
         val fileContent = templateFile.bufferedReader().readText()
         val finalFileContent = BlueprintVelocityTemplateService.generateContent(
             fileContent,
-            params, true
+            params.toString(), true
         )
         if (!destinationFolder.exists())
             Files.createDirectories(destinationFolder.toPath())