-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[release/1.7] Add cri-api v1alpha2 usage warning to all api calls #9479
Conversation
Signed-off-by: ruiwen-zhao <[email protected]>
// emitUsageWarning emits a warning when v1alpha2 cri-api is called. | ||
func (in *instrumentedAlphaService) emitUsageWarning(ctx context.Context) { | ||
// Only emit the warning the first time an v1alpha2 api is called | ||
in.emitWarning.Do(func() { |
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.
this LGTM. I don't know how big this problem will be for the end user - it may be interesting to log the specific call that was called. This way customers received this warning may understand who called it
/cherrypick release/1.6 |
@samuelkarp: #9479 failed to apply on top of branch "release/1.6":
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. |
Previous #9336 added warnings for the usage of cri-api
Status
andVersion
.There are some use cases where clients might use cri-apis without calling those two apis. For example,
ContainerStatus
to find the container for a certain pid for monitoring purposes.Therefore, this PR adds warning to all cri-api v1alpha2 apis.