Skip to content

Commit

Permalink
[Bucket API] update COSI status to implementable
Browse files Browse the repository at this point in the history
  - API review ready
  • Loading branch information
jeffvance authored and wlan0 committed Feb 3, 2021
1 parent 40cb8db commit bb562df
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
52 changes: 30 additions & 22 deletions keps/sig-storage/1979-object-storage-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# Release Signoff Checklist

- [X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
- [X] (R) KEP approvers have approved the KEP status as `implementable`
- [ ] (R) Design details are appropriately documented
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
- [ ] (R) Graduation criteria is in place
Expand Down Expand Up @@ -149,22 +149,17 @@ metadata:
finalizers:
- cosi.io/finalizer [2]
spec:
protocol:
name: [3]
version: [4]
bucketPrefix: [5]
bucketClassName: [6]
bucketInstanceName: [7]
bucketPrefix: [3]
bucketClassName: [4]
bucketInstanceName: [5]
status:
bucketAvailable: [8]
bucketAvailable: [6]
```
1. `labels`: added by COSI. Key’s value should be the provisioner name. Characters that do not adhere to [Kubernetes label conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set) will be converted to ‘-’.
1. `finalizers`: added by COSI to defer `BucketRequest` deletion until backend deletion succeeds.
1. `protocol.name`: (required) specifies the desired protocol. One of {“s3”, “gs”, or “azureBlob”}.
1. `protocol.version`: (optional) specifies the desired version of the `protocol`. For "s3", a value of "v2" or "v4" could be used.
1. `bucketPrefix`: (optional for greenfield, ignored for brownfield) prefix prepended to a generated new bucket name, eg. “yosemite-photos-". If `bucketInstanceName` is supplied then `bucketPrefix` is ignored because the request is for access to an existing bucket.
1. `bucketClassName`: (optional for greenfield, ignored for brownfield) name of the `BucketClass` used to provision this request. If omitted for a greenfield bucket request, a default bucket class matching the protocol, if available, is used. If the greenfield bucket class is missing or does not support the requested protocol, an error is logged and the request is retried (with exponential backoff). A `BucketClass` is necessary for greenfield requests since BCs support a list of allowed namespaces. A `BucketClass` is not needed for brownfield requests since the `Bucket` instance, created by the admin, also contains `allowedNamespaces`.
1. `bucketClassName`: (optional for greenfield, ignored for brownfield, required for "static" brownfield) name of the `BucketClass` used to provision this request. If omitted for a greenfield bucket request, a default bucket class matching the protocol, if available, is used. If the greenfield bucket class is missing or does not support the requested protocol, an error is logged and the request is retried (with exponential backoff). A `BucketClass` is necessary for greenfield requests since BCs support a list of allowed namespaces. A `BucketClass` is not needed for brownfield requests since the `Bucket` instance, created by the admin, also contains `allowedNamespaces`.
1. `bucketInstanceName`: (required for brownfield, omitted for greenfield) name of the cluster-wide `Bucket` instance. If blank, then COSI assumes this is a greenfield request and will fill in the name during the binding step. If set by the user, then this names the `Bucket` instance created by the admin.
1. `bucketAvailable`: if true the bucket has been provisioned. If false then the bucket has not been provisioned and is unable to be accessed.

Expand Down Expand Up @@ -245,6 +240,8 @@ A `Bucket` is not deleted if it is bound to a `BucketRequest`.

An immutable, cluster-scoped, custom resource to provide admins control over the handling of bucket provisioning. The `BucketClass` (BC) defines a retention policy, driver specific parameters, and the provisioner name. A list of allowed namespaces can be specified to restrict new bucket creation and access to existing buckets. A default bucket class can be defined for each supported protocol. This allows the bucket class to be omitted from a `BucketRequest`. Relevant `BucketClass` fields are copied to the `Bucket` instance to handle the case of the BC being deleted or re-created. If an object store supports more than one protocol then the admin should create a `BucketClass` per protocol.

A `BucketClass` is necessary for greenfield and "static" (driverless) brownfield use cases. It is not needed for dynamic brownfield since all of the information in the BC already exists in the `Bucket` instance.

NOTE: the `BucketClass` object is immutable except for the field `isDefaultBucketClass`

```yaml
Expand Down Expand Up @@ -591,6 +588,18 @@ service Provisioner {
This call is meant to retrieve the unique provisioner Identity. This identity will have to be set in `BucketRequest.Provisioner` field in order to invoke this specific provisioner.
```
message Protocol {
// ProtocolName is the name of the protocol
ProtocolName name = 1;
// version is the name of the protocol version
string version = 2;
oneof type {
S3Parameters s3 = 3;
AzureBlobParameters azureBlob = 4;
GCSParameters gcs = 5;
}
}

message ProvisionerGetInfoRequest {
// Intentionally left blank
}
Expand All @@ -614,18 +623,17 @@ This call is made to create the bucket in the backend. If a bucket that matches
```
message ProvisionerCreateBucketRequest {
// This field is REQUIRED
// Bucket name is the name of the bucket in the storage backend
string bucket_name = 1;

map<string,string> bucket_context = 2;

enum AnonymousBucketAccessMode {
PRIVATE = 0;
PUBLIC_READ_ONLY = 1;
PUBLIC_WRITE_ONLY = 2;
PUBLIC_READ_WRITE = 3;
}

// This field is OPTIONAL
// Protocol specific information required by the call is passed in as key,value pairs.
// The caller should treat the values in parameters as opaque.
// The receiver is responsible for parsing and validating the values.
map<string,string> parameters = 2;
// This field is OPTIONAL
// Allow uncredentialed access to bucket.
AnonymousBucketAccessMode anonymous_bucket_access_mode = 3;
Protocol protocol = 4;
}

message ProvisionerCreateBucketResponse {
Expand Down Expand Up @@ -719,7 +727,7 @@ message ProvisionerRevokeBucketAccessResponse {
- Implement all COSI components to support Greenfield, Green/Brown Field, Brownfield and Static Driverless provisioning
- Evaluate gaps, update KEP and conduct reviews for all design changes
- Develop unit test cases to demonstrate that the above mentioned use cases work correctly
- Document usage, administration and contributor guidelines for the entire project
# Alternatives Considered
This KEP has had a long journey and many revisions. Here we capture the main alternatives and the reasons why we decided on a different solution.
Expand Down
4 changes: 2 additions & 2 deletions keps/sig-storage/1979-object-storage-support/kep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ approvers:
- "@xing-yang"
editor: TBD
creation-date: 2019-11-25
last-updated: 2020-09-10
status: provisional
last-updated: 2021-02-02
status: implementable

0 comments on commit bb562df

Please sign in to comment.