squakez commented on code in PR #5709:
URL: https://github.com/apache/camel-k/pull/5709#discussion_r1692815744


##########
pkg/trait/mount_test.go:
##########
@@ -160,9 +168,10 @@ func getNominalEnv(t *testing.T, traitCatalog *Catalog) 
*Environment {
                                },
                                Traits: v1.Traits{
                                        Mount: &traitv1.MountTrait{
-                                               Configs:   
[]string{"configmap:my-cm"},
-                                               Resources: 
[]string{"secret:my-secret"},
-                                               Volumes:   
[]string{"my-pvc:/over/the/rainbow"},
+                                               Configs:                
[]string{"configmap:my-cm"},
+                                               Resources:              
[]string{"secret:my-secret"},
+                                               PersistentVolumeClaims: 
[]string{"my-pvc:/over/the/rainbow"},
+                                               EmptyDirs:              
[]string{"my-empty-dir:/some/path"},

Review Comment:
   We should create a new test with empty dirs instead. So we test both the 
default (void) and the presence of the parameter.



##########
pkg/apis/camel/v1/trait/mount.go:
##########
@@ -33,7 +33,9 @@ type MountTrait struct {
        // Syntax: [configmap|secret]:name[/key][@path], where name represents 
the resource name, key optionally represents the resource key to be filtered 
and path represents the destination path
        Resources []string `property:"resources" json:"resources,omitempty"`
        // A list of Persistent Volume Claims to be mounted. Syntax: 
[pvcname:/container/path]
-       Volumes []string `property:"volumes" json:"volumes,omitempty"`
+       PersistentVolumeClaims []string `property:"persistent-volume-claims" 
json:"persistentVolumeClaims,omitempty"`

Review Comment:
   We cannot change this without a period of deprecation notice. This change 
affects the API specification, so, it must be reverted. It was an unfortunate 
choice when we created it as it really was meant to be PersistentVolumeClaims. 
We may think to change this when moving to a major API upgrade.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to