From bada6dae68a03627ea8ed193313be229ede56daa Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Tue, 20 Jun 2023 22:14:06 +0300 Subject: [PATCH] :bug: Fix `: error calling len: len of nil pointer` Helm install error --- cmd/tapRunner.go | 1 + config/configStructs/tapConfig.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tapRunner.go b/cmd/tapRunner.go index 0c032fc21..57de72c51 100644 --- a/cmd/tapRunner.go +++ b/cmd/tapRunner.go @@ -90,6 +90,7 @@ func tap() { rel, err := helm.NewHelmDefault().Install() if err != nil { log.Error().Err(err).Send() + return } else { log.Info().Msgf("Installed the Helm release: %s", rel.Name) } diff --git a/config/configStructs/tapConfig.go b/config/configStructs/tapConfig.go index 2bd19b731..901d56ab2 100644 --- a/config/configStructs/tapConfig.go +++ b/config/configStructs/tapConfig.go @@ -81,7 +81,7 @@ type ResourcesConfig struct { } type AuthConfig struct { - ApprovedDomains []string `yaml:"approvedDomains" json:"approvedDomains"` + ApprovedDomains []string `yaml:"approvedDomains" json:"approvedDomains" default:"[]"` } type IngressConfig struct { @@ -96,7 +96,7 @@ type TapConfig struct { Docker DockerConfig `yaml:"docker" json:"docker"` Proxy ProxyConfig `yaml:"proxy" json:"proxy"` PodRegexStr string `yaml:"regex" json:"regex" default:".*"` - Namespaces []string `yaml:"namespaces" json:"namespaces"` + Namespaces []string `yaml:"namespaces" json:"namespaces" default:"[]"` SelfNamespace string `yaml:"selfnamespace" json:"selfnamespace" default:"kubeshark"` PersistentStorage bool `yaml:"persistentstorage" json:"persistentstorage" default:"false"` StorageLimit string `yaml:"storagelimit" json:"storagelimit" default:"200Mi"`