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

Bump version to v2 #275

Merged

Conversation

alexander-ding
Copy link
Contributor

@alexander-ding alexander-ding commented Oct 25, 2022

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:
The migration guide link doesn't work right now. I'm pushing the docs on the next PR.

Does this PR introduce a user-facing change?:

action required: releases CSI Proxy v2

As Windows HostProcess pods reach beta in Kubernetes 1.23, we no longer need the clients/server model of CSI Proxy
to run privileged storage operations. Driver deployments can run as HostProcess containers to directly issue the
privileged commands. As such, CSI Proxy is becoming a format/mount utility library similar to
[kubernetes/mount-utils](https://github.com/kubernetes/mount-utils) that CSI Drivers can include to get convenience
methods to execute privileged storage operations.

We have also taken advantage of the major version change to reorganize the package structure and improve some API
names. Details on this version bump and a migration guide will be available in the KEP and corresponding blog post upon
official release. In the mean time, we will provide usage instructions for CSI Proxy v2 in
[/docs/USAGE.md](https://github.com/kubernetes-csi/csi-proxy/blob/library-development/docs/USAGE.md) on this branch
for driver developers to experiment with the migration.

Below is a list of breaking changes:

1. The host binary is no longer generated. CSI Proxy becomes a regular Go library.
2. Individual API group versioning is removed. CSI Proxy maintains a single notion of version via Go module version.
3. The import path needs to include `/v2` after the repository path due to the version bump (e.g.,
`github.com/kubernetes-csi-proxy/v2/pkg/...`).
4. Each API group is now available under `/pkg/<API group>` as an interface defining the API and a struct implementing
the interface. A `New` method is exposed under that path to initialize an instance of the struct, and it always takes in a
`HostAPI` interface (previously called `API`), which is responsible for communicating with the OS, available under
`/pkg/<API group>/hostapi`. The `/pkg/<API group>/hostapi` package follows a similar pattern, exposing an interface, an
implementing struct, and a `New` method to initialize an instance of the struct. Previously, not every API group followed
this pattern.
5. Every API group method `DoFoo` now takes in a request struct `&DoFooRequest{...}` and returns a response struct
`&DoFooResponse{...}`. Previously, not every API group followed this pattern.
6. Compatibility methods to accommodate legacy API group versions are removed. Only the latest version of each API
group is supported. This will continue to be the pattern in future releases of v2.
7. Go variable/struct names containing acronyms are fully capitalized, following Go style guides. Across the board, `Id`'s
are renamed to `ID`s; `Smb` is renamed to `SMB`; `Iqn` is renamed to `IQN`; and `iscsi` is renamed to `iSCSI`.
8. Drivers importing CSI Proxy v2 must be deployed as HostProcess containers. See the above usage guide for migration
details and caveats.

/cc @mauriciopoppe

@k8s-ci-robot k8s-ci-robot added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 25, 2022
@mauriciopoppe
Copy link
Member

Thanks for bumping CSI Proxy to v2, I'll add a note in the KEP about this too.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexander-ding, mauriciopoppe

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 Oct 25, 2022
@k8s-ci-robot k8s-ci-robot merged commit 312980b into kubernetes-csi:library-development Oct 25, 2022
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants