-
Notifications
You must be signed in to change notification settings - Fork 61
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
Migrate to v2.0 to become a library #221
Migrate to v2.0 to become a library #221
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexander-ding 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 |
Welcome @alexander-ding! |
Hi @alexander-ding. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass review:
- Add a more descriptive comment to the PR explaining what were the steps that you took in each commit
- The PR is huge! I'd split it in different PRs, this is so that it's easier to review / traceback changes.
@@ -0,0 +1,238 @@ | |||
package disk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this file copied or moved? I think we should move files first tracking them with git and then make changes
SERVICE_STATUS_CONTINUE_PENDING = 5 | ||
SERVICE_STATUS_PAUSE_PENDING = 6 | ||
SERVICE_STATUS_PAUSED = 7 | ||
SERVICE_STATUS_UNKNOWN ServiceStatus = iota |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, thanks for this change
@@ -67,36 +64,34 @@ func TestServiceCommands(t *testing.T) { | |||
require.NoError(t, err, "failed unmarshalling json out=%v", out) | |||
|
|||
assert.Equal(t, serviceInfo.Status, uint32(response.Status)) | |||
assert.Equal(t, v1alpha1.ServiceStatus_STOPPED, response.Status) | |||
assert.Equal(t, system.SERVICE_STATUS_STOPPED, response.Status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I see that this was generated from protoc but replaced with a const that was already defined in pkg/system/types.go
integrationtests/volume_test.go
Outdated
|
||
// Empty volume test | ||
runNegativeIsVolumeFormattedRequest(t, client, "") | ||
// runNegativeIsVolumeFormattedRequest(t, client, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened with these tests?
@alexander-ding: The following tests failed, say
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/test-infra repository. I understand the commands that are listed here. |
Looks like this not only enables using the CSI proxy as a library but removes the ability to run it as a gRPC server application? Please let me know if that's not true. Running the CSI Proxy separately from the CSI driver that uses it provides really valuable security isolation. Our current implementation for Windows SMB support (at NetApp) lets us have our Windows pods be unprivileged with no host access, leaving those privileges to the CSI Proxy. This greatly reduces the attack surface. |
You're right. Note that the existing client-server model will still be available on the I'll defer to @mauriciopoppe to chime in on the security considerations. |
@ameade Thanks for the feedback, CSI Proxy does provide format/mount isolation to some directories in the filesystem https://github.com/kubernetes-csi/csi-proxy/blob/v1.x/cmd/csi-proxy/main.go#L49 but with a few drawbacks.
In addition the current client/server model has some drawbacks, this is one of them:
By becoming similar to the Linux node component which runs as a privileged container I think we'll have a similar deployment for both OSs. At the same time, enabling HostProcess Pods is also a security concern as it provides no filesystem isolation, this is a point I'll cover in the KEP and strategies on how to use it in a cluster. Let's continue the discussion in the KEP. |
@ameade KEP is up in kubernetes/enhancements#3641, if you have further questions about the motivation, security or any other question please add it to the PR. |
@alexander-ding: PR needs rebase. 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/test-infra repository. |
4133d1d Merge pull request kubernetes-csi#226 from msau42/cloudbuild 8d519d2 Pin buildkit to v0.10.6 to workaround v0.11 bug with docker manifest 6e04a03 Merge pull request kubernetes-csi#224 from msau42/cloudbuild 26fdfff Update cloudbuild image 6613c39 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update 0e7ae99 Update k8s image repo url 77e47cc Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version 155854b Fix dep version mismatch 8f83905 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update 1d3f94d Update go version to 1.20 to match k/k v1.27 e322ce5 Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error b74a512 test: fix golint error aa61bfd Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver 7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0 a2171be Merge pull request kubernetes-csi#216 from msau42/process cb98782 Merge pull request kubernetes-csi#217 from msau42/owners a11216e add new reviewers and remove inactive reviewers dd98675 Add step for checking builds b66c082 Merge pull request kubernetes-csi#214 from pohly/junit-fixes b9b6763 filter-junit.go: fix loss of testcases when parsing Ginkgo v2 JUnit d427783 filter-junit.go: preserve system error log 38e1146 prow.sh: publish individual JUnit files as separate artifacts git-subtree-dir: release-tools git-subtree-split: 4133d1df083eaa65bdeddd0530d54278529c7a60
c10b678 Merge pull request kubernetes-csi#227 from coulof/check-sidecar-supported-versions b055535 Header bd0a10b typo c39d73c Add comments f6491af Script to verify EOL sidecar version 4133d1d Merge pull request kubernetes-csi#226 from msau42/cloudbuild 8d519d2 Pin buildkit to v0.10.6 to workaround v0.11 bug with docker manifest 6e04a03 Merge pull request kubernetes-csi#224 from msau42/cloudbuild 26fdfff Update cloudbuild image 6613c39 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update 0e7ae99 Update k8s image repo url 77e47cc Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version 155854b Fix dep version mismatch 8f83905 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update 1d3f94d Update go version to 1.20 to match k/k v1.27 e322ce5 Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error b74a512 test: fix golint error aa61bfd Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver 7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0 a2171be Merge pull request kubernetes-csi#216 from msau42/process cb98782 Merge pull request kubernetes-csi#217 from msau42/owners a11216e add new reviewers and remove inactive reviewers dd98675 Add step for checking builds b66c082 Merge pull request kubernetes-csi#214 from pohly/junit-fixes b9b6763 filter-junit.go: fix loss of testcases when parsing Ginkgo v2 JUnit d427783 filter-junit.go: preserve system error log 38e1146 prow.sh: publish individual JUnit files as separate artifacts git-subtree-dir: release-tools git-subtree-split: c10b67804e07a324fe33595040afd13f020ee000
What type of PR is this?
/kind api-change
What this PR does / why we need it:
In light of HostProcess containers on K8s Windows, we no longer need the client/server model, with a separate binary running on each Windows node. Instead, we can provide CSI Proxy's functionalities as a Go library to be imported by CSI driver implementations running in HostProcess containers. The change involves a complete restructure of the package structure and bumping the Go version to v2. Each API group is now provided under /pkg/, with the OS package written in /pkg//api.
Which issue(s) this PR fixes:
Part of #217
Special notes for your reviewer:
Does this PR introduce a user-facing change?: