Skip to content

Commit 3ca5b44

Browse files
committed
Remove cni conf_template deprecation
As discussed in the issue containerd#8596 It is a helpful feature at many places and no replacement readily available Signed-off-by: Aditi Sharma <[email protected]>
1 parent 4b7145c commit 3ca5b44

3 files changed

Lines changed: 14 additions & 16 deletions

File tree

RELEASES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in
387387
| Property Group | Property | Deprecation release | Target release for removal | Recommendation |
388388
|----------------------------------------------------------------------|------------------------------|---------------------|----------------------------|-------------------------------------------------|
389389
|`[plugins."io.containerd.grpc.v1.cri"]` | `systemd_cgroup` | containerd v1.3 | containerd v2.0 ✅ | Use `SystemdCgroup` in runc options (see below) |
390-
|`[plugins."io.containerd.grpc.v1.cri".cni]` | `conf_template` | containerd v1.? | containerd v2.0 | Create a CNI config in `/etc/cni/net.d` |
391390
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `untrusted_workload_runtime` | containerd v1.2 | containerd v2.0 ✅ | Create `untrusted` runtime in `runtimes` |
392391
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `default_runtime` | containerd v1.3 | containerd v2.0 ✅ | Use `default_runtime_name` |
393392
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*]` | `runtime_engine` | containerd v1.3 | containerd v2.0 ✅ | Use runtime v2 |
@@ -397,6 +396,11 @@ The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in
397396
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `configs` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
398397
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `mirrors` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
399398

399+
> **Note**
400+
>
401+
> CNI Config Template (`plugins."io.containerd.grpc.v1.cri".cni.conf_template`) was once deprecated in v1.7.0,
402+
> but its deprecation was cancelled in v1.7.2.
403+
400404
<details><summary>Example: runc option <code>SystemdCgroup</code></summary><p>
401405

402406
```toml

docs/cri/config.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,6 @@ version = 2
402402
# If this is set, containerd will generate a cni config file from the
403403
# template. Otherwise, containerd will wait for the system admin or cni
404404
# daemon to drop the config file into the conf_dir.
405-
# This is a temporary backward-compatible solution for kubenet users
406-
# who don't have a cni daemonset in production yet.
407-
# This will be deprecated when kubenet is deprecated.
408405
# See the "CNI Config Template" section for more details.
409406
conf_template = ""
410407
# ip_pref specifies the strategy to use when selecting the main IP address for a pod.
@@ -503,11 +500,8 @@ runtime will be used. For example, see
503500

504501
## CNI Config Template
505502

506-
Ideally the cni config should be placed by system admin or cni daemon like calico,
507-
weaveworks etc. However, there are still users using [kubenet](https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/#kubenet)
508-
today, who don't have a cni daemonset in production. The cni config template is
509-
a temporary backward-compatible solution for them. This is expected to be
510-
deprecated when kubenet is deprecated.
503+
Ideally the cni config should be placed by system admin or cni daemon like calico, weaveworks etc.
504+
However, this is useful for the cases when there is no cni daemonset to place cni config.
511505

512506
The cni config template uses the [golang
513507
template](https://golang.org/pkg/text/template/) format. Currently supported

pkg/cri/config/config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,17 @@ type CniConfig struct {
135135
// device is created as the net namespace is created, it's safe to run
136136
// in parallel mode as the default setting.
137137
NetworkPluginSetupSerially bool `toml:"setup_serially" json:"setupSerially"`
138-
// NetworkPluginConfTemplate is the file path of golang template used to generate
139-
// cni config.
138+
// NetworkPluginConfTemplate is the file path of golang template used to generate cni config.
140139
// When it is set, containerd will get cidr(s) from kubelet to replace {{.PodCIDR}},
141140
// {{.PodCIDRRanges}} or {{.Routes}} in the template, and write the config into
142141
// NetworkPluginConfDir.
143142
// Ideally the cni config should be placed by system admin or cni daemon like calico,
144-
// weaveworks etc. However, there are still users using kubenet
145-
// (https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/#kubenet)
146-
// today, who don't have a cni daemonset in production. NetworkPluginConfTemplate is
147-
// a temporary backward-compatible solution for them.
148-
// DEPRECATED: use CNI configs
143+
// weaveworks etc. However, this is useful for the cases when there is no cni daemonset to place cni config.
144+
// This allowed for very simple generic networking using the Kubernetes built in node pod CIDR IPAM, avoiding the
145+
// need to fetch the node object through some external process (which has scalability, auth, complexity issues).
146+
// It is currently heavily used in kubernetes-containerd CI testing
147+
// NetworkPluginConfTemplate was once deprecated in containerd v1.7.0,
148+
// but its deprecation was cancelled in v1.7.2.
149149
NetworkPluginConfTemplate string `toml:"conf_template" json:"confTemplate"`
150150
// IPPreference specifies the strategy to use when selecting the main IP address for a pod.
151151
//

0 commit comments

Comments
 (0)