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

disk: ModifyVolume #1252

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

disk: ModifyVolume #1252

wants to merge 8 commits into from

Conversation

huww98
Copy link
Contributor

@huww98 huww98 commented Dec 5, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Support for ModifyVolume for EBS (VolumeAttributesClass in k8s)

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

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

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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. kind/feature Categorizes issue or PR as related to a new feature. labels Dec 5, 2024
@k8s-ci-robot k8s-ci-robot requested a review from mowangdk December 5, 2024 10:01
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: huww98
Once this PR has been reviewed and has the lgtm label, please assign mowangdk for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 5, 2024
@huww98
Copy link
Contributor Author

huww98 commented Dec 5, 2024

We have no way to enable the feature gate on managed ACK cluster now. So do not enable external-storage tests for now.

@huww98 huww98 force-pushed the disk-modify branch 4 times, most recently from 8b9da21 to 39be879 Compare December 6, 2024 08:29
comparable
}

func V1[TReq requests.AcsRequest, TResp tResp](logger logr.Logger, f func(TReq) (TResp, error)) func(TReq) (TResp, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add some metrics here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but maybe with another layer of wrapper

}
} else {
// No error code, just log entire error
attrs = append(attrs, "error", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt there will be any other error types, better to add some warning logs here

comparable
}

func V1[TReq requests.AcsRequest, TResp tResp](logger logr.Logger, f func(TReq) (TResp, error)) func(TReq) (TResp, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does v2 version of sdk has a union interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we will need a separate V2 wrapper.

@huww98 huww98 force-pushed the disk-modify branch 2 times, most recently from a25c610 to ac61709 Compare December 13, 2024 04:07
@huww98 huww98 marked this pull request as ready for review December 17, 2024 10:07
@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 Dec 17, 2024
@huww98 huww98 force-pushed the disk-modify branch 2 times, most recently from bcf4323 to f751cd6 Compare December 19, 2024 06:47
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2024
A central place for all disks pending status changes (attaching/detaching).
Waiter will poll disk status in batch and wake up the caller if the status has changed.

The motivation is reducing OpenAPI call count, to avoid triggering throttling, thus improve system throughput.

Also include a simple fallback waiter to support multi-tanent use-case.

Shared disk support is best effort, since we cannot create new shared disks for test now.

Note: We have observed that after AttachDisk returns, the status remains Available for a short period, so don't rely on disk.Status in pred.
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 19, 2024
Extract request ID, Error code from response or error for logging.

Transform the error for k8s event.
- Do not include anything that changes at each request (e.g. RequestID) in error message, for better event aggregation. RequestID is still present in the log.
- Support using errors.Is() for checking error code programmatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants