Skip to content

Commit

Permalink
fix(trait):define the default trait name
Browse files Browse the repository at this point in the history
Make the default trait name not the same as the component name

Fixes crossplane#66

Signed-off-by: zhuhuijun <[email protected]>
  • Loading branch information
Ghostbaby committed Jul 10, 2020
1 parent ecb243b commit 1801ad8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/controller/v1alpha2/applicationconfiguration/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,10 @@ func getTraitName(ac *v1alpha2.ApplicationConfiguration, componentName string,
continue
}
for _, trait := range w.Traits {
if trait.Reference.APIVersion == apiVersion &&
trait.Reference.Kind == kind {
if trait.Reference.APIVersion == apiVersion && trait.Reference.Kind == kind {
traitName = trait.Reference.Name
}
}

}

if len(traitName) == 0 {
Expand Down

0 comments on commit 1801ad8

Please sign in to comment.