cri: add deprecation warning for auths
Signed-off-by: Samuel Karp <samuelkarp@google.com>
This commit is contained in:
parent
d7cb25d770
commit
35924bccc0
@ -420,7 +420,8 @@ func ValidatePluginConfig(ctx context.Context, c *PluginConfig) ([]deprecation.W
|
||||
config.Auth = &auth
|
||||
c.Registry.Configs[endpoint] = config
|
||||
}
|
||||
log.G(ctx).Warning("`auths` is deprecated, please use `configs` instead")
|
||||
warnings = append(warnings, deprecation.CRIRegistryAuths)
|
||||
log.G(ctx).Warning("`auths` is deprecated, please use `ImagePullSecrets` instead")
|
||||
}
|
||||
|
||||
// Validation for stream_idle_timeout
|
||||
|
@ -81,6 +81,7 @@ func TestValidateConfig(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
warnings: []deprecation.Warning{deprecation.CRIRegistryAuths},
|
||||
},
|
||||
"invalid stream_idle_timeout": {
|
||||
config: &PluginConfig{
|
||||
|
@ -27,6 +27,8 @@ const (
|
||||
GoPluginLibrary Warning = Prefix + "go-plugin-library"
|
||||
// CRIRegistryMirrors is a warning for the use of the `mirrors` property
|
||||
CRIRegistryMirrors Warning = Prefix + "cri-registry-mirrors"
|
||||
// CRIRegistryAuths is a warning for the use of the `auths` property
|
||||
CRIRegistryAuths Warning = Prefix + "cri-registry-auths"
|
||||
)
|
||||
|
||||
var messages = map[Warning]string{
|
||||
@ -35,6 +37,8 @@ var messages = map[Warning]string{
|
||||
GoPluginLibrary: "Dynamically-linked Go plugins as containerd runtimes are deprecated since containerd v2.0 and removed in containerd v2.1.",
|
||||
CRIRegistryMirrors: "The `mirrors` property of `[plugins.\"io.containerd.grpc.v1.cri\".registry]` is deprecated since containerd v1.5 and will be removed in containerd v2.0." +
|
||||
"Use `config_path` instead.",
|
||||
CRIRegistryAuths: "The `auths` property of `[plugins.\"io.containerd.grpc.v1.cri\".registry]` is deprecated since containerd v1.3 and will be removed in containerd v2.0." +
|
||||
"Use `ImagePullSecrets` instead.",
|
||||
}
|
||||
|
||||
// Valid checks whether a given Warning is valid
|
||||
|
Loading…
Reference in New Issue
Block a user