-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Specifying unknown arguments in Cilium Agent config-dir #42781
Copy link
Copy link
Closed
Labels
area/agentCilium agent related.Cilium agent related.area/cliImpacts the command line interface of any command in the repository.Impacts the command line interface of any command in the repository.good-first-issueGood starting point for new developers, which requires minimal understanding of Cilium.Good starting point for new developers, which requires minimal understanding of Cilium.help-wantedYou can help! Post a detailed plan on the issue or create a PR to solve this issue.You can help! Post a detailed plan on the issue or create a PR to solve this issue.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.
Description
I was using Cilium 1.15 with the derive-masquerade-ip-addr-from-device argument. After upgrading to 1.16 via Helm, I noticed that this argument no longer works, as it was renamed to derive-masq-ip-addr-from-device (commit). This change was not mentioned in the 1.16 Upgrade Guide.
In the code below, when validateConfigMap is called, it appears that unknown arguments are ignored (execution continue). It might be helpful to log a warning when an unknown argument is detected, or alternatively, apply a strict validation policy that causes an immediate failure, ensuring users are notified promptly. Thanks in advance!
Lines 3483 to 3497 in 7a206aa
| func validateConfigMap(cmd *cobra.Command, m map[string]any) error { | |
| flags := cmd.Flags() | |
| for key, value := range m { | |
| flag := flags.Lookup(key) | |
| if flag == nil { | |
| continue | |
| } | |
| err := validateConfigMapFlag(flag, key, value) | |
| if err != nil { | |
| return fmt.Errorf("option %s: %w", key, err) | |
| } | |
| } | |
| return nil | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/agentCilium agent related.Cilium agent related.area/cliImpacts the command line interface of any command in the repository.Impacts the command line interface of any command in the repository.good-first-issueGood starting point for new developers, which requires minimal understanding of Cilium.Good starting point for new developers, which requires minimal understanding of Cilium.help-wantedYou can help! Post a detailed plan on the issue or create a PR to solve this issue.You can help! Post a detailed plan on the issue or create a PR to solve this issue.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.
Type
Projects
Status
Done