Skip to content

Commit 0186a32

Browse files
committed
remove two very old no longer used runtime options
Signed-off-by: Mike Brown <[email protected]>
1 parent 3db5af9 commit 0186a32

3 files changed

Lines changed: 0 additions & 105 deletions

File tree

docs/cri/config.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,6 @@ version = 2
124124
# default_runtime_name is the default runtime name to use.
125125
default_runtime_name = "runc"
126126

127-
# 'plugins."io.containerd.grpc.v1.cri".containerd.default_runtime' is the runtime to use in containerd.
128-
# DEPRECATED: use `default_runtime_name` and `plugins."io.containerd.grpc.v1.cri".runtimes` instead.
129-
# Remove in containerd 1.4.
130-
[plugins."io.containerd.grpc.v1.cri".containerd.default_runtime]
131-
132-
# 'plugins."io.containerd.grpc.v1.cri".containerd.untrusted_workload_runtime' is a runtime to run untrusted workloads on it.
133-
# DEPRECATED: use `untrusted` runtime in `plugins."io.containerd.grpc.v1.cri".runtimes` instead.
134-
# Remove in containerd 1.4.
135-
[plugins."io.containerd.grpc.v1.cri".containerd.untrusted_workload_runtime]
136-
137127
# 'plugins."io.containerd.grpc.v1.cri".containerd.runtimes' is a map from CRI RuntimeHandler strings, which specify types
138128
# of runtime configurations, to the matching configurations.
139129
# In this example, 'runc' is the RuntimeHandler string to match.

pkg/cri/config/config.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ type ContainerdConfig struct {
6363
Snapshotter string `toml:"snapshotter" json:"snapshotter"`
6464
// DefaultRuntimeName is the default runtime name to use from the runtimes table.
6565
DefaultRuntimeName string `toml:"default_runtime_name" json:"defaultRuntimeName"`
66-
// DefaultRuntime is the default runtime to use in containerd.
67-
// This runtime is used when no runtime handler (or the empty string) is provided.
68-
// DEPRECATED: use DefaultRuntimeName instead. Remove in containerd 1.4.
69-
DefaultRuntime Runtime `toml:"default_runtime" json:"defaultRuntime"`
70-
// UntrustedWorkloadRuntime is a runtime to run untrusted workloads on it.
71-
// DEPRECATED: use `untrusted` runtime in Runtimes instead. Remove in containerd 1.4.
72-
UntrustedWorkloadRuntime Runtime `toml:"untrusted_workload_runtime" json:"untrustedWorkloadRuntime"`
7366
// Runtimes is a map from CRI RuntimeHandler strings, which specify types of runtime
7467
// configurations, to the matching configurations.
7568
Runtimes map[string]Runtime `toml:"runtimes" json:"runtimes"`
@@ -306,22 +299,6 @@ func ValidatePluginConfig(ctx context.Context, c *PluginConfig) error {
306299
c.ContainerdConfig.Runtimes = make(map[string]Runtime)
307300
}
308301

309-
// Validation for deprecated untrusted_workload_runtime.
310-
if c.ContainerdConfig.UntrustedWorkloadRuntime.Type != "" {
311-
log.G(ctx).Warning("`untrusted_workload_runtime` is deprecated, please use `untrusted` runtime in `runtimes` instead")
312-
if _, ok := c.ContainerdConfig.Runtimes[RuntimeUntrusted]; ok {
313-
return errors.Errorf("conflicting definitions: configuration includes both `untrusted_workload_runtime` and `runtimes[%q]`", RuntimeUntrusted)
314-
}
315-
c.ContainerdConfig.Runtimes[RuntimeUntrusted] = c.ContainerdConfig.UntrustedWorkloadRuntime
316-
}
317-
318-
// Validation for deprecated default_runtime field.
319-
if c.ContainerdConfig.DefaultRuntime.Type != "" {
320-
log.G(ctx).Warning("`default_runtime` is deprecated, please use `default_runtime_name` to reference the default configuration you have defined in `runtimes`")
321-
c.ContainerdConfig.DefaultRuntimeName = RuntimeDefault
322-
c.ContainerdConfig.Runtimes[RuntimeDefault] = c.ContainerdConfig.DefaultRuntime
323-
}
324-
325302
// Validation for default_runtime_name
326303
if c.ContainerdConfig.DefaultRuntimeName == "" {
327304
return errors.New("`default_runtime_name` is empty")

pkg/cri/config/config_test.go

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -31,78 +31,6 @@ func TestValidateConfig(t *testing.T) {
3131
expectedErr string
3232
expected *PluginConfig
3333
}{
34-
"deprecated untrusted_workload_runtime": {
35-
config: &PluginConfig{
36-
ContainerdConfig: ContainerdConfig{
37-
DefaultRuntimeName: RuntimeDefault,
38-
UntrustedWorkloadRuntime: Runtime{
39-
Type: "untrusted",
40-
},
41-
Runtimes: map[string]Runtime{
42-
RuntimeDefault: {
43-
Type: "default",
44-
},
45-
},
46-
},
47-
},
48-
expected: &PluginConfig{
49-
ContainerdConfig: ContainerdConfig{
50-
DefaultRuntimeName: RuntimeDefault,
51-
UntrustedWorkloadRuntime: Runtime{
52-
Type: "untrusted",
53-
},
54-
Runtimes: map[string]Runtime{
55-
RuntimeUntrusted: {
56-
Type: "untrusted",
57-
},
58-
RuntimeDefault: {
59-
Type: "default",
60-
},
61-
},
62-
},
63-
},
64-
},
65-
"both untrusted_workload_runtime and runtime[untrusted]": {
66-
config: &PluginConfig{
67-
ContainerdConfig: ContainerdConfig{
68-
DefaultRuntimeName: RuntimeDefault,
69-
UntrustedWorkloadRuntime: Runtime{
70-
Type: "untrusted-1",
71-
},
72-
Runtimes: map[string]Runtime{
73-
RuntimeUntrusted: {
74-
Type: "untrusted-2",
75-
},
76-
RuntimeDefault: {
77-
Type: "default",
78-
},
79-
},
80-
},
81-
},
82-
expectedErr: fmt.Sprintf("conflicting definitions: configuration includes both `untrusted_workload_runtime` and `runtimes[%q]`", RuntimeUntrusted),
83-
},
84-
"deprecated default_runtime": {
85-
config: &PluginConfig{
86-
ContainerdConfig: ContainerdConfig{
87-
DefaultRuntime: Runtime{
88-
Type: "default",
89-
},
90-
},
91-
},
92-
expected: &PluginConfig{
93-
ContainerdConfig: ContainerdConfig{
94-
DefaultRuntime: Runtime{
95-
Type: "default",
96-
},
97-
DefaultRuntimeName: RuntimeDefault,
98-
Runtimes: map[string]Runtime{
99-
RuntimeDefault: {
100-
Type: "default",
101-
},
102-
},
103-
},
104-
},
105-
},
10634
"no default_runtime_name": {
10735
config: &PluginConfig{},
10836
expectedErr: "`default_runtime_name` is empty",

0 commit comments

Comments
 (0)