mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-24 23:34:45 +00:00
Mizu Image variable (#52)
This commit is contained in:
parent
da24608bec
commit
8774639cbe
@ -1,5 +1,6 @@
|
|||||||
FOLDER=$(GOOS).$(GOARCH)
|
FOLDER=$(GOOS).$(GOARCH)
|
||||||
COMMIT_HASH=$(shell git rev-parse HEAD)
|
COMMIT_HASH=$(shell git rev-parse HEAD)
|
||||||
|
GIT_BRANCH=$(shell git branch --show-current)
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
@ -11,7 +12,7 @@ install:
|
|||||||
go install mizu.go
|
go install mizu.go
|
||||||
|
|
||||||
build: ## build mizu CLI binary (select platform via GOOS / GOARCH env variables)
|
build: ## build mizu CLI binary (select platform via GOOS / GOARCH env variables)
|
||||||
go build -ldflags="-X 'github.com/up9inc/mizu/cli/mizu.GitCommitHash=$(COMMIT_HASH)'" -o bin/$(FOLDER)/mizu mizu.go
|
go build -ldflags="-X 'github.com/up9inc/mizu/cli/mizu.GitCommitHash=$(COMMIT_HASH)' -X 'github.com/up9inc/mizu/cli/mizu.Branch=$(GIT_BRANCH)'" -o bin/$(FOLDER)/mizu mizu.go
|
||||||
|
|
||||||
build-all: ## build for all supported platforms
|
build-all: ## build for all supported platforms
|
||||||
@echo "Compiling for every OS and Platform"
|
@echo "Compiling for every OS and Platform"
|
||||||
|
@ -25,9 +25,7 @@ var tapCmd = &cobra.Command{
|
|||||||
|
|
||||||
regex, err := regexp.Compile(args[0])
|
regex, err := regexp.Compile(args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
return errors.New(fmt.Sprintf("%s is not a valid regex %s", args[0], err))
|
return errors.New(fmt.Sprintf("%s is not a valid regex %s", args[0], err))
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mizu.Run(regex)
|
mizu.Run(regex)
|
||||||
@ -41,6 +39,6 @@ func init() {
|
|||||||
tapCmd.Flags().Uint16VarP(&config.Configuration.GuiPort, "gui-port", "p", 8899, "Provide a custom port for the web interface webserver")
|
tapCmd.Flags().Uint16VarP(&config.Configuration.GuiPort, "gui-port", "p", 8899, "Provide a custom port for the web interface webserver")
|
||||||
tapCmd.Flags().StringVarP(&config.Configuration.Namespace, "namespace", "n", "", "Namespace selector")
|
tapCmd.Flags().StringVarP(&config.Configuration.Namespace, "namespace", "n", "", "Namespace selector")
|
||||||
tapCmd.Flags().StringVarP(&config.Configuration.KubeConfigPath, "kubeconfig", "k", "", "Path to kubeconfig file")
|
tapCmd.Flags().StringVarP(&config.Configuration.KubeConfigPath, "kubeconfig", "k", "", "Path to kubeconfig file")
|
||||||
tapCmd.Flags().StringVarP(&config.Configuration.MizuImage, "mizu-image", "", "gcr.io/up9-docker-hub/mizu/develop:latest", "Custom image for mizu collector")
|
tapCmd.Flags().StringVarP(&config.Configuration.MizuImage, "mizu-image", "", fmt.Sprintf("gcr.io/up9-docker-hub/mizu/%s:latest", mizu.Branch), "Custom image for mizu collector")
|
||||||
tapCmd.Flags().Uint16VarP(&config.Configuration.MizuPodPort, "mizu-port", "", 8899, "Port which mizu cli will attempt to forward from the mizu collector pod")
|
tapCmd.Flags().Uint16VarP(&config.Configuration.MizuPodPort, "mizu-port", "", 8899, "Port which mizu cli will attempt to forward from the mizu collector pod")
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package mizu
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
Version = "v0.0.1"
|
Version = "v0.0.1"
|
||||||
|
Branch = "develop"
|
||||||
GitCommitHash = "" // this var is overridden using ldflags in makefile when building
|
GitCommitHash = "" // this var is overridden using ldflags in makefile when building
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user