This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 5f64ec6c927df7e74c2f2d5315ee838071a5643d Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Fri Oct 13 12:03:43 2023 +0200 chore(trait): keep kamelet default location To maintain backward compatibility --- pkg/trait/kamelets.go | 2 +- pkg/trait/trait_types.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/trait/kamelets.go b/pkg/trait/kamelets.go index 705026397..574a8b327 100644 --- a/pkg/trait/kamelets.go +++ b/pkg/trait/kamelets.go @@ -200,7 +200,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) diff --git a/pkg/trait/trait_types.go b/pkg/trait/trait_types.go index 05ee587ce..fca860d74 100644 --- a/pkg/trait/trait_types.go +++ b/pkg/trait/trait_types.go @@ -538,6 +538,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)