Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

initial commit for CSI adapter #6

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

krishchow
Copy link

This PR aims to add the basic boilerplate for the COSI CSI adapter. Future PRs will add implementations of the Node controller and Identity controller for the CSI adapter.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 9, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @krishchow!

It looks like this is your first PR to kubernetes-sigs/container-object-storage-interface-csi-adapter 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/container-object-storage-interface-csi-adapter has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 9, 2020
@NicolasT
Copy link
Contributor

NicolasT commented Dec 9, 2020

Your branch contains bin/csi-adapater, a 47MB binary file, which should not be in VCS. You'll likely want to remove it, and squash such removal with the code commit so the binary doesn't end up in the repository.

}

func (i *IdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
return &csi.GetPluginInfoResponse{}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of stub results, consider IdentityServer to 'inherit' from csi.UnimplementedIdentityServer.

Copy link
Author

Choose a reason for hiding this comment

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

For the IdentityServer, I would actually prefer to do it this way. Most of the logic is already outlined in another commit, and when I open the second PR to add that here, we might as well try to keep the diff as small as possible.

}

func (n NodeServer) NodeStageVolume(ctx context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) {
panic("implement me")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same, let NodeServer 'inherit' csi.UnimplementedNodeServer.

Copy link
Author

Choose a reason for hiding this comment

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

Same as the IdentityServer, the actual implementation for the NodeServer is mostly already finished in an external PR, and I think it would be more valuable to keep future diffs smaller

@krishchow
Copy link
Author

Your branch contains bin/csi-adapater, a 47MB binary file, which should not be in VCS. You'll likely want to remove it, and squash such removal with the code commit so the binary doesn't end up in the repository.

Rebased and removed, I thought I added that to the .gitignore 😅

main.go Outdated

func main() {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGSEGV)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we want to 'properly handle' SIGSEGV. IMO a segmentation fault should crash an application unless the app can really do something 'intelligent' about it.

Copy link
Contributor

Choose a reason for hiding this comment

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

SEGFault should not lead to forced termination of any I/O in progress. The whole point of gracefully handling this signal to complete I/O in progress before exiting. This should still be here and added to the other repos as well if it’s not already there

Copy link
Author

@krishchow krishchow Dec 9, 2020

Choose a reason for hiding this comment

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

That makes sense to me, I have removed that signal for the time being

@krishchow krishchow force-pushed the initial branch 2 times, most recently from c57ffcc to 6b93c4d Compare December 10, 2020 17:14
@wlan0
Copy link
Contributor

wlan0 commented Dec 10, 2020

All the outstanding comments have been addressed. LGTM

@wlan0
Copy link
Contributor

wlan0 commented Dec 10, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: krishchow, wlan0

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 Dec 10, 2020
@k8s-ci-robot k8s-ci-robot merged commit 26824b4 into kubernetes-retired:master Dec 10, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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.

5 participants