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 CSI NodeStage #3918

Merged
merged 1 commit into from Sep 22, 2023
Merged

Add CSI NodeStage #3918

merged 1 commit into from Sep 22, 2023

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Sep 21, 2023

Summary

This adds NodeStage to the internal/minimal EBS CSI Driver. This code comes directly from https://github.com/kubernetes-sigs/aws-ebs-csi-driver and is used to create a minimal Node-specific driver.

Implementation details

The driver is updated to use the public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs base image which contains all requisite mount utilities in the path while still keeping the overall driver to ~50mb in size. The NodeStage implementation adds only the files and dependencies which are directly tied to the EBS volume Mount/format/fs resize.

Testing

Manual test process:

  • attach an ebs volume to EC2 host
  • built CSI Driver Image using Dockerfile
  • started driver as an ecs-agent Managed Daemon
  • called NodeStage from ecs-agent-based csiclient with hard coded device name and volume ID
  • validated the mount succeeds with xfs filesystem type.

New tests cover the changes: no

Description for the changelog

Update Minimal CSI Driver with NodeStage method.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fierlion fierlion requested a review from a team as a code owner September 21, 2023 21:42
@fierlion fierlion changed the title Add CSI NodeStage [WIP] Add CSI NodeStage Sep 21, 2023
}
}

func (d *nodeService) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error) {
klog.V(4).InfoS("NodeGetVolumeStats: called", "args", *req)
klog.InfoS("NodeGetVolumeStats: called")
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we getting rid of the args and req?

Copy link
Member Author

Choose a reason for hiding this comment

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

(will add in a future pr with the updated build process)

}

// IsBlock checks if the given path is a block device
func (d *nodeService) IsBlockDevice(fullPath string) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

(will add in a future pr with the updated build process)

@fierlion fierlion merged commit 4dc60df into aws:dev Sep 22, 2023
40 checks passed
@fierlion fierlion deleted the fierlion/nodeStageDaemon branch September 22, 2023 18:29
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

4 participants