kartikgoel598 commented on issue #6963:
URL: https://github.com/apache/camel-k/issues/6963#issuecomment-6874340907

   Hi @squakez, I'd like to work on this one.
   
   My plan is to add `e2e/common/traits/security_context_test.go`, following 
the pattern in `toleration_test.go`:
   
   1. **Defaults:** run an Integration with no trait options and check the 
pod's security context (`runAsNonRoot: true`, `runAsUser: 1000`, seccomp 
`RuntimeDefault`).
   2. **Custom values:** set `security-context.run-as-user`, `run-as-non-root` 
and `seccomp-profile-type` and check they are applied.
   3. **Runtime effect:** set `run-as-non-root=true` with `run-as-user=0` and 
check that Kubernetes refuses to start the container, so the setting really 
blocks running as root. I could also check that the process runs with the 
configured UID.
   
   A couple of questions:
   - Are these the "restricted resources" you had in mind, or is there a 
specific case you'd like covered (for example, writing to a root-owned path)?
   - Does `e2e/common` fit, or would another workflow be better?
   
   This would be my first contribution to Camel K.


-- 
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