Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Operator Name to Ceph S3 Operator #31

Merged
merged 9 commits into from
Jan 19, 2024
Merged

Change Operator Name to Ceph S3 Operator #31

merged 9 commits into from
Jan 19, 2024

Conversation

hoptical
Copy link
Collaborator

@hoptical hoptical commented Jan 12, 2024

This PR applies the required changes for refactoring the operator name from s3 operator to ceph s3 operator.
Additionally, transferring the operator from snapp-incubator to snapp-cab is cancelled.

Summary by CodeRabbit

  • New Features

    • Project renamed to Ceph S3 Operator, reflecting its broader scope of managing Ceph S3 resources.
  • Documentation

    • Updated all documentation, including README and design docs, to reference the new Ceph S3 Operator name.
  • Refactor

    • Renamed internal references and import paths to align with the new Ceph S3 Operator naming convention.
  • Chores

    • Adjusted build and release workflows to accommodate the project's new name.

@hoptical hoptical added the chore label Jan 12, 2024
@hoptical hoptical self-assigned this Jan 12, 2024
Copy link
Contributor

coderabbitai bot commented Jan 12, 2024

Important

Auto Review Skipped

Review was skipped due to path filters

Files ignored due to path filters (2)
  • config/manifests/bases/ceph-s3-operator.clusterserviceversion.yaml is excluded by: !**/*.yaml
  • config/manifests/bases/s3-operator.clusterserviceversion.yaml is excluded by: !**/*.yaml

Walkthrough

The project has undergone a rebranding, shifting from s3-operator to ceph-s3-operator. This comprehensive change affects the repository paths, Docker images, Helm chart templates, and internal code references. The modifications ensure consistency across the entire codebase, aligning all components with the new ceph-s3-operator naming convention.

Changes

File(s) Change Summary
.github/workflows/build-release.yaml Renamed chart name and path from s3-operator to ceph-s3-operator for the Chart
.github/workflows/checks.yaml Modified make e2e-test command to use the ceph-s3-operator image instead of the s3-operator image.
.golangci.yml Updated local-prefixes setting for the goimports linter from .../s3-operator to .../ceph-s3-operator.
Makefile Changes to image tag base, renaming from s3-operator to ceph-s3-operator, and updating references.
PROJECT Renamed project from s3-operator to ceph-s3-operator and updated repository path accordingly.
README.md Renamed project from "S3 Operator" to "Ceph S3 Operator" throughout the codebase.
api/v1alpha1/..., internal/..., main.go Updated import paths from .../s3-operator to .../ceph-s3-operator.
bundle.Dockerfile Modified the value of the LABEL operators.operatorframework.io.bundle.package.v1 from s3-operator to ceph-s3-operator.
charts/ceph-s3-operator/templates/_helpers.tpl Renamed the chart-related template definitions from "s3-operator" to "ceph-s3-operator" throughout the file.
docs/DESIGN.md Changed the title from "S3 Operator Design" to "Ceph S3 Operator Design."
testing/Dockerfile Altered the working directory and volume mount points from /opt/s3-operator to /opt/ceph-s3-operator.

🐇✨
To the land of code, a change does sweep,
s3-operator takes a leap.
Now ceph-s3-operator, it stands proud and tall,
A rabbit's cheer for the refactor's call. 🎉🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Member

@therealak12 therealak12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Just ensure the repo address will indeed change after renaming the repo name.

