From aebf4d70a201b6c7dd5dfcfdda443f29696e28b8 Mon Sep 17 00:00:00 2001 From: Rami Berman Date: Sun, 31 Oct 2021 16:19:30 +0200 Subject: [PATCH] Update common.go, tapConfig.go, and 2 more files... --- cli/cmd/common.go | 2 +- cli/config/configStructs/tapConfig.go | 36 +++++++++++++-------------- shared/kubernetes/errors.go | 2 +- shared/kubernetes/k8sTapManager.go | 1 - 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/cli/cmd/common.go b/cli/cmd/common.go index ce3c2d572..bb6e0a992 100644 --- a/cli/cmd/common.go +++ b/cli/cmd/common.go @@ -63,4 +63,4 @@ func handleKubernetesProviderError(err error) { } else { logger.Log.Error(err) } -} \ No newline at end of file +} diff --git a/cli/config/configStructs/tapConfig.go b/cli/config/configStructs/tapConfig.go index 26a0b20be..0d26ec893 100644 --- a/cli/config/configStructs/tapConfig.go +++ b/cli/config/configStructs/tapConfig.go @@ -24,24 +24,24 @@ const ( ) type TapConfig struct { - UploadIntervalSec int `yaml:"upload-interval" default:"10"` - PodRegexStr string `yaml:"regex" default:".*"` - GuiPort uint16 `yaml:"gui-port" default:"8899"` - ProxyHost string `yaml:"proxy-host" default:"127.0.0.1"` - Namespaces []string `yaml:"namespaces"` - Analysis bool `yaml:"analysis" default:"false"` - AllNamespaces bool `yaml:"all-namespaces" default:"false"` - PlainTextFilterRegexes []string `yaml:"regex-masking"` - IgnoredUserAgents []string `yaml:"ignored-user-agents"` - DisableRedaction bool `yaml:"no-redact" default:"false"` - HumanMaxEntriesDBSize string `yaml:"max-entries-db-size" default:"200MB"` - DryRun bool `yaml:"dry-run" default:"false"` - Workspace string `yaml:"workspace"` - EnforcePolicyFile string `yaml:"traffic-validation-file"` - ContractFile string `yaml:"contract"` - AskUploadConfirmation bool `yaml:"ask-upload-confirmation" default:"true"` - ApiServerResources shared.Resources `yaml:"api-server-resources"` - TapperResources shared.Resources `yaml:"tapper-resources"` + UploadIntervalSec int `yaml:"upload-interval" default:"10"` + PodRegexStr string `yaml:"regex" default:".*"` + GuiPort uint16 `yaml:"gui-port" default:"8899"` + ProxyHost string `yaml:"proxy-host" default:"127.0.0.1"` + Namespaces []string `yaml:"namespaces"` + Analysis bool `yaml:"analysis" default:"false"` + AllNamespaces bool `yaml:"all-namespaces" default:"false"` + PlainTextFilterRegexes []string `yaml:"regex-masking"` + IgnoredUserAgents []string `yaml:"ignored-user-agents"` + DisableRedaction bool `yaml:"no-redact" default:"false"` + HumanMaxEntriesDBSize string `yaml:"max-entries-db-size" default:"200MB"` + DryRun bool `yaml:"dry-run" default:"false"` + Workspace string `yaml:"workspace"` + EnforcePolicyFile string `yaml:"traffic-validation-file"` + ContractFile string `yaml:"contract"` + AskUploadConfirmation bool `yaml:"ask-upload-confirmation" default:"true"` + ApiServerResources shared.Resources `yaml:"api-server-resources"` + TapperResources shared.Resources `yaml:"tapper-resources"` } func (config *TapConfig) PodRegex() *regexp.Regexp { diff --git a/shared/kubernetes/errors.go b/shared/kubernetes/errors.go index 54717ed20..cfd26e2ef 100644 --- a/shared/kubernetes/errors.go +++ b/shared/kubernetes/errors.go @@ -23,4 +23,4 @@ type ClusterBehindProxyError struct {} // ClusterBehindProxyError implements the Error interface. func (e *ClusterBehindProxyError) Error() string { return "Cluster is behind proxy" -} \ No newline at end of file +} diff --git a/shared/kubernetes/k8sTapManager.go b/shared/kubernetes/k8sTapManager.go index a67aac2b0..7a83b668f 100644 --- a/shared/kubernetes/k8sTapManager.go +++ b/shared/kubernetes/k8sTapManager.go @@ -150,7 +150,6 @@ func (tapManager *K8sTapManager) watchPodsForTapping() { OriginalError: err, TapManagerReason: TapManagerPodWatchError, } - // TODO: Does this also perform cleanup? case <-tapManager.context.Done(): logger.Log.Debugf("Watching pods loop, context done, stopping `restart tappers debouncer`")