This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/main by this push:
     new de66f0e  Fix missing the kubernetes process analyzer active feature 
implementation (#17)
de66f0e is described below

commit de66f0e0d10ba4d40137ec4c5475ae97931b4056
Author: mrproliu <[email protected]>
AuthorDate: Wed Apr 27 07:56:04 2022 +0800

    Fix missing the kubernetes process analyzer active feature implementation 
(#17)
---
 pkg/process/finders/kubernetes/config.go | 1 +
 pkg/process/finders/kubernetes/finder.go | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/pkg/process/finders/kubernetes/config.go 
b/pkg/process/finders/kubernetes/config.go
index 3b7e127..e806918 100644
--- a/pkg/process/finders/kubernetes/config.go
+++ b/pkg/process/finders/kubernetes/config.go
@@ -34,6 +34,7 @@ type Config struct {
 }
 
 type ProcessBuilder struct {
+       Active       bool     `mapstructure:"active"`
        Filters      []string `mapstructure:"filters"`
        Layer        string   `mapstructure:"layer"`
        ServiceName  string   `mapstructure:"service_name"`
diff --git a/pkg/process/finders/kubernetes/finder.go 
b/pkg/process/finders/kubernetes/finder.go
index 946f7cb..309d11e 100644
--- a/pkg/process/finders/kubernetes/finder.go
+++ b/pkg/process/finders/kubernetes/finder.go
@@ -184,6 +184,9 @@ func (f *ProcessFinder) buildProcesses(p *process.Process, 
pc *PodContainer) ([]
        // find builder
        builders := make([]*ProcessBuilder, 0)
        for _, b := range f.conf.Analyzers {
+               if !b.Active {
+                       continue
+               }
                success, err := executeFilter(b.FiltersBuilder, p, pc, f)
                if err != nil {
                        return nil, err

Reply via email to