|
| 1 | +# Migration Guide: Fluent Operator Helm Chart v3.x to v4.0 |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +v4.0 simplifies container runtime configuration by removing dynamic detection for the `docker` runtime via initContainers and adopting static, configuration-based paths. The `docker` runtime has not been used widely since Kubernetes v1.24 (2022) and modern Kubernetes distributions now use the `containerd` runtime. |
| 6 | + |
| 7 | +## Breaking Changes |
| 8 | + |
| 9 | +### 1. Default Container Runtime Changed |
| 10 | + |
| 11 | +**What Changed:** |
| 12 | + |
| 13 | +- Default `containerRuntime` changed from `docker` to `containerd` |
| 14 | + |
| 15 | +**Impact:** |
| 16 | + |
| 17 | +- Users who never explicitly set `containerRuntime` will now use containerd defaults |
| 18 | +- Log parser will change from `docker` to `cri` format |
| 19 | +- Systemd filter will target `containerd.service` instead of `docker.service` |
| 20 | + |
| 21 | +**Who Is Affected:** |
| 22 | + |
| 23 | +- Users still running Docker container runtime (uncommon - Docker support was removed from Kubernetes in v1.24, May 2022) |
| 24 | +- Users who relied on the default value without explicit configuration |
| 25 | + |
| 26 | +**Migration:** |
| 27 | + |
| 28 | + |
| 29 | +The containerRuntime now defaults to `containerd`. In `v3.x` the implicit default was `docker`. Use `containerRuntime: docker` to maintain `v3.x` behavior. |
| 30 | + |
| 31 | +```diff |
| 32 | ++ containerRuntime: containerd |
| 33 | +``` |
| 34 | + |
| 35 | +### 2. initContainers Removed |
| 36 | + |
| 37 | +**What Changed:** |
| 38 | + |
| 39 | +- Removed dynamic Docker root directory detection via initContainer |
| 40 | +- Removed `operator.initcontainer.*` configuration options |
| 41 | +- Container log paths are now statically configured |
| 42 | + |
| 43 | +**Impact:** |
| 44 | + |
| 45 | +- initContainer no longer runs before the operator starts |
| 46 | +- Removes dependency on third party outdated images for initContainers |
| 47 | +- Docker socket no longer mounted for path detection |
| 48 | + |
| 49 | +**Who Is Affected:** |
| 50 | + |
| 51 | +- Users who customized `operator.initcontainer.image` or `operator.initcontainer.resources` |
| 52 | +- Users with Docker installations using non-standard root directories |
| 53 | + |
| 54 | +**Migration:** |
| 55 | + |
| 56 | +The operator initContainer has been removed. |
| 57 | + |
| 58 | +```diff |
| 59 | + operator: |
| 60 | +- initcontainer: |
| 61 | +- image: |
| 62 | +- registry: docker.io |
| 63 | +- repository: docker |
| 64 | +- tag: "20.10" |
| 65 | + resources: |
| 66 | + limits: |
| 67 | + cpu: 100m |
| 68 | + memory: 64Mi |
| 69 | +``` |
| 70 | + |
| 71 | +### 3. Log Path Configuration Removed |
| 72 | + |
| 73 | +**What Changed:** |
| 74 | + |
| 75 | +- Removed `operator.logPath.containerd` and `operator.logPath.crio` |
| 76 | +- Removed ability to configure custom log paths |
| 77 | +- Log paths are now determined automatically based on `containerRuntime` |
| 78 | + |
| 79 | +**Impact:** |
| 80 | + |
| 81 | +- Old `operator.logPath.*` configuration is ignored |
| 82 | +- Each container runtime uses its standard default path |
| 83 | + |
| 84 | +**Who Is Affected:** |
| 85 | + |
| 86 | +- Users who set custom paths via `operator.logPath.containerd` or `operator.logPath.crio` |
| 87 | +- Users with non-standard container log directory locations |
| 88 | + |
| 89 | +**Migration:** |
| 90 | + |
| 91 | +If you were using custom log paths, you must ensure your container runtime uses the standard default paths shown below, or adjust your container runtime configuration to use these standard paths. |
| 92 | + |
| 93 | +## Default Paths by Runtime |
| 94 | + |
| 95 | +v4.0 uses the following default paths based on the configured `containerRuntime`: |
| 96 | + |
| 97 | +| Container Runtime | Default Path | |
| 98 | +|-------------------|--------------| |
| 99 | +| `containerd` | `/var/log/containers` | |
| 100 | +| `crio` | `/var/log/containers` | |
| 101 | +| `docker` | `/var/lib/docker/containers` | |
| 102 | + |
| 103 | +## Migration Scenarios |
| 104 | + |
| 105 | +### Scenario 1: Using Containerd (Default) - No Changes Needed ✅ |
| 106 | + |
| 107 | +```yaml |
| 108 | +# v3.x |
| 109 | +containerRuntime: containerd # or not set |
| 110 | +# ... rest of config |
| 111 | + |
| 112 | +# v4.0 - No changes required! |
| 113 | +# The new defaults work out of the box |
| 114 | +``` |
| 115 | + |
| 116 | +### Scenario 2: Using CRI-O - Minimal Changes |
| 117 | + |
| 118 | +```yaml |
| 119 | +# v3.x |
| 120 | +containerRuntime: crio |
| 121 | +# ... rest of config |
| 122 | + |
| 123 | +# v4.0 - Explicitly set runtime (same as before) |
| 124 | +containerRuntime: crio |
| 125 | +# Default path /var/log/containers works for most CRI-O installations |
| 126 | +``` |
| 127 | + |
| 128 | +### Scenario 3: Using Docker |
| 129 | + |
| 130 | +```yaml |
| 131 | +# v3.x |
| 132 | +containerRuntime: docker |
| 133 | +# (relied on automatic detection) |
| 134 | + |
| 135 | +# v4.0 - Must explicitly set runtime |
| 136 | +containerRuntime: docker |
| 137 | +# Uses default path: /var/lib/docker/containers |
| 138 | +# This works for standard Docker installations |
| 139 | +# If your Docker uses a custom root directory, you must reconfigure Docker |
| 140 | +# to use the standard path |
| 141 | +``` |
| 142 | + |
| 143 | +## Forward Looking: Planned Changes in v5.0 |
| 144 | + |
| 145 | +**Future Change (v5.0):** |
| 146 | + |
| 147 | +- The `fluent-operator-env` _ConfigMap_, which is used to provide backwards compatibility with fluent-operator =<3.5, will be completely removed |
0 commit comments