From: Lukasz Rajewski Date: Fri, 9 Apr 2021 21:15:52 +0000 (+0200) Subject: Fixed templating of values in k8s components X-Git-Tag: 1.1.3~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F120294%2F1;p=ccsdk%2Fcds.git Fixed templating of values in k8s components Fixed templating of values in k8s components Issue-ID: CCSDK-3265 Signed-off-by: Lukasz Rajewski Change-Id: If6a10c9ae0157a873433f7c3e7c12d90eb5c2cf6 (cherry picked from commit 5d9ac2bf09f44885df819d5182ba48c37be66ac6) --- diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt index 5e853d05f..80531b13d 100644 --- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt +++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt @@ -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()) diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt index 87a4d4e27..ceb4e80e7 100644 --- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt +++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt @@ -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()) diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt index ba145cd9c..7a487f205 100644 --- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt +++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt @@ -227,7 +227,7 @@ open class K8sConfigValueComponent( val fileContent = templateFile.bufferedReader().readText() return BlueprintVelocityTemplateService.generateContent( fileContent, - params, true + params.toString(), true ) }