diff --git a/cmd/deploy.go b/cmd/deploy.go index 1cc6f832e..ee08fce7b 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -46,6 +46,7 @@ func init() { log.Debug().Err(err).Send() } + deployCmd.Flags().StringP(configStructs.TagLabel, "t", defaultDeployConfig.Tag, "The tag of the Docker images that are going to be deployed.") deployCmd.Flags().Uint16P(configStructs.ProxyPortLabel, "p", defaultDeployConfig.ProxyPort, "Provide a custom port for the web interface webserver.") deployCmd.Flags().StringSliceP(configStructs.NamespacesLabel, "n", defaultDeployConfig.Namespaces, "Namespaces selector.") deployCmd.Flags().BoolP(configStructs.AllNamespacesLabel, "A", defaultDeployConfig.AllNamespaces, "Deploy to all namespaces.") diff --git a/cmd/deployRunner.go b/cmd/deployRunner.go index 61f7ae448..901ddf4f6 100644 --- a/cmd/deployRunner.go +++ b/cmd/deployRunner.go @@ -7,6 +7,7 @@ import ( "regexp" "time" + "github.com/kubeshark/kubeshark/docker" "github.com/kubeshark/kubeshark/internal/connect" "github.com/kubeshark/kubeshark/resources" "github.com/kubeshark/kubeshark/utils" @@ -41,6 +42,7 @@ var proxyDone bool func deploy() { state.startTime = time.Now() + docker.SetTag(config.Config.Deploy.Tag) connector = connect.NewConnector(kubernetes.GetLocalhostOnPort(config.Config.Hub.PortForward.SrcPort), connect.DefaultRetries, connect.DefaultTimeout) diff --git a/config/configStructs/deployConfig.go b/config/configStructs/deployConfig.go index 75bfa52f2..a9320513f 100644 --- a/config/configStructs/deployConfig.go +++ b/config/configStructs/deployConfig.go @@ -13,6 +13,7 @@ import ( ) const ( + TagLabel = "tag" ProxyPortLabel = "proxy-port" NamespacesLabel = "namespaces" AllNamespacesLabel = "all-namespaces" @@ -27,6 +28,7 @@ const ( ) type DeployConfig struct { + Tag string `yaml:"tag" default:"latest"` PodRegexStr string `yaml:"regex" default:".*"` ProxyPort uint16 `yaml:"proxy-port" default:"8899"` ProxyHost string `yaml:"proxy-host" default:"127.0.0.1"`