Feat/config log levels - #134
Merged
Merged
Conversation
MaybeSam05
force-pushed
the
feat/config-log-levels
branch
2 times, most recently
from
August 12, 2026 19:40
c269d5a to
e861855
Compare
Contributor
Author
|
Squashed the branch into a single commit and force-pushed to clean up the history and match the repo's conventional-commit format (feat: subject + Signed-off-by). No code changes in this push, CI should be re-running now. |
Agalin
reviewed
Aug 13, 2026
Adds a log configuration block to the Archive CRD so operators can control pgBackRest stderr verbosity. Pins console output to off, applies the setting across backup, restore, and WAL commands, and includes e2e coverage. Drops the additionalCommandArgs reserved-flag filtering per review, since silently overriding explicit user args is better handled at admission time. Refs: operasoftware#134 Signed-off-by: Samarth Verma <verma.samarth05@gmail.com>
MaybeSam05
force-pushed
the
feat/config-log-levels
branch
from
August 13, 2026 16:48
e861855 to
226f69e
Compare
Agalin
approved these changes
Aug 13, 2026
Agalin
enabled auto-merge (rebase)
August 13, 2026 21:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
log.levelStderrfield so pod-log verbosity for pgBackRest can be configured instead of the hard-coded--log-level-stderr=warn. Console (stdout) logging is always pinned to--log-level-console=offsoinfo --output=jsonstays parseable.Note:
levelFileandpathwere split out into a follow-up PR ([MaybeSam05#1]) so this one stays focused on pod-log verbosity and the console-off behavior.Problem
Log levels were hard-coded (
stderr=warn,console=off), so debugging a failing backup often surfaced only a fewWARNlines inkubectl logswith no way to raise verbosity.Changes
internal/pgbackrest/api/config.go): optionallogblock withlevelStderronly; levels constrained to pgBackRest's valid values.internal/pgbackrest/command/commandbuilder.go): stderr level from config (defaultwarn); console alwaysoff.logblock.Testing
go test ./internal/pgbackrest/command/logconfig: configureslevelStderr=debug, runs a backup, asserts--log-level-stderr=debugand--log-level-console=offin logged pgBackRest invocations.Compatibility
Fully backward compatible. With no
logblock, behavior matches before (stderr=warn,console=off).Follow-up
File logging (
levelFile,path, log directory creation) is in a stacked PR on top of this branch.