Skip to content

Data cache support for K8s 1.31 #2106

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

Open
wants to merge 24 commits into
base: release-1.14
Choose a base branch
from

Conversation

cemakd
Copy link
Contributor

@cemakd cemakd commented Jun 4, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:
Adds the required support in PDCSI driver to setup caching for PVCs using local SSDs.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add GKE only data cache feature support in PDCSI driver, it allows to set up LSSDs as caching layer for created PVCs. 

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 4, 2025
@k8s-ci-robot k8s-ci-robot requested review from amacaskill and tyuchn June 4, 2025 20:54
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cemakd
Once this PR has been reviewed and has the lgtm label, please assign sunnylovestiramisu for approval. For more information see the 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 4, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @cemakd. 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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 4, 2025
@sunnylovestiramisu
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 4, 2025
@cemakd
Copy link
Contributor Author

cemakd commented Jun 4, 2025

/retest

return infoSlice[1], nil
}

func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId string) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@sunnylovestiramisu I know we wanted to expand some unit tests coverage too (I don't recollect exact scenarios) Do we add that as well in this PR?

Copy link
Contributor

@sunnylovestiramisu sunnylovestiramisu Jul 18, 2025

Choose a reason for hiding this comment

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

We do not add tests to a backport usually, if we add we should add to master first
.

Reduce new image tag to below 1.14, bump it from 1.13.2 to 1.13.3

Replace return with continue so we don't break out of infinite loop
@@ -51,5 +51,5 @@ imageTag:
name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver
# pdImagePlaceholder in test/k8s-integration/main.go is updated automatically with the newTag
newName: registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver
newTag: "v1.17.2"
newTag: "v1.13.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there here just for testing, or do we want to set it back for the current stable-master?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This value was set to v1.13.2 on the release 1.14 branch per: https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/release-1.14/deploy/kubernetes/images/stable-master/image.yaml

One of the PRs I cherry picked most likely set this to a higher value and that's likely why it shows the diff from 1.17.2.

On this release branch I believe it should be set to the release branch's stable master version right?

@pwschuurman
Copy link
Contributor

@cemakd Can you mention which PRs were backported to this branch?

Changes from overlaid commits (on top of cherry-picked commits from previous PRs): https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/2106/files/f04f49634cd6134fadd9410dd4f286b4d6af947b..2929634ad1e7537419bc15055f6a0b3cb1a52f76

…able.

Conditionally enable data cache on test node pools to fix e2e tests
if nodeName != common.TestNode { // disregard logic below when E2E testing.
dataCacheLSSDCount, err := driver.GetDataCacheCountFromNodeLabel(ctx, nodeName)
return dataCacheLSSDCount != 0, err
} else if nodeName == common.TestNode {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pwschuurman I needed to add this node name == common.TestNode section here for e2e tests to pass. Please lmk if this is not the right approach for testing purposes.

@cemakd
Copy link
Contributor Author

cemakd commented Jul 2, 2025

/retest-required

splitting to fix issues with strings.Split in
case of multiple consecutive spaces
@cemakd
Copy link
Contributor Author

cemakd commented Jul 18, 2025

/retest-required

@k8s-ci-robot
Copy link
Contributor

@cemakd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019 0df87d8 link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022 0df87d8 link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022
pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration 0df87d8 link true /test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

7 participants