mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-19 10:48:59 +00:00
⚡ Add --tag
option to deploy
command
This commit is contained in:
parent
e410e273a4
commit
5ad30c2d98
@ -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.")
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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"`
|
||||
|
Loading…
Reference in New Issue
Block a user