From 43041e56a1e30b8312dac3c530391c6812147112 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 30 Jun 2022 09:25:06 +0530 Subject: [PATCH] Reverting the default values for service account to empty (#450) --- flyteadmin/pkg/manager/impl/execution_manager.go | 7 ++++++- flyteadmin/pkg/runtime/application_config_provider.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/flyteadmin/pkg/manager/impl/execution_manager.go b/flyteadmin/pkg/manager/impl/execution_manager.go index 2cdfd0895f..287abbf78d 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager.go +++ b/flyteadmin/pkg/manager/impl/execution_manager.go @@ -489,7 +489,6 @@ func mergeIntoExecConfig(workflowExecConfig admin.WorkflowExecutionConfig, spec workflowExecConfig.GetInterruptible().GetValue() != spec.GetInterruptible().GetValue()) { workflowExecConfig.Interruptible = spec.GetInterruptible() } - return workflowExecConfig } @@ -538,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 diff --git a/flyteadmin/pkg/runtime/application_config_provider.go b/flyteadmin/pkg/runtime/application_config_provider.go index c996b9af4a..bce4fccd53 100644 --- a/flyteadmin/pkg/runtime/application_config_provider.go +++ b/flyteadmin/pkg/runtime/application_config_provider.go @@ -31,7 +31,7 @@ var flyteAdminConfig = config.MustRegisterSection(flyteAdmin, &interfaces.Applic EventVersion: 2, AsyncEventsBufferSize: 100, MaxParallelism: 25, - K8SServiceAccount: "default", + K8SServiceAccount: "", }) var schedulerConfig = config.MustRegisterSection(scheduler, &interfaces.SchedulerConfig{