ammachado commented on code in PR #3330:
URL: https://github.com/apache/camel-k/pull/3330#discussion_r889637354


##########
pkg/trait/pod_test.go:
##########
@@ -138,6 +150,9 @@ func createPodTest(podSpecTemplate string) (*podTrait, 
*Environment, *appsv1.Dep
                                                        },
                                                },
                                        },
+                                       SecurityContext: 
&corev1.PodSecurityContext{

Review Comment:
   The code you've mentioned in `pkg/trait/pod_test.go` is the "expected" 
deployment after applying the `Integration.Spec.PodTemplate.Spec`.
   
   The code you've mentioned on `pkg/trait/pod.go#L65` uses the PodTemplate 
that is resolved on 
https://github.com/apache/camel-k/blob/main/pkg/cmd/run.go#L583. That code 
wasn't changed, it was not needed.
   
   Just adding the `SecurityContext` field to the `PodSpec` template on 
`integration_types.go` made it work.  No other changes were needed.
   
   Then a few test cases were added, and the CRDs and deepcopy code 
regenerated. The rest wasn't changed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to