Merge pull request #126 from up9inc/disable_redact_flag

Add option to disable sensitive data redaction by flag and fix CPU leaks
This commit is contained in:
RamiBerm
2021-07-21 11:20:36 +03:00
committed by GitHub
10 changed files with 143 additions and 26 deletions

View File

@@ -25,6 +25,7 @@ type MizuTapOptions struct {
HideHealthChecks bool
MaxEntriesDBSizeBytes int64
SleepIntervalSec uint16
DisableRedaction bool
}
var mizuTapOptions = &MizuTapOptions{}
@@ -103,4 +104,5 @@ func init() {
tapCmd.Flags().StringVarP(&direction, "direction", "", "in", "Record traffic that goes in this direction (relative to the tapped pod): in/any")
tapCmd.Flags().BoolVar(&mizuTapOptions.HideHealthChecks, "hide-healthchecks", false, "hides requests with kube-probe or prometheus user-agent headers")
tapCmd.Flags().StringVarP(&humanMaxEntriesDBSize, maxEntriesDBSizeFlagName, "", "200MB", "override the default max entries db size of 200mb")
tapCmd.Flags().BoolVar(&mizuTapOptions.DisableRedaction, "no-redact", false, "Disables redaction of potentially sensitive request/response headers and body values")
}