Skip to content

Commit

Permalink
chore(trait): keep kamelet default location
Browse files Browse the repository at this point in the history
To maintain backward compatibility
  • Loading branch information
squakez committed Oct 13, 2023
1 parent fc70506 commit f1882dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/trait/kamelets.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (t *kameletsTrait) addKamelets(e *Environment) error {
if e.ApplicationProperties == nil {
e.ApplicationProperties = map[string]string{}
}
e.ApplicationProperties[KameletLocationProperty] = fmt.Sprintf("file:%s", t.MountPoint)
e.ApplicationProperties[KameletLocationProperty] = fmt.Sprintf("file:%s,classpath:/kamelets", t.MountPoint)
e.Resources.Add(&kameletsBundleConfigmap)
// resort dependencies
sort.Strings(e.Integration.Status.Dependencies)
Expand Down
2 changes: 2 additions & 0 deletions pkg/trait/trait_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ func (e *Environment) configureVolumesAndMounts(vols *[]corev1.Volume, mnts *[]c
} else if configMap.Labels[kubernetes.ConfigMapTypeLabel] == "kamelets-bundle" {
// Kamelets bundle configmap
kameletMountPoint := strings.ReplaceAll(e.ApplicationProperties[KameletLocationProperty], "file:", "")
// We need also to remove the default location provided
kameletMountPoint = strings.ReplaceAll(kameletMountPoint, ",classpath:/kamelets", "")
refName := "kamelets-bundle"
vol := getVolume(refName, "configmap", configMap.Name, "", "")
mnt := getMount(refName, kameletMountPoint, "", true)
Expand Down

0 comments on commit f1882dd

Please sign in to comment.