Skip to content

Commit e2c34d4

Browse files
committed
[BUCKET API] clarify BC copy to B, add protocol version to BC
1 parent ab7f4e1 commit e2c34d4

File tree

1 file changed

+13
-10
lines changed
  • keps/sig-storage/1979-object-storage-support

1 file changed

+13
-10
lines changed

keps/sig-storage/1979-object-storage-support/README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ status:
170170

171171
#### Bucket
172172

173-
A cluster-scoped custom resource representing the abstraction of a single backend bucket. A `Bucket` instance stores enough identifying information so that drivers can accurately target the backend object store (e.g. needed during a deletion process). The relevant bucket class fields are copied to the `Bucket`. Additionally, data returned by the driver is copied to the `Bucket` by the sidecar.
173+
A cluster-scoped custom resource representing the abstraction of a single backend bucket. A `Bucket` instance stores enough identifying information so that drivers can accurately target the backend object store (e.g. needed during a deletion process). The relevant bucket class fields are copied to the `Bucket`. This is done so that the `Bucket` instance reflects the `BucketClass` at the time of `Bucket` creation. This is needed to handle cases where the BC is either deleted or re-created. Additionally, data returned by the driver is copied to the `Bucket` by the sidecar.
174174

175175
For greenfield, COSI creates the `Bucket` based on values in the `BucketRequest` and `BucketClass`. For brownfield, an admin manually creates the `Bucket`, filling in BucketClass fields, such as `allowedNamespaces`. COSI populates fields returned by the provisioner, and binds the `Bucket` to the `BucketAccess`.
176176

@@ -242,7 +242,7 @@ A `Bucket` is not deleted if it is bound to a `BucketRequest`.
242242

243243
#### BucketClass
244244

245-
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`. All of the `BucketClass` fields are copied to the `Bucket` instance. If an object store supports more than one protocol then the admin should create a `BucketClass` per protocol.
245+
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.
246246

247247
```yaml
248248
apiVersion: cosi.io/v1alpha1
@@ -251,17 +251,20 @@ metadata:
251251
name:
252252
provisioner: [1]
253253
isDefaultBucketClass: [2]
254-
protocol: {"azureblob", "gs", "s3", ... } [3]
255-
anonymousAccessMode: [4]
256-
retentionPolicy: {"Delete", "Retain"} [5]
257-
allowedNamespaces: [6]
254+
protocol:
255+
name: [3]
256+
version: [4]
257+
anonymousAccessMode: [5]
258+
retentionPolicy: {"Delete", "Retain"} [6]
259+
allowedNamespaces: [7]
258260
- name:
259-
parameters: [7]
261+
parameters: [8]
260262
```
261263

262264
1. `provisioner`: (required) the name of the vendor-specific driver supporting the `protocol`.
263-
1. `isDefaultBucketClass`: (optional) boolean, default is false. If set to true then a `BucketRequest` may omit the `BucketClass` reference. If the greenfield `BucketRequest` skips the `BucketClass` and a default `BucketClass`'s protocol matches the `BucketRequest`'s protocol then the default bucket class is used; otherwise an error is logged. It is possible that more than one `BucketClass` of the same protocol is set as the default class. In this case, it is non-deterministic which `BucketClass` is used as the default.
264-
1. `protocol`: (required) protocol supported by the associated object store. This field validates that the `BucketRequest`'s desired protocol is supported.
265+
1. `isDefaultBucketClass`: (optional) boolean, default is false. If set to true then a `BucketRequest` may omit the `BucketClass` reference. If a greenfield `BucketRequest` omits the `BucketClass` and a default `BucketClass`'s protocol matches the `BucketRequest`'s protocol then the default bucket class is used; otherwise an error is logged. It is not possible for more than one default `BucketClass` of the same protocol to exist due to an admission controller which enforces the default rule.
266+
1. `protocol.name`: (required) specifies the desired protocol. One of {“s3”, “gs”, or “azureBlob”}.
267+
1. `protocol.version`: (optional) specifies the desired version of the `protocol`. For "s3", a value of "v2" or "v4" could be used.
265268
1. `anonymousAccessMode`: (optional) a string specifying *uncredentialed* access to the backend bucket. This is applicable for cases where the backend storage is intended to be publicly readable and/or writable. One of:
266269
- "private": Default, disallow uncredentialed access to the backend storage.
267270
- "publicReadOnly": Read only, uncredentialed users can call ListBucket and GetObject.
@@ -341,7 +344,7 @@ metadata:
341344
1. `bucketInstanceName`: name of the `Bucket` instance bound to this BA.
342345
1. `bucketAccessRequest`: an `objectReference` containing the name, namespace and UID of the associated `BucketAccessRequest`.
343346
1. `serviceAccount`: an `ObjectReference` containing the name, namespace and UID of the associated `BAR.serviceAccountName`. If empty then integrated Kubernetes -> cloud identity is not being used, in which case, `BucketAccess.principal` contains the user identity, which is minted by the provisioner.
344-
1. `mintedSecretName`: name of the provisioner-generated Secret containing access credentials. This Secret exists in the provisioner’s namespace and is copied to the app namespace by the COSI controller.
347+
1. `mintedSecretName`: name of the provisioner-generated Secret containing access credentials. This Secret exists in the provisioner’s namespace, is read by the cosi-node-adapter, and written to the secret mount defined in the app pod's csi-driver spec.
345348
1. `policyActionsConfigMapData`: encoded data, known to the driver, and defined by the admin when creating a `BucketAccessClass`. Contains a set of provisioner/platform defined policy actions to a given user identity. Contents of the ConfigMap that the *policyActionsConfigMap* field in the `BucketAccessClass` refers to. A sample value of this field could look like:
346349
```
347350
{“Effect”:“Allow”,“Action”:“s3:PutObject”,“Resource”:“arn:aws:s3:::profilepics/*“},

0 commit comments

Comments
 (0)