mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-16 17:31:58 +00:00
CLI make --pod required flag and faster api image build (#25)
* makefile fixes - docker build * readme update, CLI usage fix * added chmod * typo * run example incorreect in makefile * no message * no message * no message Co-authored-by: Alex Haiut <alex@up9.com>
This commit is contained in:
parent
0d277faaf8
commit
5727630846
@ -18,6 +18,9 @@ WORKDIR /api-build
|
||||
|
||||
COPY api/go.mod api/go.sum ./
|
||||
RUN go mod download
|
||||
# cheap trick to make the build faster (As long as go.mod wasn't changes
|
||||
RUN go list -f '{{.Path}}@{{.Version}}' -m all | sed 1d | xargs go get
|
||||
|
||||
# Copy and build api code
|
||||
COPY api .
|
||||
RUN go build -ldflags="-s -w" -o mizuagent .
|
||||
|
@ -17,7 +17,7 @@ func init() {
|
||||
if len(args) != 0 {
|
||||
return rootCmd.Help()
|
||||
}
|
||||
|
||||
|
||||
mizu.Run()
|
||||
return nil
|
||||
}
|
||||
@ -32,7 +32,10 @@ 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")
|
||||
err := rootCmd.MarkFlagRequired("pod")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
|
Loading…
Reference in New Issue
Block a user