You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/09/17 09:10:08 UTC
[camel-k] 13/21: Fix #1574: add property names in source
specification
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 3fceb04ace9d412bca86cef9d44e91b6118f660a
Author: nicolaferraro <ni...@gmail.com>
AuthorDate: Tue Aug 11 16:43:37 2020 +0200
Fix #1574: add property names in source specification
---
pkg/trait/kamelets.go | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/pkg/trait/kamelets.go b/pkg/trait/kamelets.go
index 05f734f..1b3c9dc 100644
--- a/pkg/trait/kamelets.go
+++ b/pkg/trait/kamelets.go
@@ -185,13 +185,20 @@ func (t *kameletsTrait) addKameletAsSource(e *Environment, kamelet v1alpha1.Kame
if err != nil {
return err
}
+
+ propertyNames := make([]string, 0, len(kamelet.Status.Properties))
+ for _, p := range kamelet.Status.Properties {
+ propertyNames = append(propertyNames, p.Name)
+ }
+
flowSource := v1.SourceSpec{
DataSpec: v1.DataSpec{
Name: fmt.Sprintf("%s.yaml", kamelet.Name),
Content: string(flowData),
},
- Language: v1.LanguageYaml,
- Type: v1.SourceTypeTemplate,
+ Language: v1.LanguageYaml,
+ Type: v1.SourceTypeTemplate,
+ PropertyNames: propertyNames,
}
flowSource, err = integrationSourceFromKameletSource(e, kamelet, flowSource, fmt.Sprintf("%s-kamelet-%s-flow", e.Integration.Name, kamelet.Name))
if err != nil {