Skip to content

Commit

Permalink
Fix #1574: add property names in source specification
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Sep 17, 2020
1 parent 4bea9af commit 3fceb04
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/trait/kamelets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3fceb04

Please sign in to comment.