Skip to content

Commit d7e5657

Browse files
authored
Fix bug in logrotate mounting (#4145)
* Change logic to includeLogrotate Only logrotate if - boolean is true and - OTel log gate is on
1 parent bc02379 commit d7e5657

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/collector/instance.go

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ func AddToPod(
5454
return
5555
}
5656

57+
// We only want to include log rotation if this type of pod requires it
58+
// (indicate by the includeLogrotate boolean) AND if logging is enabled
59+
// for this PostgresCluster/PGAdmin
60+
includeLogrotate = includeLogrotate && OpenTelemetryLogsEnabled(ctx, spec)
61+
5762
// Create volume and volume mount for otel collector config
5863
configVolumeMount := corev1.VolumeMount{
5964
Name: "collector-config",

0 commit comments

Comments
 (0)