mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
Rename internal AllowlistEntry field to Command
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
This commit is contained in:
@@ -115,12 +115,12 @@ const (
|
||||
// the logical AND of all checks corresponding to the specified fields within
|
||||
// the entry.
|
||||
type AllowlistEntry struct {
|
||||
// Name matching is performed by first resolving the absolute path of both
|
||||
// Command matching is performed by first resolving the absolute path of both
|
||||
// the plugin and the name in the allowlist entry using `exec.LookPath`. It
|
||||
// will be called on both, and the resulting strings must be equal. If
|
||||
// either call to `exec.LookPath` results in an error, the `Name` check
|
||||
// either call to `exec.LookPath` results in an error, the `Command` check
|
||||
// will be considered a failure.
|
||||
Name string
|
||||
Command string
|
||||
}
|
||||
|
||||
// AliasOverride stores the alias definitions.
|
||||
|
||||
@@ -121,7 +121,14 @@ type AllowlistEntry struct {
|
||||
// will be called on both, and the resulting strings must be equal. If
|
||||
// either call to `exec.LookPath` results in an error, the `Name` check
|
||||
// will be considered a failure.
|
||||
// Deprecated: use Command instead
|
||||
Name string `json:"name"`
|
||||
// Name matching is performed by first resolving the absolute path of both
|
||||
// the plugin and the name in the allowlist entry using `exec.LookPath`. It
|
||||
// will be called on both, and the resulting strings must be equal. If
|
||||
// either call to `exec.LookPath` results in an error, the `Name` check
|
||||
// will be considered a failure.
|
||||
Command string `json:"command"`
|
||||
}
|
||||
|
||||
// AliasOverride stores the alias definitions.
|
||||
|
||||
@@ -2978,8 +2978,8 @@ users:
|
||||
return &config.Preference{
|
||||
CredentialPluginPolicy: config.CredentialPluginPolicy("Allowlist"),
|
||||
CredentialPluginAllowlist: []config.AllowlistEntry{
|
||||
{Name: "bar"},
|
||||
{Name: "baz"},
|
||||
{Command: "bar"},
|
||||
{Command: "baz"},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user