Skip to content

Conversation

@fierlion
Copy link
Contributor

@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 force-pushed the fierlion/nodeStageDaemon branch from fcecb22 to 40e2245 Compare September 21, 2023 21:52
@fierlion fierlion force-pushed the fierlion/nodeStageDaemon branch from 40e2245 to 4d083bd Compare September 21, 2023 22:00
@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
Contributor 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
Contributor 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
@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.

4 participants