From e53684d06fca10d64d790754c69bc8d30eabd5cb Mon Sep 17 00:00:00 2001 From: Anurag Mittal Date: Fri, 13 Sep 2024 09:43:12 +0200 Subject: [PATCH] Added CRDs for bucket creation flow Issue: S3C-9222 --- cosi-examples/bucketclaim.yaml | 8 ++++++++ cosi-examples/bucketclass.yaml | 9 +++++++++ cosi-examples/s3-secret-for-cosi.yaml | 11 +++++++++++ 3 files changed, 28 insertions(+) create mode 100644 cosi-examples/bucketclaim.yaml create mode 100644 cosi-examples/bucketclass.yaml create mode 100644 cosi-examples/s3-secret-for-cosi.yaml diff --git a/cosi-examples/bucketclaim.yaml b/cosi-examples/bucketclaim.yaml new file mode 100644 index 0000000..8d76b11 --- /dev/null +++ b/cosi-examples/bucketclaim.yaml @@ -0,0 +1,8 @@ +kind: BucketClaim +apiVersion: objectstorage.k8s.io/v1alpha1 +metadata: + name: bucket-claim-1 +spec: + bucketClassName: bucket-1-name-prefix + protocols: + - s3 diff --git a/cosi-examples/bucketclass.yaml b/cosi-examples/bucketclass.yaml new file mode 100644 index 0000000..5bcb915 --- /dev/null +++ b/cosi-examples/bucketclass.yaml @@ -0,0 +1,9 @@ +kind: BucketClass +apiVersion: objectstorage.k8s.io/v1alpha1 +metadata: + name: bucket-1-name-prefix # name of the bucket +driverName: cosi.scality.com +deletionPolicy: Delete +parameters: + COSI_OBJECT_STORAGE_PROVIDER_SECRET_NAME: s3-secret-for-cosi + COSI_OBJECT_STORAGE_PROVIDER_SECRET_NAMESPACE: default diff --git a/cosi-examples/s3-secret-for-cosi.yaml b/cosi-examples/s3-secret-for-cosi.yaml new file mode 100644 index 0000000..b8f042b --- /dev/null +++ b/cosi-examples/s3-secret-for-cosi.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: s3-secret-for-cosi + namespace: default +type: Opaque +stringData: + COSI_S3_ACCESS_KEY_ID: accessKey1 # Plain text access key + COSI_S3_ACCESS_SECRET_KEY: verySecretKey1 # Plain text secret key + COSI_S3_ENDPOINT: http://localhost:8000 # Plain text endpoint + COSI_S3_REGION: us-west-1 # Plain text region \ No newline at end of file