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

Add Alpha Support for Windows HostProcess Containers #2011

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

torredil
Copy link
Member

Is this a bug fix or adding new feature?

Feature

What is this PR about? / Why do we need it?

This PR adds alpha support for running the driver node pod as a Windows HostProcess container. This is a new feature that allows the driver to directly access the host's Windows storage APIs to perform privileged storage operations without requiring the CSI Proxy binary.

Summary of Changes

  • Add a new CSIProxyMounterV2 that implements the Mounter interface using direct csi-proxy/v2 API calls instead of the v1 gRPC client.
  • Update NewNodeMounter to return a SafeFormatAndMount configured with either CSIProxyMounter or CSIProxyMounterV2 based on the windowsHostProcess parameter
  • Add a node.windowsHostProcess configuration option to enable HostProcess mode.
  • Add a new external-windows-hostprocess makefile target to test the feature in the CI environment.

What testing is done?

Manual

@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 Apr 17, 2024
Copy link

github-actions bot commented Apr 17, 2024

Code Coverage Diff

File Old Coverage New Coverage Delta
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/cloud/metadata/k8s.go 80.0% 56.0% -24.0
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/util/util.go 80.0% 55.6% -24.4

Signed-off-by: torredil <torredil@amazon.com>
@torredil torredil force-pushed the feature-hostprocess branch 9 times, most recently from 0012be6 to b5c0b69 Compare April 23, 2024 15:12
@torredil
Copy link
Member Author

helm upgrade --install aws-ebs-csi-driver --namespace kube-system ./charts/aws-ebs-csi-driver --values ./charts/aws-ebs-csi-driver/values.yaml --set node.enableWindows=true --set node.windowsHostProcess=true

kubetest2 noop \
  --run-id="e2e-kubernetes" \
  --test=ginkgo \
  -- \
  --test-package-version=v1.29.0 \
  --skip-regex="\[Disruptive\]|\[Serial\]|\[LinuxOnly\]|\[Feature:VolumeSnapshotDataSource\]|\(xfs\)|\(ext4\)|\(block volmode\)" \
  --focus-regex="External.Storage" \
  --parallel=40 \
  --test-args="-storage.testdriver=/home/torredil/go/src/github.com/torredil/aws-ebs-csi-driver/tests/e2e-kubernetes/manifests.yaml" &

Ran 32 of 7692 Specs in 223.462 seconds
SUCCESS! -- 32 Passed | 0 Failed | 0 Pending | 7660 Skipped
helm upgrade --install aws-ebs-csi-driver --namespace kube-system ./charts/aws-ebs-csi-driver --values ./charts/aws-ebs-csi-driver/values.yaml --set node.enableWindows=true --set node.windowsHostProcess=false

kubetest2 noop \
  --run-id="e2e-kubernetes" \
  --test=ginkgo \
  -- \
  --test-package-version=v1.29.0 \
  --skip-regex="\[Disruptive\]|\[Serial\]|\[LinuxOnly\]|\[Feature:VolumeSnapshotDataSource\]|\(xfs\)|\(ext4\)|\(block volmode\)" \
  --focus-regex="External.Storage" \
  --parallel=40 \
  --test-args="-storage.testdriver=/home/torredil/go/src/github.com/torredil/aws-ebs-csi-driver/tests/e2e-kubernetes/manifests.yaml" &

Ran 32 of 7692 Specs in 247.136 seconds
SUCCESS! -- 32 Passed | 0 Failed | 0 Pending | 7660 Skipped

cc: @ConnorJC3 @AndrewSirenko

Makefile Show resolved Hide resolved
pkg/cloud/metadata/k8s.go Show resolved Hide resolved
pkg/mounter/mount_windows.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ConnorJC3 ConnorJC3 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2024
pkg/driver/options.go Outdated Show resolved Hide resolved
pkg/cloud/metadata/k8s.go Outdated Show resolved Hide resolved
pkg/mounter/mount_windows.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2024
Signed-off-by: torredil <torredil@amazon.com>
@ConnorJC3
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2024
@AndrewSirenko
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AndrewSirenko

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:

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2024
@k8s-ci-robot k8s-ci-robot merged commit f929e1f into kubernetes-sigs:master Apr 25, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

None yet

4 participants