Skip to content
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

kube-controller-manager: finish conversion to contextual logging #119250

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Jul 12, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Migrate pkg/controller/podgc to structured and contextual logging and clean up some left-over log calls in other controllers.

Which issue(s) this PR fixes:

Related-to: kubernetes/enhancements#3077

Does this PR introduce a user-facing change?

Migrated the podgc controller and some other remaining log calls within `kube-controller-manager` to use [contextual logging](https://k8s.io/docs/concepts/cluster-administration/system-logs/#contextual-logging). `kube-controller-manager` is now converted completely.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

-[KEP]: https://github.com/kubernetes/enhancements/issues/3077

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 12, 2023
@pohly
Copy link
Contributor Author

pohly commented Jul 12, 2023

WIP because #119147 needs to be merged first.

@k8s-ci-robot k8s-ci-robot added area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 12, 2023
@mengjiao-liu
Copy link
Member

/sig instrumentation
/wg structured-logging
/area logging

@k8s-ci-robot k8s-ci-robot added sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. area/logging labels Jul 12, 2023
@mengjiao-liu
Copy link
Member

contextual logging migration is almost LGTM.

pull-kubernetes-verify CI job failed and needs to fix it.

E0712 09:35:53.270251  204511 main.go:41] Error: Failed executing generator: some packages had errors:
errors in package "k8s.io/kubernetes/cmd/cloud-controller-manager":
the following imports did not match any allowed prefix:
  k8s.io/kubernetes/test/utils/ktesting
+++ exit code: 1
+++ error: 1
�[0;31mFAILED   verify-import-boss.sh	179s

@mengjiao-liu
Copy link
Member

WIP because #119147 needs to be merged first.

#119147 has been merged, so you can rebase this PR.

@pohly pohly force-pushed the controller-contextual-logging branch from fee5686 to a8a7048 Compare July 12, 2023 11:45
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 12, 2023
@pohly
Copy link
Contributor Author

pohly commented Jul 12, 2023

@mengjiao-liu: Rebased, please review.

@pohly pohly changed the title WIP: kube-controller-manager: finish conversion to contextual logging kube-controller-manager: finish conversion to contextual logging Jul 12, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2023
@mengjiao-liu
Copy link
Member

./hack/verify-import-boss.sh script run to report the above error(#119250 (comment)) when I run locally.
Waiting for CI job pull-kubernetes-verify result.

This removes all exceptions and fixes the remaining unconverted log calls.
@pohly pohly force-pushed the controller-contextual-logging branch from a8a7048 to 7d06481 Compare July 12, 2023 12:57
@k8s-ci-robot k8s-ci-robot added the sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. label Jul 12, 2023
Copy link
Contributor

@shivanshuraj1333 shivanshuraj1333 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@shivanshuraj1333
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 12, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c3e95a7ef41e4496c9bb847a77695f2ce2897596

@shivanshuraj1333
Copy link
Contributor

shivanshuraj1333 commented Jul 12, 2023

@soltysh can you please take a look?
thanks!

@shivanshuraj1333
Copy link
Contributor

/assign @soltysh

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/approve

@soltysh
Copy link
Contributor

soltysh commented Jul 12, 2023

/triage accpted
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jul 12, 2023
@k8s-ci-robot
Copy link
Contributor

@soltysh: The label(s) triage/accpted cannot be applied, because the repository doesn't have them.

In response to this:

/triage accpted
/priority important-longterm

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 removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jul 12, 2023
@soltysh
Copy link
Contributor

soltysh commented Jul 12, 2023

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 12, 2023
@pohly
Copy link
Contributor Author

pohly commented Jul 12, 2023

Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

/approve

For cmd/cloud-controller-manager

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewsykim, pohly, shivanshu1333, soltysh

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

The pull request process is described here

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit 406d2df into kubernetes:master Jul 13, 2023
17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/logging area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants