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 70dd719cd9959f81c0a3916ac210ddc98b3057a2
Author: Gaelle Fournier <[email protected]>
AuthorDate: Mon Nov 27 15:24:18 2023 +0100

    Fix(core): Openshift securityContext on global operator
    
    In global mode the integration pod securityContext needs to be generated 
from the integration namespace.
---
 pkg/trait/container.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/trait/container.go b/pkg/trait/container.go
index 44e13e09e..443d97787 100644
--- a/pkg/trait/container.go
+++ b/pkg/trait/container.go
@@ -342,7 +342,7 @@ func (t *containerTrait) configureSecurityContext(e 
*Environment, container *cor
        // get security context from security context constraint configuration 
in namespace
        isOpenShift, _ := openshift.IsOpenShift(e.Client)
        if isOpenShift {
-               securityContext, _ := 
openshift.GetOpenshiftSecurityContextRestricted(e.Ctx, e.Client, 
e.Platform.Namespace)
+               securityContext, _ := 
openshift.GetOpenshiftSecurityContextRestricted(e.Ctx, e.Client, 
e.Integration.Namespace)
                if securityContext != nil {
                        container.SecurityContext = securityContext
                }

Reply via email to