Features/clifix (#19)

* makefile fixes - docker build

* readme update, CLI usage fix

* added chmod

Co-authored-by: Alex Haiut <alex@up9.com>
This commit is contained in:
Alex Haiut
2021-04-29 18:00:16 +03:00
committed by GitHub
parent 38146a644d
commit 2ba43300fd
3 changed files with 30 additions and 10 deletions

View File

@@ -1,2 +1,18 @@
# mizu
# mizu
standalone web app traffic viewer for Kubernetes
## Download
Download `mizu` for your platform as
* for MacOS - `curl -o mizu https://static.up9.com/mizu/mizu-darwin-amd64 && chmod 755 mizu`
* for Linux - `curl -o mizu https://static.up9.com/mizu/mizu-linux-amd64 && chmod 755 mizu
## Run
1. Find pod you'd like to tap to in your Kubernetes cluster
2. Run `mizu --pod podname`
3. Open browser on `http://localhost:8899` as instructed ..
4. Watch the WebAPI traffic flowing ..

View File

@@ -5,17 +5,20 @@ build:
go build -o bin/mizu mizu.go
build-cr:
echo "Compiling for every OS and Platform"
GOOS=linux GOARCH=386 go build -o bin/mizu-linux-386 mizu.go
GOOS=windows GOARCH=386 go build -o bin/mizu-windows-386.exe mizu.go
@echo "Compiling for every OS and Platform"
@echo ""
GOOS=darwin GOARCH=amd64 go build -o bin/mizu-darwin-amd64 mizu.go
GOOS=linux GOARCH=amd64 go build -o bin/mizu-linux-amd64 mizu.go
GOOS=windows GOARCH=amd64 go build -o bin/mizu-windows-amd64.exe mizu.go
@#GOOS=windows GOARCH=amd64 go build -o bin/mizu-windows-amd64.exe mizu.go
@#GOOS=linux GOARCH=386 go build -o bin/mizu-linux-386 mizu.go
@#GOOS=windows GOARCH=386 go build -o bin/mizu-windows-386.exe mizu.go
@#GOOS=darwin GOARCH=arm64 go build -o bin/mizu-darwin-arm64 mizu.go
@#GOOS=linux GOARCH=arm64 go build -o bin/mizu-linux-arm64 mizu.go
@#GOOS=windows GOARCH=arm64 go build -o bin/mizu-windows-arm64 mizu.go
GOOS=darwin GOARCH=arm64 go build -o bin/mizu-darwin-arm64 mizu.go
GOOS=linux GOARCH=arm64 go build -o bin/mizu-linux-arm64 mizu.go
GOOS=windows GOARCH=arm64 go build -o bin/mizu-windows-arm64 mizu.go
clean:
#go clean
rm -f ./bin/*
run:
go run . ".*"

View File

@@ -11,7 +11,7 @@ var (
rootCmd = &cobra.Command{}
)
func init() {
rootCmd.Use = "cmd pod-query"
rootCmd.Use = "mizu"
rootCmd.Short = "Tail HTTP traffic from multiple pods"
rootCmd.RunE = func(cmd *cobra.Command, args []string) error {
if len(args) != 0 {
@@ -32,6 +32,7 @@ func init() {
rootCmd.Flags().StringVarP(&config.Configuration.MizuImage, "mizu-image", "", "gcr.io/up9-docker-hub/mizu/develop:latest", "Custom image for mizu collector")
rootCmd.Flags().Uint16VarP(&config.Configuration.MizuPodPort, "mizu-port", "", 8899, "Port which mizu cli will attempt to forward from the mizu collector pod")
rootCmd.Flags().StringVarP(&config.Configuration.TappedPodName, "pod", "", "", "View traffic of this pod")
rootCmd.MarkFlagRequired("pod")
}
// Execute adds all child commands to the root command and sets flags appropriately.