diff --git a/pkg/cri/config/config.go b/pkg/cri/config/config.go index 9dbb64f3d..82c0f7c97 100644 --- a/pkg/cri/config/config.go +++ b/pkg/cri/config/config.go @@ -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 diff --git a/pkg/cri/config/config_test.go b/pkg/cri/config/config_test.go index 502f8b2c5..2d7fe1837 100644 --- a/pkg/cri/config/config_test.go +++ b/pkg/cri/config/config_test.go @@ -81,6 +81,7 @@ func TestValidateConfig(t *testing.T) { }, }, }, + warnings: []deprecation.Warning{deprecation.CRIRegistryAuths}, }, "invalid stream_idle_timeout": { config: &PluginConfig{ diff --git a/pkg/deprecation/deprecation.go b/pkg/deprecation/deprecation.go index 0f66d2817..0d5b8b38a 100644 --- a/pkg/deprecation/deprecation.go +++ b/pkg/deprecation/deprecation.go @@ -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