mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-22 20:13:48 +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()
|
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().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().StringSliceP(configStructs.NamespacesLabel, "n", defaultDeployConfig.Namespaces, "Namespaces selector.")
|
||||||
deployCmd.Flags().BoolP(configStructs.AllNamespacesLabel, "A", defaultDeployConfig.AllNamespaces, "Deploy to all namespaces.")
|
deployCmd.Flags().BoolP(configStructs.AllNamespacesLabel, "A", defaultDeployConfig.AllNamespaces, "Deploy to all namespaces.")
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/kubeshark/kubeshark/docker"
|
||||||
"github.com/kubeshark/kubeshark/internal/connect"
|
"github.com/kubeshark/kubeshark/internal/connect"
|
||||||
"github.com/kubeshark/kubeshark/resources"
|
"github.com/kubeshark/kubeshark/resources"
|
||||||
"github.com/kubeshark/kubeshark/utils"
|
"github.com/kubeshark/kubeshark/utils"
|
||||||
@ -41,6 +42,7 @@ var proxyDone bool
|
|||||||
|
|
||||||
func deploy() {
|
func deploy() {
|
||||||
state.startTime = time.Now()
|
state.startTime = time.Now()
|
||||||
|
docker.SetTag(config.Config.Deploy.Tag)
|
||||||
|
|
||||||
connector = connect.NewConnector(kubernetes.GetLocalhostOnPort(config.Config.Hub.PortForward.SrcPort), connect.DefaultRetries, connect.DefaultTimeout)
|
connector = connect.NewConnector(kubernetes.GetLocalhostOnPort(config.Config.Hub.PortForward.SrcPort), connect.DefaultRetries, connect.DefaultTimeout)
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
TagLabel = "tag"
|
||||||
ProxyPortLabel = "proxy-port"
|
ProxyPortLabel = "proxy-port"
|
||||||
NamespacesLabel = "namespaces"
|
NamespacesLabel = "namespaces"
|
||||||
AllNamespacesLabel = "all-namespaces"
|
AllNamespacesLabel = "all-namespaces"
|
||||||
@ -27,6 +28,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type DeployConfig struct {
|
type DeployConfig struct {
|
||||||
|
Tag string `yaml:"tag" default:"latest"`
|
||||||
PodRegexStr string `yaml:"regex" default:".*"`
|
PodRegexStr string `yaml:"regex" default:".*"`
|
||||||
ProxyPort uint16 `yaml:"proxy-port" default:"8899"`
|
ProxyPort uint16 `yaml:"proxy-port" default:"8899"`
|
||||||
ProxyHost string `yaml:"proxy-host" default:"127.0.0.1"`
|
ProxyHost string `yaml:"proxy-host" default:"127.0.0.1"`
|
||||||
|
Loading…
Reference in New Issue
Block a user