kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
154 stars 77 forks source link

fix: Stop StatusWatcher on Forbidden API error #585

Closed karlkfi closed 2 years ago

karlkfi commented 2 years ago

Without this fix, the StatusWatcher gets stuck in an endless retry loop until cancelled or permission is granted, printing the following warning:

W0516 21:03:57.305558 13045 reflector.go:324] pkg/mod/k8s.io/client-go@v0.24.0/tools/cache/reflector.go:167: failed to list /v1, Kind=ConfigMap: configmaps is forbidden: User "system:serviceaccount:default:user" cannot list resource "configmaps" in API group "" at the cluster scope

Liujingfang1 commented 2 years ago

/lgtm

janetkuo commented 2 years ago

/lgtm

Liujingfang1 commented 2 years ago

/lgtm /approve

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karlkfi, Liujingfang1

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [Liujingfang1] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment