Skip to content

Commit a24267b

Browse files
adiskyAkihiroSuda
authored andcommitted
Remove cni conf_template deprecation
As discussed in the issue #8596 It is a helpful feature at many places and no replacement readily available Signed-off-by: Aditi Sharma <[email protected]> (cherry picked from commit 3ca5b44) > Conflicts: > RELEASES.md Signed-off-by: Akihiro Suda <[email protected]>
1 parent 0cae528 commit a24267b

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
@@ -386,7 +386,6 @@ The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in
386386
| Property Group | Property | Deprecation release | Target release for removal | Recommendation |
387387
|----------------------------------------------------------------------|------------------------------|---------------------|----------------------------|-------------------------------------------------|
388388
|`[plugins."io.containerd.grpc.v1.cri"]` | `systemd_cgroup` | containerd v1.3 | containerd v2.0 | Use `SystemdCgroup` in runc options (see below) |
389-
|`[plugins."io.containerd.grpc.v1.cri".cni]` | `conf_template` | containerd v1.? | containerd v2.0 | Create a CNI config in `/etc/cni/net.d` |
390389
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `untrusted_workload_runtime` | containerd v1.2 | containerd v2.0 | Create `untrusted` runtime in `runtimes` |
391390
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `default_runtime` | containerd v1.3 | containerd v2.0 | Use `default_runtime_name` |
392391
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*]` | `runtime_engine` | containerd v1.3 | containerd v2.0 | Use runtime v2 |
@@ -396,6 +395,11 @@ The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in
396395
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `configs` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
397396
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `mirrors` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
398397

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

401405
```toml

docs/cri/config.md

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

507504
## CNI Config Template
508505

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

515509
The cni config template uses the [golang
516510
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
@@ -146,17 +146,17 @@ type CniConfig struct {
146146
// NetworkPluginSetupSerially is a boolean flag to specify whether containerd sets up networks serially
147147
// if there are multiple CNI plugin config files existing and NetworkPluginMaxConfNum is larger than 1.
148148
NetworkPluginSetupSerially bool `toml:"setup_serially" json:"setupSerially"`
149-
// NetworkPluginConfTemplate is the file path of golang template used to generate
150-
// cni config.
149+
// NetworkPluginConfTemplate is the file path of golang template used to generate cni config.
151150
// When it is set, containerd will get cidr(s) from kubelet to replace {{.PodCIDR}},
152151
// {{.PodCIDRRanges}} or {{.Routes}} in the template, and write the config into
153152
// NetworkPluginConfDir.
154153
// Ideally the cni config should be placed by system admin or cni daemon like calico,
155-
// weaveworks etc. However, there are still users using kubenet
156-
// (https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/#kubenet)
157-
// today, who don't have a cni daemonset in production. NetworkPluginConfTemplate is
158-
// a temporary backward-compatible solution for them.
159-
// DEPRECATED: use CNI configs
154+
// weaveworks etc. However, this is useful for the cases when there is no cni daemonset to place cni config.
155+
// This allowed for very simple generic networking using the Kubernetes built in node pod CIDR IPAM, avoiding the
156+
// need to fetch the node object through some external process (which has scalability, auth, complexity issues).
157+
// It is currently heavily used in kubernetes-containerd CI testing
158+
// NetworkPluginConfTemplate was once deprecated in containerd v1.7.0,
159+
// but its deprecation was cancelled in v1.7.2.
160160
NetworkPluginConfTemplate string `toml:"conf_template" json:"confTemplate"`
161161
// IPPreference specifies the strategy to use when selecting the main IP address for a pod.
162162
//

0 commit comments

Comments
 (0)