Skip to content

Commit

Permalink
cmd: Remove deprecated --config-file flag
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
  • Loading branch information
lambdanis committed Sep 21, 2023
1 parent 9b9ed8b commit 239f57a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
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) {
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

0 comments on commit 239f57a

Please sign in to comment.