.golangci.yml Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6ec7f6c and a4e52cd.
Files ignored due to filter (62)
  • charts/ceph-s3-operator/Chart.yaml
  • charts/ceph-s3-operator/templates/clusterresourcequota-updater-binding-rbac.yaml
  • charts/ceph-s3-operator/templates/clusterresourcequota-updater-rbac.yaml
  • charts/ceph-s3-operator/templates/controller-manager-config.yaml
  • charts/ceph-s3-operator/templates/deployment.yaml
  • charts/ceph-s3-operator/templates/leader-election-rbac.yaml
  • charts/ceph-s3-operator/templates/manager-rbac.yaml
  • charts/ceph-s3-operator/templates/metrics-reader-rbac.yaml
  • charts/ceph-s3-operator/templates/metrics-service.yaml
  • charts/ceph-s3-operator/templates/proxy-rbac.yaml
  • charts/ceph-s3-operator/templates/resourcequota-status-updater-binding-rbac.yaml
  • charts/ceph-s3-operator/templates/resourcequota-status-updater-rbac.yaml
  • charts/ceph-s3-operator/templates/s3bucket-crd.yaml
  • charts/ceph-s3-operator/templates/s3user-crd.yaml
  • charts/ceph-s3-operator/templates/s3userclaim-crd.yaml
  • charts/ceph-s3-operator/templates/selfsigned-issuer.yaml
  • charts/ceph-s3-operator/templates/serviceaccount.yaml
  • charts/ceph-s3-operator/templates/serving-cert.yaml
  • charts/ceph-s3-operator/templates/validating-webhook-configuration.yaml
  • charts/ceph-s3-operator/templates/webhook-service.yaml
  • charts/ceph-s3-operator/values.yaml
  • charts/s3-operator/templates/clusterresourcequota-updater-binding-rbac.yaml
  • charts/s3-operator/templates/metrics-reader-rbac.yaml
  • charts/s3-operator/templates/metrics-service.yaml
  • charts/s3-operator/templates/proxy-rbac.yaml
  • charts/s3-operator/templates/resourcequota-status-updater-binding-rbac.yaml
  • charts/s3-operator/templates/selfsigned-issuer.yaml
  • charts/s3-operator/templates/serviceaccount.yaml
  • charts/s3-operator/templates/serving-cert.yaml
  • charts/s3-operator/templates/webhook-service.yaml
  • config/certmanager/certificate.yaml
  • config/default/kustomization.yaml
  • config/default/manager_auth_proxy_patch.yaml
  • config/default/webhookcainjection_patch.yaml
  • config/manager/manager.yaml
  • config/manifests/bases/s3-operator.clusterserviceversion.yaml
  • config/manifests/kustomization.yaml
  • config/prometheus/monitor.yaml
  • config/rbac/auth_proxy_client_clusterrole.yaml
  • config/rbac/auth_proxy_role.yaml
  • config/rbac/auth_proxy_role_binding.yaml
  • config/rbac/auth_proxy_service.yaml
  • config/rbac/leader_election_role.yaml
  • config/rbac/leader_election_role_binding.yaml
  • config/rbac/role_binding.yaml
  • config/rbac/s3bucket_editor_role.yaml
  • config/rbac/s3bucket_viewer_role.yaml
  • config/rbac/s3user_editor_role.yaml
  • config/rbac/s3user_viewer_role.yaml
  • config/rbac/s3userclaim_editor_role.yaml
  • config/rbac/s3userclaim_viewer_role.yaml
  • config/rbac/service_account.yaml
  • config/samples/s3_v1alpha1_s3bucket.yaml
  • config/samples/s3_v1alpha1_s3user.yaml
  • config/samples/s3_v1alpha1_s3userclaim.yaml
  • config/test/kustomization.yaml
  • config/webhook/service.yaml
  • go.mod
  • kuttl-test.yaml
  • testing/e2e/01-assert.yaml
  • testing/e2e/01-install-ceph-operator.yaml
  • testing/e2e/03-create-bucket.yaml
Files selected for processing (27)
  • .github/workflows/build-release.yaml (1 hunks)
  • .github/workflows/checks.yaml (1 hunks)
  • .golangci.yml (1 hunks)
  • Makefile (7 hunks)
  • PROJECT (4 hunks)
  • README.md (6 hunks)
  • api/v1alpha1/quota_handler.go (1 hunks)
  • api/v1alpha1/s3bucket_webhook.go (1 hunks)
  • api/v1alpha1/s3userclaim_webhook.go (1 hunks)
  • api/v1alpha1/s3userclaim_webhook_test.go (1 hunks)
  • api/v1alpha1/webhook_suite_test.go (1 hunks)
  • bundle.Dockerfile (1 hunks)
  • charts/ceph-s3-operator/templates/_helpers.tpl (4 hunks)
  • docs/DESIGN.md (1 hunks)
  • internal/controllers/s3bucket/cleaner.go (1 hunks)
  • internal/controllers/s3bucket/controller.go (1 hunks)
  • internal/controllers/s3bucket/handler.go (1 hunks)
  • internal/controllers/s3bucket/provisioner.go (1 hunks)
  • internal/controllers/s3userclaim/cleaner.go (1 hunks)
  • internal/controllers/s3userclaim/controller.go (1 hunks)
  • internal/controllers/s3userclaim/handler.go (1 hunks)
  • internal/controllers/s3userclaim/provisioner.go (1 hunks)
  • internal/controllers/s3userclaim/s3userclaim_test.go (1 hunks)
  • internal/controllers/s3userclaim/suite_test.go (1 hunks)
  • internal/s3_agent/s3_agent.go (1 hunks)
  • main.go (1 hunks)
  • testing/Dockerfile (1 hunks)
Files skipped from review due to trivial changes (3)
  • PROJECT
  • README.md
  • docs/DESIGN.md
Additional comments: 35
.golangci.yml (1)
  • 12-12: The update to the local-prefixes in the .golangci.yml file correctly reflects the new repository name. This change ensures that the goimports linter will treat paths within the project as local, which can affect the ordering of imports.
bundle.Dockerfile (1)
  • 7-7: The LABEL for the bundle package in the bundle.Dockerfile has been correctly updated to the new operator name ceph-s3-operator. This change is consistent with the renaming objective of the PR.
