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

core: add context to k8sutil replicaset and secret #9397

Merged
merged 1 commit into from Dec 13, 2021

Conversation

y1r
Copy link
Contributor

@y1r y1r commented Dec 11, 2021

Description of your changes:

This commit adds context parameter to k8sutil replicaset and secret
functions. By this, we can handle cancellation during API call of
replicaset and secret resource.

Signed-off-by: Yuichiro Ueno y1r.ueno@gmail.com

Which issue is resolved by this Pull Request:
Part of #8700

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

This commit adds context parameter to k8sutil replicaset and secret
functions. By this, we can handle cancellation during API call of
replicaset and secret resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
@@ -24,8 +24,7 @@ import (
)

// DeleteReplicaSet makes a best effort at deleting a deployment and its pods, then waits for them to be deleted
func DeleteReplicaSet(clientset kubernetes.Interface, namespace, name string) error {
ctx := context.TODO()
func DeleteReplicaSet(ctx context.Context, clientset kubernetes.Interface, namespace, name string) error {
Copy link
Member

Choose a reason for hiding this comment

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

Interesting that DeleteReplicaSet is not used anywhere, it seems useful though, so let's keep it.

@leseb leseb merged commit b10e341 into rook:master Dec 13, 2021
mergify bot added a commit that referenced this pull request Dec 13, 2021
core: add context to k8sutil replicaset and secret (backport #9397)
@y1r y1r deleted the add-context-k8sutil-rs-and-secret branch May 11, 2022 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants