From 0471ff9d84ee28d375f39069b04bd49112843301 Mon Sep 17 00:00:00 2001 From: Prafulla Mahindrakar Date: Wed, 29 Jun 2022 18:07:03 +0530 Subject: [PATCH] Reverting the default values for service account to empty Signed-off-by: Prafulla Mahindrakar --- pkg/manager/impl/execution_manager.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/manager/impl/execution_manager.go b/pkg/manager/impl/execution_manager.go index e0ffaf3d7..287abbf78 100644 --- a/pkg/manager/impl/execution_manager.go +++ b/pkg/manager/impl/execution_manager.go @@ -489,13 +489,6 @@ func mergeIntoExecConfig(workflowExecConfig admin.WorkflowExecutionConfig, spec workflowExecConfig.GetInterruptible().GetValue() != spec.GetInterruptible().GetValue()) { workflowExecConfig.Interruptible = spec.GetInterruptible() } - - // Explicitly set the security context if its nil since downstream we expect this settings to be available - if workflowExecConfig.GetSecurityContext() == nil { - workflowExecConfig.SecurityContext = &core.SecurityContext{ - RunAs: &core.Identity{}, - } - } return workflowExecConfig } @@ -544,6 +537,12 @@ func (m *ExecutionManager) getExecutionConfig(ctx context.Context, request *admi } // merge the application config into workflowExecConfig. If even the deprecated fields are not set workflowExecConfig = mergeIntoExecConfig(workflowExecConfig, m.config.ApplicationConfiguration().GetTopLevelConfig()) + // Explicitly set the security context if its nil since downstream we expect this settings to be available + if workflowExecConfig.GetSecurityContext() == nil { + workflowExecConfig.SecurityContext = &core.SecurityContext{ + RunAs: &core.Identity{}, + } + } logger.Infof(ctx, "getting the workflow execution config from application configuration") // Defaults to one from the application config return &workflowExecConfig, nil