diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 9db949f..17765ca 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -99,6 +99,12 @@ func Execute() error { // Enable Kubernetes specific entity detection implicitly reportOptions.kubernetesEntityDetection = true + + // Add implicit exclude for metadata.managedFields as this cannot + // be configured via a command-line flag using KUBECTL_EXTERNAL_DIFF + // due to an bug/feature in kubectl that ignore command-line flags + // in the diff environment variable with non alpha-numeric characters + reportOptions.excludeRegexps = append(reportOptions.excludeRegexps, "^/metadata/managedFields") } if err := rootCmd.Execute(); err != nil {