@@ -483,8 +483,6 @@ func (r *AgentActionReconciler) createAgentJob(ctx context.Context, log logr.Log
483483func (r * AgentActionReconciler ) resolveAgentConfig (ctx context.Context , log logr.Logger , action * porterv1.AgentAction ) (porterv1.AgentConfigSpecAdapter , error ) {
484484 log .V (Log5Trace ).Info ("Resolving porter agent configuration" )
485485
486- operatorNamespace := operatorNamespaceDefault
487-
488486 logConfig := func (level string , config * porterv1.AgentConfig ) {
489487 if config == nil || config .Name == "" {
490488 return
@@ -495,8 +493,6 @@ func (r *AgentActionReconciler) resolveAgentConfig(ctx context.Context, log logr
495493 "namespace" , config .Namespace ,
496494 "name" , config .Name ,
497495 "plugin" , config .Spec .PluginConfigFile )
498-
499- operatorNamespace = config .Namespace
500496 }
501497
502498 // Read agent configuration defined at the system level
@@ -554,8 +550,6 @@ func (r *AgentActionReconciler) resolveAgentConfig(ctx context.Context, log logr
554550func (r * AgentActionReconciler ) resolvePorterConfig (ctx context.Context , log logr.Logger , action * porterv1.AgentAction ) (porterv1.PorterConfigSpec , error ) {
555551 log .V (Log5Trace ).Info ("Resolving porter configuration file" )
556552
557- operatorNamespace := operatorNamespaceDefault
558-
559553 logConfig := func (level string , config * porterv1.PorterConfig ) {
560554 if config == nil || config .Name == "" {
561555 return
@@ -564,8 +558,6 @@ func (r *AgentActionReconciler) resolvePorterConfig(ctx context.Context, log log
564558 "level" , level ,
565559 "namespace" , config .Namespace ,
566560 "name" , config .Name )
567-
568- operatorNamespace = config .Namespace
569561 }
570562
571563 // Provide a safe default config in case nothing is defined anywhere
0 commit comments