-
Notifications
You must be signed in to change notification settings - Fork 101
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
Support structure logging for livenessprobe container #168
Conversation
31599dc
to
900dd34
Compare
@mauriciopoppe Could you please take a look and suggest if this changes seems ok to you. |
900dd34
to
dffae97
Compare
Added commit to use Suffix S |
/test pull-kubernetes-csi-livenessprobe-unit |
1 similar comment
/test pull-kubernetes-csi-livenessprobe-unit |
if *logFormatJSON { | ||
jsonFactory := json.Factory{} | ||
logger, _ := jsonFactory.Create(logsapi.LoggingConfiguration{Format: "json"}) | ||
klog.InfoS("logging livenessprobe",logger) |
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 think this is just logging logger
but not telling klog to use it for logging
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.
@mauriciopoppe ok i will re check this, if it's possible could you provide me pointer on this.
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 wrote some pointers in kubernetes-csi/node-driver-registrar#228 (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.
sure i will check that thanks
@@ -46,6 +48,7 @@ var ( | |||
metricsAddress = flag.String("metrics-address", "", "(deprecated) The TCP network address where the prometheus metrics endpoint will listen (example: `:8080`). The default is empty string, which means metrics endpoint is disabled. If set, `--http-endpoint` cannot be set, and the address cannot resolve to localhost + the port from `--health-port`.") | |||
httpEndpoint = flag.String("http-endpoint", "", "The TCP network address where the HTTP server for diagnostics, including CSI driver health check and metrics. The default is empty string, which means the server is disabled. If set, `--health-port` and `--metrics-address` cannot be explicitly set.") | |||
metricsPath = flag.String("metrics-path", "/metrics", "The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.") | |||
logFormatJSON = flag.Bool("log-format-json", false, "set log formatter to json") |
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.
we should follow the same flag as the kubelet which is logging-format
https://github.com/kubernetes/component-base/blob/v0.25.3/logs/api/v1/options.go#L185
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.
Sure i will modify this to logging-format
/retest |
Resolve the merge conflict. |
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.
Looks like this needs a rebase, feel free to re-request review when this is ready.
@ggriffiths Sure will do this . |
Resolved the merge conflict |
/retest |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Kartik494 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Kartik494: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/easycla |
@Kartik494 you can squash those commits into one to fix it.
for example: |
PR needs rebase. 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. |
/close |
@jsafrane: 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. |
What type of PR is this?
What this PR does / why we need it:
This PR add support for structure logging on livenessprobe container
Which issue(s) this PR fixes:
Fixes #165
Special notes for your reviewer:
Does this PR introduce a user-facing change?: