-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cosi v1alpha2 changes #4599
base: master
Are you sure you want to change the base?
Cosi v1alpha2 changes #4599
Conversation
d22d1bd
to
511d6cc
Compare
511d6cc
to
5aa494b
Compare
5aa494b
to
52275b7
Compare
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BlaineEXE 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 |
The mechanism by which the Controller waits for the intermediate Bucket to be provisioned in the | ||
middle of BucketClaim reconciliation is not specified here. The important behavior (waiting) is | ||
defined, and the logic coordinating the init-wait-finish reconcile process is left as an | ||
implementation detail. |
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.
It's probably better to define high-level behavior expectations here, rather than pigeonhole ourselves into a specific implementation solution.
f55b3d3
to
11d78f4
Compare
9098c29
to
14b42fa
Compare
|
||
COSI is out-of-tree, so version skew strategy is N/A | ||
|
||
## Alternatives Considered |
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.
This section contains sections that describe design details that we have discarded, including many changes between v1alpha1 and v1alpha2. I have taken care to try to make this a good effective overview and discussion of any complex points.
14b42fa
to
8c2312f
Compare
// Protocols is a list of protocols that the provisioned Bucket must support. COSI will verify | ||
// that each item in this list is advertised as supported by the OSP driver. | ||
Protocols []Protocol |
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.
I listened to @saad-ali 's response in the last sig-storage meeting to whether this is needed. One of the important things I heard was that the intent is that drivers can "advertise" what they support.
Reading more into Saad's reply, I can see how this field might be important for portability in some ways. Importantly, if I were to copy a BucketClaim spec to a new/different K8s cluster with different COSI driver, the presence of Protocols
here should help me feel certain that COSI will return an error if the ported copy is incompatible with the new k8s cluster.
Something that wasn't present in the v1alpha1 spec (or implementation) was a way for drivers to "advertise" anything. Drivers were expected to error out if they couldn't support all protocols, but I don't consider this "advertising" things. And certainly, any driver could decide to ignore the list when provisioning if they wanted to.
Thus, for the v1alpha2 spec, I added a gRPC return value for DriverGetInfo for drivers to advertise their supported protocols. I also added the note here that we expect COSI itself (I think the Sidecar) to validate that what the user is requesting in Parameters is advertised as supported by the driver.
If my analysis and understanding of Saad's feedback is correct, I think this is good to keep (along with the ability for to drivers advertise support).
As an alternative to the input check, we originally planned v1alpha2 to only have the BucketClaim.status.supportedProtocols
list, which would inform users what protocols the Bucket supports, but only after the BucketClaim/Bucket are done being provisioned. It wouldn't guarantee an error in ported BucketClaim provisioning if the 'new' cluster didn't support the same protocols.
This alternative would easier to implement because it's less complex. However, it wouldn't allow them to state their intentions before provisioning happens.
CC: @xing-yang @shanduur
8c2312f
to
e4f1a94
Compare
|
||
COSI Sidecar should not have Bucket delete permissions. | ||
|
||
#### Generating Bucket Access Credentials |
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.
Because we are trying to keep the Sidecar responsibilities (and RBAC) as small as possible (following the design of Volume Snapshotter), we needed significant changes to how BucketAccesses are provisioned.
TL;DR: the controller gets info from BucketAccessClass and BucketClaim and copies it to the BucketAccess.status, after which the sidecar can do its thing. Sidecar no longer does Class/Claim inspection.
// Protocol is the name of the Protocol that this access credential is expected to support. | ||
// +required | ||
Protocol Protocol |
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.
If Protocols
is important for BucketClaims/Buckets it stands to reason (to me) that Protocol
is important for BucketAccess also.
e4f1a94
to
da319fe
Compare
### Important changes between versions | ||
|
||
NOTE: | ||
- The secret will not be created until the credentials are generated/service account mappings are complete. | ||
- Within a namespace, one BucketAccess and secret pair is generally sufficient, but cases which may want to control this more granularly can use multiple. | ||
- The secret will be created with a finalizer that prevents it from being deleted until the associated bucketAccess is deleted. | ||
v1alpha1 to v1alpha2: |
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.
This section has a quick overview of important changes from v1alph1 to v1alpha2.
da319fe
to
e17381a
Compare
Update the COSI KEP's base design to v1alpha2. The primary purpose of this work is to reshape the doc and spec to fix inconsistencies and vestigial items, and fix the most glaring issues in the v1alpha1 spec. COSI maintainers are planning follow-up items to add larger individual features after this. Notably, bucketInfo.json has been changed to individual secret fields with COSI_<KEY>: <VALUE> format, as the JSON blob was flagged as a problem by several v1alpha1 users. Signed-off-by: Blaine Gardner <[email protected]>
e17381a
to
586add2
Compare
Update the COSI KEP's base design to v1alpha2. The primary purpose of
this work is to reshape the doc and spec to fix inconsistencies and
vestigial items, and fix the most glaring issues in the v1alpha1 spec.
COSI maintainers are planning follow-up items to add larger individual
features after this.
Notably, bucketInfo.json has been changed to individual secret fields
with COSI_: format, as the JSON blob was flagged as a
problem by several v1alpha1 users.