ammachado commented on code in PR #3330:
URL: https://github.com/apache/camel-k/pull/3330#discussion_r889649682
##########
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 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.
>
> Yeah, and the behaviour from `kamel run` is mimicked here
https://github.com/apache/camel-k/blob/main/pkg/trait/pod_test.go#L95-L98 so
you can expect the same behaviour from the test code. That's why you wouldn't
need an explicit addition of `SecurityContext` to deployment here.
Figured out what you said. I'm sorry for the misunderstanding. What's
happening is that the `yaml.Unmarshal` on line 109 is initializing the field
`SecurityContext` on the `podSpec`, but is not initializing the nested
`SupplementalGroups`. And to be honest, I don't know why.
--
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]