Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: Remove deprecated --config-file flag #1498

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cmd/tetragon/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const (
keyGopsAddr = "gops-address"
keyEnableProcessCred = "enable-process-cred"
keyEnableProcessNs = "enable-process-ns"
keyConfigFile = "config-file"
keyTracingPolicy = "tracing-policy"
keyTracingPolicyDir = "tracing-policy-dir"

Expand Down Expand Up @@ -144,13 +143,6 @@ func readAndSetFlags() {

option.Config.KMods = viper.GetStringSlice(keyKmods)

// deprecation timeline: deprecated -> 0.10.0, removed -> 0.11.0
// manually handle the deprecation of --config-file
if viper.IsSet(keyConfigFile) {
log.Warnf("Flag --%s has been deprecated, please use --%s instead", keyConfigFile, keyTracingPolicy)
option.Config.TracingPolicy = viper.GetString(keyConfigFile)
}
// if both --config-file and --tracing-policy are set, the latter takes priority
if viper.IsSet(keyTracingPolicy) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have removed this (now useless) check

option.Config.TracingPolicy = viper.GetString(keyTracingPolicy)
}
Expand Down
4 changes: 0 additions & 4 deletions cmd/tetragon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,6 @@ func execute() error {

// Tracing policy file
flags.String(keyTracingPolicy, "", "Tracing policy file to load at startup")
// --config-file is the deprecated flag for the new --tracing-policy
// deprecation timeline: deprecated -> 0.10.0, removed -> 0.11.0
flags.String(keyConfigFile, "", "Configuration file to load from")
flags.MarkHidden(keyConfigFile)

flags.String(keyTracingPolicyDir, defaults.DefaultTpDir, "Directory from where to load Tracing Policies")

Expand Down