kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

🌱 Add useful information for patroller log lines #172

Closed vincent-pli closed 3 years ago

vincent-pli commented 3 years ago

What this PR does / why we need it: When patrols started and no virtualcluster, it keep report ignore information(since no virtualcluster available), like this:

I0712 07:09:12.135835       1 checker.go:53] tenant masters has no clusters, give up period checker
I0712 07:09:12.159229       1 checker.go:52] tenant masters has no clusters, give up period checker
I0712 07:09:12.257849       1 checker.go:51] tenant masters has no clusters, give up storage class period checker
I0712 07:09:12.936675       1 checker.go:53] tenant masters has no clusters, give up period checker
I0712 07:09:13.027904       1 checker.go:55] tenant masters has no clusters, give up period checker
I0712 07:09:13.323316       1 checker.go:56] tenant masters has no clusters, give up period checker
I0712 07:09:14.351955       1 checker.go:50] tenant masters has no clusters, give up period checker
I0712 07:09:16.989112       1 checker.go:137] tenant masters has no clusters, give up period checker
I0712 07:09:18.420710       1 checker.go:53] tenant masters has no clusters, give up secret period checker
I0712 07:09:31.396387       1 checker.go:52] tenant masters has no clusters, give up CRD period checker

Some of them do not show which patrols it come from and some does, so consist them.

k8s-ci-robot commented 3 years ago

Hi @vincent-pli. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
christopherhein commented 3 years ago

/ok-to-test

christopherhein commented 3 years ago

While you are there making changes can we change that log to say super cluster has no tenant control planes, giving up periodic checker: {name} I'd like to move the name of it out of the main message in case we want to trigger alerts/notifications based on log lines it's easier to parse.

christopherhein commented 3 years ago

/lgtm /approve

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christopherhein, vincent-pli

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: - ~~[virtualcluster/OWNERS](https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/OWNERS)~~ [christopherhein] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment