From 7c44d2b5f3ff126dd21c8f5b386aba07ce38afed Mon Sep 17 00:00:00 2001 From: Hamed Karbasi Date: Tue, 5 Dec 2023 20:55:45 +0330 Subject: [PATCH 1/5] improved readme: first draft --- README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a38d8e2..4f05346 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,84 @@ ## Introduction -At Snapp! we are using Ceph object storage to have S3 for users, this operator is here -to make working with S3 easier and more fun. +The S3 Operator is an open-source project designed to facilitate the management of S3 users and buckets in a Ceph cluster environment. It simplifies operations, making working with S3 on Ceph clusters easier and more efficient. -## Design +## Features + +- Create/Remove a s3User +- Create/Remove a bucket with retain policy +- Subuser support +- Bucket policy support +- Quota Management +- Webhook Integration +- E2E Testing +- Helm Chart and OLM support + +## Installation + +### Using Makefile + +```bash +make deploy +``` + +### Using Helm + +This is an OCI helm chart, helm started supporting OCI in version 3.8.0. To use the helm chart, edit the `values.yaml` file and set `controllerManagerConfig.configYaml` to your Ceph cluster configuration like [secret.yaml](config/manager/secret.yaml). + +```bash +helm upgrade -i s3-operator oci://ghcr.io/s3-operator/helm-charts/s3-operator +``` + +### Using OLM + +All the operator releases are bundled and pushed to the [snappcloud-hub](https://github.com/snapp-incubator/snappcloud-hub) which is a hub for the catalog sources. To install the operator in an OLM way: +1. Install [snappcloud hub catalog-source](https://github.com/snapp-incubator/snappcloud-hub/blob/main/catalog-source.yml) + +2. Provide the operator `configuration` in `s3-operator-controller-manager-config-override` +3. Apply the below subscription manifest: + + ```yaml + apiVersion: operators.coreos.com/v1alpha1 + kind: Subscription + metadata: + name: s3-operator + namespace: operators + spec: + channel: stable-v0 + installPlanApproval: Automatic + name: s3-operator + source: snappcloud-hub-catalog + sourceNamespace: openshift-marketplace + config: + resources: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: config + secret: + items: + - key: config.yaml + path: config.yaml + secretName: s3-operator-controller-manager-config-override + volumeMounts: + - mountPath: /s3-operator/config/ + name: config + ``` + +## Usage + +You can find the CRD examples in the [samples](config/samples) folder. Additionally, you can find a rich documentation about the CRD details in the [wiki](https://github.com/snapp-incubator/s3-operator/wiki) page. For the detailed discription of the design and decisions, pelease see our [design-doc](docs/DESIGN.md). ## Versioning -A new docker image will be created each time a tag starting with `v` is pushed to the main branch. - -For Helm charts, there's a relase job that will create a new -release [when a change is detected](https://helm.sh/docs/howto/chart_releaser_action/#github-actions-workflow) in -the `deploy/charts` directory. +A new docker image, bundle and helm chart will be created each time a tag starting with `v` is pushed to the main branch. ## Development @@ -43,7 +107,7 @@ the chart run: make helm ``` -The chart will be created/updated in `deploy/charts/s3-operator` path +The chart will be created/updated in `charts/s3-operator` path ### Run locally @@ -81,3 +145,11 @@ And to run the e2e tests with KUTTL performing the tests on a KIND cluster: ```shell kubectl-kuttl test ``` + +## Contributing + +Contributions to the S3 Operator are welcome. Feel free to submit an issue or PR. + +## License + +This project is licensed under the [Apache License 2.0](https://github.com/snapp-incubator/s3-operator/blob/main/LICENSE). From cf41b620c0631ae120398e3d9047d13213a01a51 Mon Sep 17 00:00:00 2001 From: Hamed Karbasi Date: Tue, 5 Dec 2023 21:09:32 +0330 Subject: [PATCH 2/5] improved readme: second draft --- README.md | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4f05346..e33ef6b 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,32 @@ ## Introduction -The S3 Operator is an open-source project designed to facilitate the management of S3 users and buckets in a Ceph cluster environment. It simplifies operations, making working with S3 on Ceph clusters easier and more efficient. +The S3 Operator, an open-source endeavor, is crafted to streamline the management of S3 users and buckets within a Ceph cluster environment. It enhances efficiency and simplifies processes, rendering S3 usage on Ceph clusters more straightforward and user-friendly. ## Features -- Create/Remove a s3User -- Create/Remove a bucket with retain policy -- Subuser support -- Bucket policy support +- S3 User Management +- Bucket Management +- Subuser Support +- Bucket policy Support - Quota Management - Webhook Integration - E2E Testing -- Helm Chart and OLM support +- Helm Chart and OLM Support ## Installation ### Using Makefile +Deploy using a simple command: + ```bash make deploy ``` ### Using Helm -This is an OCI helm chart, helm started supporting OCI in version 3.8.0. To use the helm chart, edit the `values.yaml` file and set `controllerManagerConfig.configYaml` to your Ceph cluster configuration like [secret.yaml](config/manager/secret.yaml). +Deploy using Helm (version 3.8.0 or later), which supports OCI charts. To use the helm chart, edit the `values.yaml` file and set `controllerManagerConfig.configYaml` to your Ceph cluster configuration like [secret.yaml](config/manager/secret.yaml). ```bash helm upgrade -i s3-operator oci://ghcr.io/s3-operator/helm-charts/s3-operator @@ -33,11 +35,12 @@ helm upgrade -i s3-operator oci://ghcr.io/s3-operator/helm-charts/s3-operator ### Using OLM -All the operator releases are bundled and pushed to the [snappcloud-hub](https://github.com/snapp-incubator/snappcloud-hub) which is a hub for the catalog sources. To install the operator in an OLM way: +All the operator releases are bundled and pushed to the [Snappcloud hub](https://github.com/snapp-incubator/snappcloud-hub) which is a hub for the catalog sources. Install using Operator Lifecycle Manager (OLM) by following these steps: + 1. Install [snappcloud hub catalog-source](https://github.com/snapp-incubator/snappcloud-hub/blob/main/catalog-source.yml) -2. Provide the operator `configuration` in `s3-operator-controller-manager-config-override` -3. Apply the below subscription manifest: +2. Override the `s3-operator-controller-manager-config-override` with your operator configuration. +3. Apply the subscription manifest as shown below: ```yaml apiVersion: operators.coreos.com/v1alpha1 @@ -71,23 +74,22 @@ All the operator releases are bundled and pushed to the [snappcloud-hub](https:/ name: config ``` -## Usage - -You can find the CRD examples in the [samples](config/samples) folder. Additionally, you can find a rich documentation about the CRD details in the [wiki](https://github.com/snapp-incubator/s3-operator/wiki) page. +## Usage and Documentation -For the detailed discription of the design and decisions, pelease see our [design-doc](docs/DESIGN.md). +- CRD Examples: Located in the [samples](config/samples) folder. +- Detailed Documentation: Available on the [wiki](https://github.com/snapp-incubator/s3-operator/wiki). +- Design and Decision Insights: Refer to our [design doc](docs/DESIGN.md) for an in-depth understanding. -## Versioning +## Versioning and Release A new docker image, bundle and helm chart will be created each time a tag starting with `v` is pushed to the main branch. ## Development -We follow [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder/blob/master/DESIGN.md#development) developement -principles, Specifically about testing in an environment similar to the real world and avoiding mocks as much as +We follow [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder/blob/master/DESIGN.md#development) development principles, Specifically about testing in an environment similar to the real world and avoiding mocks as much as possible. -For example, we don't mock RGW API. Instead, we use a simliar approach to +For example, we don't mock RGW API. Instead, we use a similar approach to what [go-ceph](https://github.com/ceph/go-ceph/) does. ### Building the testing image @@ -111,9 +113,9 @@ The chart will be created/updated in `charts/s3-operator` path ### Run locally -If you want to test the operator on your local environment, run the below instruction: +If you want to test the operator on your local environment, run the below instructions: -First setup the local ceph cluster: +First setup the local Ceph cluster: ```shell make setup-dev-env @@ -126,7 +128,7 @@ make run # Without webhook make run-with-webhook # With webhook ``` -At the end you can tear-down the operator and the ceph cluster: +At the end, you can tear down the operator and the Ceph cluster: ```shell make teardown-operator teardown-dev-env @@ -148,7 +150,7 @@ kubectl-kuttl test ## Contributing -Contributions to the S3 Operator are welcome. Feel free to submit an issue or PR. +Contributions are warmly welcomed. Feel free to submit issues or pull requests. ## License From 92e39d0349910c08f6dc50b79907aa6940bb2fb0 Mon Sep 17 00:00:00 2001 From: Hamed Karbasi Date: Tue, 5 Dec 2023 21:33:36 +0330 Subject: [PATCH 3/5] add badges to readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e33ef6b..a269bbf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # S3 Operator +![License](https://img.shields.io/github/license/snapp-incubator/s3-operator) +![Test](https://github.com/snapp-incubator/s3-operator/actions/workflows/checks.yaml/badge.svg?branch=main) +![Release](https://github.com/snapp-incubator/s3-operator/actions/workflows/build.yaml/badge.svg) +![Tag](https://img.shields.io/github/v/tag/snapp-incubator/s3-operator?&logo=git) + ## Introduction The S3 Operator, an open-source endeavor, is crafted to streamline the management of S3 users and buckets within a Ceph cluster environment. It enhances efficiency and simplifies processes, rendering S3 usage on Ceph clusters more straightforward and user-friendly. From c1162cc27d6429fa433660b87419a40c9c3ae2d3 Mon Sep 17 00:00:00 2001 From: Hamed Karbasi Date: Wed, 6 Dec 2023 13:09:07 +0330 Subject: [PATCH 4/5] fix badge in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a269bbf..af55bbd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![License](https://img.shields.io/github/license/snapp-incubator/s3-operator) ![Test](https://github.com/snapp-incubator/s3-operator/actions/workflows/checks.yaml/badge.svg?branch=main) -![Release](https://github.com/snapp-incubator/s3-operator/actions/workflows/build.yaml/badge.svg) +![Release](https://github.com/snapp-incubator/s3-operator/actions/workflows/build-release.yaml/badge.svg) ![Tag](https://img.shields.io/github/v/tag/snapp-incubator/s3-operator?&logo=git) ## Introduction From e8a906df8837fd6af53de1f90647f3fd91c1b8ac Mon Sep 17 00:00:00 2001 From: Hamed Karbasi Date: Wed, 6 Dec 2023 15:08:30 +0330 Subject: [PATCH 5/5] fix helm oci command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af55bbd..9e93e67 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ make deploy Deploy using Helm (version 3.8.0 or later), which supports OCI charts. To use the helm chart, edit the `values.yaml` file and set `controllerManagerConfig.configYaml` to your Ceph cluster configuration like [secret.yaml](config/manager/secret.yaml). ```bash -helm upgrade -i s3-operator oci://ghcr.io/s3-operator/helm-charts/s3-operator +helm upgrade --install s3-operator oci://ghcr.io/snapp-incubator/s3-operator/helm-charts/s3-operator --version v0.3.5 ``` ### Using OLM