Skip to content

Commit 8239036

Browse files
committed
Remove support for custom log paths.
Signed-off-by: Josh Baird <[email protected]>
1 parent cb82377 commit 8239036

File tree

5 files changed

+19
-62
lines changed

5 files changed

+19
-62
lines changed

charts/fluent-operator/MIGRATION-v4.md

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -68,37 +68,32 @@ The operator initContainer has been removed.
6868
memory: 64Mi
6969
```
7070

71-
### 3. Log Path Configuration Simplified
71+
### 3. Log Path Configuration Removed
7272

7373
**What Changed:**
7474

7575
- Removed `operator.logPath.containerd` and `operator.logPath.crio`
76-
- Added new `operator.containerLogPath` for direct path specification
76+
- Removed ability to configure custom log paths
77+
- Log paths are now determined automatically based on `containerRuntime`
7778

7879
**Impact:**
7980

80-
- Old logPath configuration is ignored
81-
- New configuration accepts full path to container logs (not just root directory)
81+
- Old `operator.logPath.*` configuration is ignored
82+
- Custom log paths via `operator.containerLogPath` are no longer supported
83+
- Each container runtime uses its standard default path
8284

8385
**Who Is Affected:**
8486

8587
- Users who set custom paths via `operator.logPath.containerd` or `operator.logPath.crio`
88+
- Users with non-standard container log directory locations
8689

8790
**Migration:**
8891

89-
90-
In v3 the root directory was specified for the log path. In v4 this will be the full path to the container logs folder.
91-
92-
```diff
93-
operator:
94-
- logPath:
95-
- containerd: /var/log
96-
+ containerLogPath: "/var/log/containers"
97-
```
92+
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.
9893

9994
## Default Paths by Runtime
10095

101-
v4.0 uses the following default paths when `operator.containerLogPath` is not explicitly set:
96+
v4.0 uses the following default paths based on the configured `containerRuntime`:
10297

10398
| Container Runtime | Default Path |
10499
|-------------------|--------------|
@@ -131,7 +126,7 @@ containerRuntime: crio
131126
# Default path /var/log/containers works for most CRI-O installations
132127
```
133128

134-
### Scenario 3: Using Docker with Standard Paths
129+
### Scenario 3: Using Docker
135130

136131
```yaml
137132
# v3.x
@@ -140,37 +135,10 @@ containerRuntime: docker
140135

141136
# v4.0 - Must explicitly set runtime
142137
containerRuntime: docker
143-
# Default /var/lib/docker/containers works for standard Docker installations
144-
# No need to set operator.containerLogPath
145-
```
146-
147-
### Scenario 4: Using Docker with Custom Paths
148-
149-
```yaml
150-
# v3.x
151-
containerRuntime: docker
152-
# (used initContainer to detect custom docker root)
153-
154-
# v4.0 - Must explicitly configure path
155-
containerRuntime: docker
156-
operator:
157-
containerLogPath: "/custom/docker/root/containers"
158-
```
159-
160-
### Scenario 5: Custom Log Paths (Any Runtime)
161-
162-
```yaml
163-
# v3.x
164-
containerRuntime: containerd
165-
operator:
166-
logPath:
167-
containerd: /custom/log/path
168-
169-
# v4.0 - Use new configuration key
170-
containerRuntime: containerd
171-
operator:
172-
containerLogPath: "/custom/log/path/containers"
173-
# Note: append "/containers" to your old path
138+
# Uses default path: /var/lib/docker/containers
139+
# This works for standard Docker installations
140+
# If your Docker uses a custom root directory, you must reconfigure Docker
141+
# to use the standard path
174142
```
175143

176144
## Forward Looking: Planned Changes in v5.0

charts/fluent-operator/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ By default, all CRDs required for Fluent Operator will be installed. To prevent
2727

2828
- Default `containerRuntime` changed from `docker` to `containerd`
2929
- Removed initContainers for dynamic path detection for the `docker` runtime
30-
- Simplified configuration with `operator.containerLogPath`
30+
- Removed ability to configure custom log paths - uses fixed defaults based on `containerRuntime`
3131

3232
**Quick Migration:**
3333

3434
```yaml
3535
# If using Docker, explicitly set in your values:
3636
containerRuntime: docker
3737

38-
# If using a non-default for `docker` logs, use new configuration:
39-
operator:
40-
containerLogPath: "/var/log/containers"
38+
# Note: Custom log paths are no longer supported
39+
# Each runtime uses its fixed default path
4140
```
4241

4342
See [MIGRATION-v4.md](MIGRATION-v4.md) for complete migration instructions.

charts/fluent-operator/templates/_helpers.tpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,10 @@ Util function for generating the image URL based on the provided options.
8585
{{- end }}
8686

8787
{{/*
88-
Determine the container log path based on containerRuntime and explicit configuration
88+
Determine the container log path based on containerRuntime
8989
*/}}
9090
{{- define "fluent-operator.containerLogPath" -}}
91-
{{- if .Values.operator.containerLogPath -}}
92-
{{- .Values.operator.containerLogPath -}}
93-
{{- else if eq .Values.containerRuntime "docker" -}}
91+
{{- if eq .Values.containerRuntime "docker" -}}
9492
/var/lib/docker/containers
9593
{{- else -}}
9694
/var/log/containers

charts/fluent-operator/templates/fluent-operator-configmap.yaml renamed to charts/fluent-operator/templates/fluent-operator-configmap-env.yaml

File renamed without changes.

charts/fluent-operator/values.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ containerRuntime: containerd
1010
Kubernetes: true
1111

1212
operator:
13-
# Path to container log files on the host
14-
# If not set, defaults based on containerRuntime:
15-
# - containerd: /var/log/containers
16-
# - crio: /var/log/containers
17-
# - docker: /var/lib/docker/containers
18-
# Override this if your cluster uses a non-standard location
19-
containerLogPath: ~
20-
2113
image:
2214
registry: ghcr.io
2315
repository: fluent/fluent-operator/fluent-operator

0 commit comments

Comments
 (0)