-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Document setting logging with Kustomize #5766
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
Conversation
|
On a semi-related side-note, Kustomize's inability to use xpath/jsonpath like selectors to match patch targets is agony - we can't write |
everettraven
left a comment
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.
jmrodri
left a comment
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.
Two minor issues otherwise looks great. Once those two items are addressed, my review can be overridden.
website/content/en/docs/building-operators/golang/references/logging.md
Outdated
Show resolved
Hide resolved
website/content/en/docs/building-operators/golang/references/logging.md
Outdated
Show resolved
Hide resolved
|
@jmrodri I've merged your changes. I will need to satisfy the DCO too, then I can merge this. |
The Zap logger framework does not appear to support using environment-variables for setting the log level etc, so users need to be able to modify the command line to set log levels. Kustomize is very commonly used to deploy operators. Document how to set the log level with a Kustomize patch, without having to copy the whole Deployment and hack it by hand. Ideally the controller would support log level configuration in the environment and document it, so a simple `ConfigMap` with `envFrom` could be used to control logging instead. But in the absence of this, documenting how to set up log levels somehow is desirable. Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
|
@jmrodri I have rebased to apply your wording changes as fixups to this PR to make the DCO checker happy. Once your approval state is changed I will merge. Thanks for the review. |
|
Failed to merge because
Suspect just needs a retry |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
/lifecycle frozen |
|
@jmrodri: The In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of the change:
Add a short example showing how to configure the Zap log level for the operator with Kustomize.
Patches https://sdk.operatorframework.io/docs/building-operators/golang/references/logging/
Motivation for the change:
The Zap logger framework does not appear to support using environment-variables for setting the log level etc, so users need to be able to modify the command line to set log levels.
Kustomize is very commonly used to deploy operators. Document how to set the log level with a Kustomize patch, without having to copy the whole Deployment and hack it by hand.
Ideally the controller would support log level configuration in the environment and document it, so a simple
ConfigMapwithenvFromcould be used to control logging instead. But in the absence of this, documenting how to set up log levels somehow is desirable.Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml) n/awebsite/content/en/docsn/a