Update tap.go, tapRunner.go, and 3 more files...

This commit is contained in:
RamiBerm
2021-07-11 13:56:40 +03:00
parent 97798cb5b7
commit 65ba0952b4
5 changed files with 26 additions and 16 deletions

View File

@@ -19,10 +19,8 @@ type MizuTapOptions struct {
AnalyzeDestination string
KubeConfigPath string
MizuImage string
MizuPodPort uint16
PlainTextFilterRegexes []string
TapOutgoing bool
ServiceType string
}
var mizuTapOptions = &MizuTapOptions{}
@@ -69,8 +67,6 @@ func init() {
tapCmd.Flags().BoolVarP(&mizuTapOptions.AllNamespaces, "all-namespaces", "A", false, "Tap all namespaces")
tapCmd.Flags().StringVarP(&mizuTapOptions.KubeConfigPath, "kube-config", "k", "", "Path to kube-config file")
tapCmd.Flags().StringVarP(&mizuTapOptions.MizuImage, "mizu-image", "", fmt.Sprintf("gcr.io/up9-docker-hub/mizu/%s:latest", mizu.Branch), "Custom image for mizu collector")
tapCmd.Flags().Uint16VarP(&mizuTapOptions.MizuPodPort, "mizu-port", "", 8899, "Port which mizu cli will attempt to forward from the mizu collector pod")
tapCmd.Flags().StringArrayVarP(&mizuTapOptions.PlainTextFilterRegexes, "regex-masking", "r", nil, "List of regex expressions that are used to filter matching values from text/plain http bodies")
tapCmd.Flags().StringVarP(&direction, "direction", "", "in", "Record traffic that goes in this direction (relative to the tapped pod): in/any")
tapCmd.Flags().StringVarP(&mizuTapOptions.ServiceType, "service-type", "", "ClusterIP", "Set a service type for mizu collector's kubernetes service")
}