You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v1Migrate, // Version 1 plugins renamed to URI for version 2
50
+
nil, // Version 2 has only plugin changes from current
51
+
}
52
+
46
53
// NOTE: Any new map fields added also need to be handled in mergeConfig.
47
54
48
55
// Config provides containerd configuration data for the server
@@ -67,9 +74,11 @@ type Config struct {
67
74
MetricsMetricsConfig`toml:"metrics"`
68
75
// DisabledPlugins are IDs of plugins to disable. Disabled plugins won't be
69
76
// initialized and started.
77
+
// DisabledPlugins must use a fully qualified plugin URI.
70
78
DisabledPlugins []string`toml:"disabled_plugins"`
71
79
// RequiredPlugins are IDs of required plugins. Containerd exits if any
72
80
// required plugin doesn't exist or fails to be initialized or started.
81
+
// RequiredPlugins must use a fully qualified plugin URI.
73
82
RequiredPlugins []string`toml:"required_plugins"`
74
83
// Plugins provides plugin specific configuration for the initialization of a plugin
75
84
Pluginsmap[string]interface{} `toml:"plugins"`
@@ -101,41 +110,83 @@ type StreamProcessor struct {
101
110
Env []string`toml:"env"`
102
111
}
103
112
104
-
// GetVersion returns the config file's version
105
-
func (c*Config) GetVersion() int {
106
-
ifc.Version==0 {
107
-
return1
108
-
}
109
-
returnc.Version
110
-
}
111
-
112
113
// ValidateVersion validates the config for a v2 file
113
114
func (c*Config) ValidateVersion() error {
114
-
version:=c.GetVersion()
115
-
ifversion==1 {
116
-
returnerrors.New("containerd config version `1` is no longer supported since containerd v2.0, please switch to version `2`, "+
117
-
"see https://github.com/containerd/containerd/blob/main/docs/PLUGINS.md#version-header")
118
-
}
119
-
120
-
ifversion>CurrentConfigVersion {
121
-
returnfmt.Errorf("expected containerd config version equal to or less than `%d`, got `%d`", CurrentConfigVersion, version)
115
+
ifc.Version>CurrentConfigVersion {
116
+
returnfmt.Errorf("expected containerd config version equal to or less than `%d`, got `%d`", CurrentConfigVersion, c.Version)
0 commit comments