From ba5c8d877c2707ab0433b6923951b10cd6d27229 Mon Sep 17 00:00:00 2001 From: Anurag Mittal Date: Wed, 18 Dec 2024 09:31:44 +0100 Subject: [PATCH] COSI-75: add-brownfield-custom-resources --- cosi-examples/brownfield/bucket.yaml | 16 ++++++++++++++++ cosi-examples/brownfield/bucketaccess.yaml | 10 ++++++++++ cosi-examples/brownfield/bucketaccessclass.yaml | 10 ++++++++++ cosi-examples/brownfield/bucketclaim.yaml | 10 ++++++++++ cosi-examples/brownfield/bucketclass.yaml | 10 ++++++++++ 5 files changed, 56 insertions(+) create mode 100644 cosi-examples/brownfield/bucket.yaml create mode 100644 cosi-examples/brownfield/bucketaccess.yaml create mode 100644 cosi-examples/brownfield/bucketaccessclass.yaml create mode 100644 cosi-examples/brownfield/bucketclaim.yaml create mode 100644 cosi-examples/brownfield/bucketclass.yaml diff --git a/cosi-examples/brownfield/bucket.yaml b/cosi-examples/brownfield/bucket.yaml new file mode 100644 index 00000000..76969896 --- /dev/null +++ b/cosi-examples/brownfield/bucket.yaml @@ -0,0 +1,16 @@ +apiVersion: objectstorage.k8s.io/v1alpha1 +kind: Bucket +metadata: + name: brownfield-bucket # should be same as bucket name + namespace: scality-object-storage +spec: + bucketClaim: {} + bucketClassName: brownfield-bucket-class + driverName: cosi.scality.com + deletionPolicy: Retain + existingBucketID: brownfield-bucket # name of pre-existing bucket in S3 + parameters: + objectStorageSecretName: s3-secret-for-cosi + objectStorageSecretNamespace: default + protocols: + - S3 diff --git a/cosi-examples/brownfield/bucketaccess.yaml b/cosi-examples/brownfield/bucketaccess.yaml new file mode 100644 index 00000000..e0d7796c --- /dev/null +++ b/cosi-examples/brownfield/bucketaccess.yaml @@ -0,0 +1,10 @@ +apiVersion: objectstorage.k8s.io/v1alpha1 +kind: BucketAccess +metadata: + name: brownfield-bucket-access + namespace: scality-object-storage +spec: + bucketAccessClassName: brownfield-bucket-access-class + bucketClaimName: brownfield-bucket-claim + credentialsSecretName: brownfield-bucket-secret + protocol: s3 diff --git a/cosi-examples/brownfield/bucketaccessclass.yaml b/cosi-examples/brownfield/bucketaccessclass.yaml new file mode 100644 index 00000000..05137647 --- /dev/null +++ b/cosi-examples/brownfield/bucketaccessclass.yaml @@ -0,0 +1,10 @@ +kind: BucketAccessClass +apiVersion: objectstorage.k8s.io/v1alpha1 +metadata: + name: brownfield-bucket-access-class + namespace: scality-object-storage +driverName: cosi.scality.com +authenticationType: KEY +parameters: + objectStorageSecretName: s3-secret-for-cosi + objectStorageSecretNamespace: default diff --git a/cosi-examples/brownfield/bucketclaim.yaml b/cosi-examples/brownfield/bucketclaim.yaml new file mode 100644 index 00000000..0461b864 --- /dev/null +++ b/cosi-examples/brownfield/bucketclaim.yaml @@ -0,0 +1,10 @@ +apiVersion: objectstorage.k8s.io/v1alpha1 +kind: BucketClaim +metadata: + name: brownfield-bucket-claim + namespace: scality-object-storage +spec: + bucketClassName: brownfield-bucket-class + existingBucketName: brownfield-bucket + protocols: + - S3 diff --git a/cosi-examples/brownfield/bucketclass.yaml b/cosi-examples/brownfield/bucketclass.yaml new file mode 100644 index 00000000..622863eb --- /dev/null +++ b/cosi-examples/brownfield/bucketclass.yaml @@ -0,0 +1,10 @@ +apiVersion: objectstorage.k8s.io/v1alpha1 +kind: BucketClass +metadata: + name: brownfield-bucket-class + namespace: scality-object-storage +driverName: cosi.scality.com +deletionPolicy: Delete +parameters: + objectStorageSecretName: s3-secret-for-cosi + objectStorageSecretNamespace: default