Skip to content

Conversation

@Kartik494
Copy link

What type of PR is this?

/kind bug

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?:

Added support for structure logging

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 2, 2022
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 2, 2022
@Kartik494
Copy link
Author

@mauriciopoppe Could you please take a look and suggest if this changes seems ok to you.

@Kartik494
Copy link
Author

Added commit to use Suffix S InfoS.

@Kartik494
Copy link
Author

/test pull-kubernetes-csi-livenessprobe-unit

1 similar comment
@Kartik494
Copy link
Author

/test pull-kubernetes-csi-livenessprobe-unit

if *logFormatJSON {
jsonFactory := json.Factory{}
logger, _ := jsonFactory.Create(logsapi.LoggingConfiguration{Format: "json"})
klog.InfoS("logging livenessprobe",logger)
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

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

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")
Copy link
Member

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

Copy link
Author

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

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2022
@Kartik494
Copy link
Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2022
@Kartik494
Copy link
Author

Resolve the merge conflict.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 23, 2022
Copy link
Contributor

@ggriffiths ggriffiths left a 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.

@Kartik494
Copy link
Author

@ggriffiths Sure will do this .

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2023
@Kartik494
Copy link
Author

Resolved the merge conflict

@Kartik494
Copy link
Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 31, 2023
@linux-foundation-easycla
Copy link

CLA Missing ID CLA Not Signed

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 28, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kartik494
Once this PR has been reviewed and has the lgtm label, please assign msau42 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

@Kartik494: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-csi-livenessprobe-1-23-on-kubernetes-1-23 cc85cbe link true /test pull-kubernetes-csi-livenessprobe-1-23-on-kubernetes-1-23
pull-kubernetes-csi-livenessprobe-1-26-on-kubernetes-1-26 f7a9dea link false /test pull-kubernetes-csi-livenessprobe-1-26-on-kubernetes-1-26
pull-kubernetes-csi-livenessprobe-1-25-on-kubernetes-1-25 f7a9dea link true /test pull-kubernetes-csi-livenessprobe-1-25-on-kubernetes-1-25
pull-kubernetes-csi-livenessprobe-unit f7a9dea link true /test pull-kubernetes-csi-livenessprobe-unit
pull-kubernetes-csi-livenessprobe-1-24-on-kubernetes-1-24 f7a9dea link true /test pull-kubernetes-csi-livenessprobe-1-24-on-kubernetes-1-24

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.

Details

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.

@Kartik494
Copy link
Author

/easycla

@carlory
Copy link
Member

carlory commented Jun 6, 2023

CLA Missing ID CLA Not Signed

@Kartik494 you can squash those commits into one to fix it.

git rebase -i HEAD~5

for example:

@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Details

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 20, 2023
@jsafrane
Copy link
Contributor

/close
in favor of #202

@k8s-ci-robot
Copy link
Contributor

@jsafrane: Closed this PR.

Details

In response to this:

/close
in favor of #202

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support structured logging

6 participants