18
18
- [ COSI API] ( #cosi-api )
19
19
- [ Bucket Creation] ( #bucket-creation )
20
20
- [ Generating Access Credentials for Buckets] ( #generating-access-credentials-for-buckets )
21
- - [ Attaching Buckets ] ( #attaching-buckets )
21
+ - [ Attaching Bucket Information to Pods ] ( #attaching-bucket-information-to-pods )
22
22
- [ Sharing Buckets] ( #sharing-buckets )
23
23
- [ Accessing existing Buckets] ( #accessing-existing-buckets )
24
+ - [ Bucket deletion] ( #bucket-deletion )
24
25
- [ Usability] ( #usability )
25
26
- [ Self Service] ( #self-service )
26
27
- [ Mutating Buckets] ( #mutating-buckets )
@@ -188,11 +189,12 @@ The BucketClaim is a claim to create a new Bucket. This resource can be used to
188
189
|------------------------------| |--------------------------------|
189
190
| metadata: | | deletionPolicy: delete |
190
191
| namespace: ns1 | | provisioner: s3.amazonaws.com |
191
- | spec: | | protocol: s3 |
192
- | bucketClassName: bc1 | | parameters: |
193
- | | | key: value |
194
- |------------------------------| |--------------------------------|
195
- ```
192
+ | spec: | | protocols: |
193
+ | bucketClassName: bc1 | | - s3 |
194
+ | | | parameters: |
195
+ |------------------------------| | key: value |
196
+ |--------------------------------|
197
+ ```
196
198
197
199
###### 2. COSI creates an intermediate Bucket object
198
200
@@ -206,7 +208,8 @@ More information about Bucket is [here](#bucket)
206
208
| name: bcl-$uuid |
207
209
| spec: |
208
210
| bucketClassName: bc1 |
209
- | protocol: s3 |
211
+ | protocols: |
212
+ | - s3 |
210
213
| parameters: |
211
214
| key: value |
212
215
| provisioner: s3.amazonaws.com |
@@ -228,7 +231,7 @@ More information about COSI gRPC API is [here](#cosi-grpc-api)
228
231
|------------------------------------------|
229
232
| grpc ProvisionerCreateBucket({ |
230
233
| "name": "bcl-$uuid", |
231
- | "protocol ": "s3", |
234
+ | "protocols ": [ "s3"], |
232
235
| "parameters": { |
233
236
| "key": "value" |
234
237
| } |
@@ -272,6 +275,7 @@ The KEY based mechanism is where access and secret keys are generated to be prov
272
275
| bucketAccessClassName: bac1 | | authenticationType: KEY |
273
276
| bucketClaimName: bcl1 | |----------------------------------|
274
277
| credentialsSecretName: bucketcreds1 |
278
+ | protocol: s3 |
275
279
| status: |
276
280
| conditions: |
277
281
| - name: AccessGranted |
@@ -293,6 +297,7 @@ In case of IAM style authentication, along with the `credentialsSecretName`, `se
293
297
| bucketClaimName: bcl1 | |----------------------------------|
294
298
| credentialsSecretName: bucketcreds1 |
295
299
| serviceAccountName: svacc1 |
300
+ | protocol: s3 |
296
301
| status: |
297
302
| conditions: |
298
303
| - name: AccessGranted |
@@ -345,14 +350,21 @@ The secret mentioned in the `credentialsSecretName` field of the BucketAccess sh
345
350
| spec: |
346
351
| containers: |
347
352
| - volumeMounts: |
348
- | name: cosi-bucket |
349
- | mountPath: /cosi/bucket1 |
353
+ | - name: cosi-bucket1 |
354
+ | mountPath: /cosi/bucket1 |
355
+ | - name: cosi-bucket1 |
356
+ | mountPath: /cosi/bucket1 |
350
357
| volumes: |
351
- | - name: cosi-bucket |
358
+ | - name: cosi-bucket1 |
352
359
| projected: |
353
360
| sources: |
354
361
| - secret: |
355
362
| name: bucketcreds1 |
363
+ | - name: cosi-bucket2 |
364
+ | projected: |
365
+ | sources: |
366
+ | - secret: |
367
+ | name: bucketcreds2 |
356
368
|-------------------------------------------------|
357
369
```
358
370
@@ -380,6 +392,8 @@ The volume `mountPath` will be the directory where bucket credentials and other
380
392
381
393
NOTE: the contents of the files served in mountPath will be a COSI generated file containing credentials and other information required for accessing the bucket. ** This is NOT intended to specify a mountpoint to expose the bucket as a filesystem.**
382
394
395
+ NOTE: the secret containing bucketInfo can be provided to the pod using any other secret -> pod provisioning mechanism, including environment variables. In case of environment variables, the secrets will be exposed to other processes in the same host as environment variables are not inherently secure.
396
+
383
397
###### 2. The secret containing BucketInfo is mounted in the specified directory
384
398
385
399
The above volume definition will prompt kubernetes to retrieve the secret and place it in the volumeMount path defined above. The contents of the secret will be of the format shown below:
@@ -400,7 +414,9 @@ The above volume definition will prompt kubernetes to retrieve the secret and pl
400
414
| accessKeyID: "AKIAIOSFODNN7EXAMPLE", |
401
415
| accessSecretKey: "wJalrXUtnFEMI/K...", |
402
416
| region: "us-west-1", |
403
- | protocol: "s3" |
417
+ | protocols: [ |
418
+ | "s3" |
419
+ | ] |
404
420
| } |
405
421
| } |
406
422
|-----------------------------------------------|
@@ -423,7 +439,9 @@ In case IAM style authentication was specified, then metadataURL and serviceAcco
423
439
| authenticationType: "IAM", |
424
440
| endpoint: "https://s3.amazonaws.com", |
425
441
| region: "us-west-1", |
426
- | protocol: "s3" |
442
+ | protocols: [ |
443
+ | "s3" |
444
+ | ] |
427
445
| } |
428
446
| } |
429
447
|-------------------------------------------------|
@@ -450,22 +468,36 @@ When a Bucket object is manually created, and has its `bucketID` set, then COSI
450
468
| name: bucketName123 |
451
469
| spec: |
452
470
| bucketID: bucketname123 |
453
- | protocol: s3 |
471
+ | protocols: |
472
+ | - s3 |
454
473
| parameters: |
455
474
| key: value |
456
475
| provisioner: s3.amazonaws.com |
457
476
|-------------------------------------------------|
458
477
```
459
478
460
- ###### 2. User creates BucketAccess to generate credentials for that bucket
479
+ ###### 2. User creates BucketClaim referring to the bucket
461
480
462
- Unlike the BucketAccess for COSI created bucket, this BucketAccess should directly reference the Bucket instead of a BucketClaim.
481
+ ```
482
+ BucketClaim - bucketClaim123
483
+ |------------------------------------------|
484
+ | name: bucketClaim123 |
485
+ | spec: |
486
+ | existingBucketName: bucketName123 |
487
+ | |
488
+ |------------------------------------------|
489
+
490
+ ```
491
+
492
+ ###### 3. User creates BucketAccess to generate credentials for that bucket
493
+
494
+ Similar to the BucketAccess for COSI created bucket, this BucketAccess should reference the BucketClaim that refers to this bucket.
463
495
464
496
```
465
497
BucketAccess - bac2
466
498
|-------------------------------|
467
499
| spec: |
468
- | bucketName: bucketName123 |
500
+ | bucketClaim: bucketClaim123 |
469
501
| |
470
502
|-------------------------------|
471
503
```
@@ -565,12 +597,12 @@ Bucket {
565
597
// +optional
566
598
BucketClaim corev1.ObjectReference
567
599
568
- // Protocol is the data API this bucket is expected to adhere to .
600
+ // Protocols are the set of data APIs this bucket is expected to support .
569
601
// The possible values for protocol are :
570
602
// - S3 : Indicates Amazon S3 protocol
571
603
// - Azure : Indicates Microsoft Azure BlobStore protocol
572
604
// - GCS : Indicates Google Cloud Storage protocol
573
- Protocol Protocol
605
+ Protocols [] Protocol
574
606
575
607
// Parameters is an opaque map for passing in configuration to a driver
576
608
// for creating the bucket
@@ -609,6 +641,11 @@ BucketClaim {
609
641
Spec BucketClaimSpec {
610
642
// Name of the BucketClass
611
643
BucketClassName string
644
+
645
+ // Name of a bucket object that was manually
646
+ // created to import a bucket created outside of COSI
647
+ // +optional
648
+ ExistingBucketName string
612
649
}
613
650
614
651
Status BucketClaimStatus {
@@ -634,12 +671,12 @@ BucketClass {
634
671
// Provisioner is the name of driver associated with this bucket
635
672
Provisioner string
636
673
637
- // Protocol is the data API this bucket is expected to adhere to .
674
+ // Protocols are the set of data API this bucket is expected to support .
638
675
// The possible values for protocol are :
639
676
// - S3 : Indicates Amazon S3 protocol
640
677
// - Azure : Indicates Microsoft Azure BlobStore protocol
641
678
// - GCS : Indicates Google Cloud Storage protocol
642
- Protocol Protocol
679
+ Protocols [] Protocol
643
680
644
681
// DeletionPolicy is used to specify how COSI should handle deletion of this
645
682
// bucket. There are 3 possible values :
@@ -670,11 +707,13 @@ BucketAccess {
670
707
// +optional
671
708
BucketClaimName string
672
709
673
- // BucketName is the name of the Bucket for which
674
- // credentials need to be generated
675
- // Exactly one of BucketClaimName or BucketName must be set.
676
- // +optional
677
- BucketName string
710
+ // Protcol is the name of the Protocol
711
+ // that this access credential is supposed to support
712
+ // If left empty, it will choose the protocol supported
713
+ // by the bucket. If the bucket supports multiple protocols,
714
+ // the end protocol is determined by the driver.
715
+ // +optional
716
+ Protocol Protocol
678
717
679
718
// BucketAccessClassName is the name of the BucketAccessClass
680
719
BucketAccessClassName string
@@ -746,12 +785,12 @@ BucketInfo {
746
785
// Region is the vendor-defined region where the bucket "resides"
747
786
Region string
748
787
749
- // Protocol is the data API this bucket is expected to adhere to .
788
+ // Protocols are the set of data APIs this bucket is expected to support .
750
789
// The possible values for protocol are :
751
790
// - S3 : Indicates Amazon S3 protocol
752
791
// - Azure : Indicates Microsoft Azure BlobStore protocol
753
792
// - GCS : Indicates Google Cloud Storage protocol
754
- Protocol Protocol
793
+ Protocols [] Protocol
755
794
}
756
795
}
757
796
```
0 commit comments