-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Patroni Logs to be stored in a file #4047
Merged
Merged
Conversation
This file contains 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
📝 We have a story in our backlog to address the linter issue separately, so I'll leave that only for now. |
tjmoore4
commented
Dec 9, 2024
tjmoore4
force-pushed
the
patroni-log-to-file
branch
from
December 11, 2024 22:59
18c5a4b
to
b076535
Compare
tjmoore4
force-pushed
the
patroni-log-to-file
branch
from
December 13, 2024 20:32
46ae3da
to
590f899
Compare
tjmoore4
force-pushed
the
patroni-log-to-file
branch
from
December 13, 2024 20:40
590f899
to
4dbba67
Compare
cbandy
reviewed
Dec 16, 2024
pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go
Outdated
Show resolved
Hide resolved
pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go
Outdated
Show resolved
Hide resolved
pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go
Outdated
Show resolved
Hide resolved
pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go
Outdated
Show resolved
Hide resolved
tjmoore4
force-pushed
the
patroni-log-to-file
branch
5 times, most recently
from
December 17, 2024 20:08
ededc3b
to
45f3909
Compare
cbandy
approved these changes
Dec 17, 2024
tjmoore4
force-pushed
the
patroni-log-to-file
branch
from
December 18, 2024 15:50
45f3909
to
073ec5d
Compare
This commit allows for the configuration of the Postgres instance Patroni logs to go to a file on the 'pgdata' volume instead of to stdout. This file is located at '/pgdata/patroni/log/patroni.log'. Both the log size limit and log level are configurable; only the size limit setting is required. If not set, the default behavior of sending all logs to stdout is maintained. Changes to this configuration require a reload to take effect. - https://patroni.readthedocs.io/en/latest/yaml_configuration.html#log Issue: PGO-1701
tjmoore4
force-pushed
the
patroni-log-to-file
branch
from
December 18, 2024 16:09
073ec5d
to
fa85a98
Compare
tjmoore4
commented
Dec 18, 2024
if sizeInBytes < 25000000 { | ||
// TODO(validation): Eventually we should be able to remove this in favor of CEL validation. | ||
// - https://kubernetes.io/docs/reference/using-api/cel/ | ||
r.Recorder.Eventf(cluster, corev1.EventTypeWarning, "PatroniLogStorageLimitTooSmall", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 I updated this from a normal event to a warning event. This is more in line with our existing patterns and what seems to me to be typical usage.
5 tasks
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.
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
Patroni is configured to send logs to stdout
What is the new behavior (if this is a feature change)?
This change allows for the configuration of the Postgres instance
Patroni logs to go to a file on the 'pgdata' volume instead of to
stdout. This file is located at '/pgdata/patroni/log/patroni.log'.
Both the log size limit and log level are configurable; only the
size limit setting is required. If not set, the default behavior
of sending all logs to stdout is maintained.
Changes to this configuration require a reload to take effect.
Other Information:
Issue: PGO-1701