testing/Dockerfile (1)
  • 32-33: The changes to the working directory and volume mount points in the testing/Dockerfile correctly reflect the new operator name. This ensures that the Docker container will use the correct paths internally.
.github/workflows/checks.yaml (1)
  • 44-44: The make e2e-test command in the checks.yaml workflow file has been updated to use the ceph-s3-operator image. This change aligns with the renaming of the operator and ensures that the end-to-end tests will run with the correct image.
internal/controllers/s3bucket/controller.go (1)
  • 23-23: The import path for the s3v1alpha1 package in controller.go has been correctly updated to reflect the new repository name. This change is necessary for the Go compiler to locate the package after the renaming.
internal/controllers/s3userclaim/controller.go (1)
  • 13-14: The import paths for the s3v1alpha1 and predicates packages in controller.go have been updated correctly. This ensures that the code will reference the correct packages within the renamed repository.
charts/ceph-s3-operator/templates/_helpers.tpl (6)
  • 4-4: The template definition for the chart name in _helpers.tpl has been updated to ceph-s3-operator. This change is part of the renaming effort and will affect how Helm charts are rendered and named.

  • 13-13: The template definition for the full chart name has been updated to include ceph-s3-operator. This ensures that the full name used in Helm charts will reflect the new operator name.

  • 29-29: The template definition for the chart version label has been correctly updated to ceph-s3-operator. This label is used in Helm charts to specify the chart name and version.

  • 36-38: The common labels template now correctly includes ceph-s3-operator in the Helm chart labels. This change ensures consistency in labeling across Kubernetes resources managed by Helm.

  • 48-49: The selector labels template has been updated to use ceph-s3-operator. Selector labels are important for identifying resources related to a specific release of the Helm chart.

  • 56-58: The service account name template definition now uses ceph-s3-operator. This change ensures that the service account name used by the Helm chart will be consistent with the new operator name.

internal/controllers/s3bucket/cleaner.go (1)
  • 12-12: The import path for the consts package in cleaner.go has been updated to the new repository name. This change is necessary for the Go compiler to locate the constants package after the renaming.
.github/workflows/build-release.yaml (2)
  • 61-61: The chart name in the build-release.yaml workflow file has been updated to ceph-s3-operator. This change ensures that the GitHub Actions workflow will reference the correct Helm chart name when pushing it to the registry.

  • 64-64: The path to the Helm chart has been updated to charts/ceph-s3-operator. This change is necessary for the GitHub Actions workflow to find the Helm chart in the correct directory after the renaming.

internal/controllers/s3userclaim/cleaner.go (1)
  • 15-16: The import paths for the s3v1alpha1 and consts packages in cleaner.go have been correctly updated to reflect the new repository name. This ensures that the code will reference the correct packages within the renamed repository.
internal/controllers/s3bucket/provisioner.go (1)
  • 12-13: The import paths for the s3v1alpha1 and consts packages in provisioner.go have been updated correctly. This ensures that the code will reference the correct packages within the renamed repository.
api/v1alpha1/s3bucket_webhook.go (1)
  • 31-31: The import path for the consts package in s3bucket_webhook.go has been updated to the new repository name. This change is necessary for the Go compiler to locate the constants package after the renaming.
internal/controllers/s3userclaim/suite_test.go (1)
  • 38-39: The import paths for the s3v1alpha1 and config packages in suite_test.go have been updated from github.com/snapp-incubator/s3-operator to github.com/snapp-incubator/ceph-s3-operator. This ensures that the test suite will reference the correct packages within the renamed repository.
internal/s3_agent/s3_agent.go (1)
  • 15-15: The import path for the consts package in s3_agent.go has been updated to the new repository name. This change is necessary for the Go compiler to locate the constants package after the renaming.
api/v1alpha1/quota_handler.go (1)
  • 11-11: The import path for the consts package in quota_handler.go has been updated to the new repository name. This change is necessary for the Go compiler to locate the constants package after the renaming.
api/v1alpha1/webhook_suite_test.go (1)
  • 43-43: The import path for the config package in webhook_suite_test.go has been updated to reflect the new repository name. This ensures that the webhook test suite will reference the correct configuration package within the renamed repository.
internal/controllers/s3bucket/handler.go (1)
  • 20-23: The import paths for the s3v1alpha1, config, s3_agent, and consts packages in handler.go have been updated to reflect the new repository name. This ensures that the code will reference the correct packages within the renamed repository.
main.go (1)
  • 37-40: The import paths have been updated to reflect the new repository name. This is consistent with the PR's objective of renaming the operator. Ensure that all references to the old import paths are updated across the entire codebase to prevent any build or runtime issues.
Verification successful

Based on the results of the executed shell scripts, there were no instances found of the old import path github.com/snapp-incubator/s3-operator in the codebase. This suggests that the old import paths have been successfully updated to the new ones as intended by the PR.

Given this information, the review comment stating that the import paths have been updated to reflect the new repository name and advising to ensure that all references to the old import paths are updated across the entire codebase appears to be consistent with the changes made in the PR.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase.
rg --files-with-matches 'github.com/snapp-incubator/s3-operator'

Length of output: 64



Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase by searching for the actual lines of code.
rg 'github.com/snapp-incubator/s3-operator'

# Use ast-grep to search for import statements in the JavaScript/TypeScript code that might reference the old path.
ast-grep --lang javascript --pattern 'import $_ from "github.com/snapp-incubator/s3-operator/$$$"'

Length of output: 144

internal/controllers/s3userclaim/handler.go (1)
  • 36-37: The import paths for s3v1alpha1 and config packages have been updated correctly. This change is necessary for the code to compile and run correctly after the renaming. Ensure that all other references to these packages within the codebase are also updated.
Verification successful

The shell script executed a search for the old import path github.com/snapp-incubator/s3-operator across the codebase and did not produce any output. This suggests that the old import paths have been successfully replaced or are no longer present in the codebase.

Based on the information provided, it appears that the review comment has been addressed correctly, and the necessary changes to the import paths have been made as part of the renaming process.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase.
rg --files-with-matches 'github.com/snapp-incubator/s3-operator'

Length of output: 64

api/v1alpha1/s3userclaim_webhook.go (1)
  • 36-36: The import path for the consts package has been updated to the new repository name. This change is part of the renaming effort and should be reflected across all files that use this package.
Verification successful

Based on the results of the executed shell scripts, there is no occurrence of the old import path github.com/snapp-incubator/s3-operator or any variations of it in the codebase. This suggests that the renaming effort has been thorough and the old import paths have been successfully updated to the new repository name.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase.
rg --files-with-matches 'github.com/snapp-incubator/s3-operator'

Length of output: 64



Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase, including variations.
rg 'github.com/snapp-incubator/s3-operator'

Length of output: 43


Script:

#!/bin/bash
# Check for any variations of the old import path that might have been missed.
rg 'snapp-incubator/s3-operator'

Length of output: 32

internal/controllers/s3userclaim/s3userclaim_test.go (1)
  • 35-38: The import paths in the test file have been updated to reflect the new repository name. This is a necessary change to ensure that the tests reference the correct packages after the renaming.
Verification successful

The shell script executed a search for the old import paths github.com/snapp-incubator/s3-operator across the codebase using rg (ripgrep). The absence of output from this command suggests that the old import paths are no longer present in the codebase, which aligns with the PR's objective of renaming the operator and updating import paths.

Given this information, it appears that the changes have been successfully made and the old import paths have been replaced with the new ones, as intended by the PR. Therefore, the review comment is consistent with the changes made in the codebase.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the old import paths are not used anywhere in the codebase.
rg --files-with-matches 'github.com/snapp-incubator/s3-operator'

Length of output: 64

Makefile (4)
  • 31-32: The image tag base in the Makefile has been updated to snappcloud.io/ceph-s3-operator, which aligns with the renaming of the operator. This change will affect the image names used in CI/CD pipelines and deployments, so it's important to ensure that all related systems are updated to pull from the correct image repository.

  • 183-183: The deploy target in the Makefile uses ghcr.io/snapp-incubator/ceph-s3-operator as the image name. Ensure that this repository exists and has the correct permissions set up for pushing and pulling images.

  • 192-192: Similar to the previous comment, the deploy-for-e2e-test target uses ghcr.io/snapp-incubator/ceph-s3-operator as the image name. Verify that this repository is correctly set up.

  • 290-290: The build-testing-image target uses docker.io/spc35771/ceph-s3-operator-testing as the image name. This repository should be checked for existence and access permissions.

internal/controllers/s3userclaim/provisioner.go (2)
  • 23-24: The import paths have been updated to reflect the new repository name, which is consistent with the PR's objective of renaming the operator. Ensure that all references to the package within the codebase are updated to match the new path.

  • 20-27: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-23]

The renaming of the import path is the only change in this file, and it appears to be correctly applied throughout the file.

api/v1alpha1/s3userclaim_webhook_test.go (2)
  • 17-17: The import path for the consts package has been updated to reflect the new repository name. This change is consistent with the PR's objective of renaming the operator. Ensure that all references to the package within the codebase are updated to match the new path.

  • 14-20: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-17]

The renaming of the import path is the only change in this file, and it appears to be correctly applied throughout the file.

Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a4e52cd and eb3e82d.
Files selected for processing (1)
  • Makefile (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • Makefile

@hoptical hoptical merged commit 202dfbf into main Jan 19, 2024
3 checks passed
@hoptical hoptical deleted the transfer branch March 20, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants