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

ci: release bundle.yaml and crds.yaml #182

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

zyy17
Copy link
Collaborator

@zyy17 zyy17 commented Sep 18, 2024

Summary by CodeRabbit

  • New Features
    • Enhanced release process to include additional configuration files (bundle.yaml and crds.yaml).
  • Bug Fixes
    • Updated deployment namespace from greptimedb-operator-system to greptimedb-admin across multiple resources, ensuring consistency.
  • Documentation
    • Revised documentation to reflect the new deployment namespace and updated commands for checking pod status.

Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

The changes involve updates to multiple files related to the deployment of the greptimedb operator. Key modifications include renaming output files in the Makefile for Kubernetes manifests, updating the namespace from greptimedb-operator-system to greptimedb-admin across several configuration and manifest files, and enhancing the release workflow to include additional files. These adjustments aim to standardize naming conventions and improve the organization of resources within the Kubernetes environment.

Changes

File(s) Change Summary
.github/workflows/release.yaml Added bundle.yaml and crds.yaml to the release publishing step.
Makefile Renamed output files: greptimedb-operator-crd.yaml to crds.yaml and greptimedb-operator-deployment.yaml to bundle.yaml.
README.md Updated deployment namespace from greptimedb-operator-system to greptimedb-admin.
config/default/kustomization.yaml Changed namespace from greptimedb-operator-system to greptimedb-admin and replaced bases: with resources:.
manifests/bundle.yaml Updated namespace from greptimedb-operator-system to greptimedb-admin across various resources.
tests/e2e/setup/create-cluster.sh Modified the namespace in the kubectl rollout status command from greptimedb-operator-system to greptimedb-admin.

Poem

🐰 In a world of code where rabbits play,
We hop and change, come what may!
From system to admin, we leap with glee,
Bundles and CRDs, as bright as can be!
With every release, our joy takes flight,
Hopping through YAML, oh what a sight! 🌟


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between acf65ed and a02e0e1.

Files selected for processing (6)
  • .github/workflows/release.yaml (2 hunks)
  • Makefile (1 hunks)
  • README.md (1 hunks)
  • config/default/kustomization.yaml (2 hunks)
  • manifests/bundle.yaml (4 hunks)
  • tests/e2e/setup/create-cluster.sh (1 hunks)
Files skipped from review due to trivial changes (2)
  • README.md
  • manifests/bundle.yaml
Additional comments not posted (7)
config/default/kustomization.yaml (2)

16-16: Verify the namespace change.

The namespace has been changed from greptimedb-operator-system to greptimedb-admin. Please ensure that:

  • The new namespace aligns with the intended operational context and deployment environment.
  • All relevant resources, configurations, and references have been updated to reflect the new namespace.

Run the following script to verify the namespace usage across the codebase:

Verification successful

Namespace change verified and consistently applied.

The namespace change from greptimedb-operator-system to greptimedb-admin has been successfully implemented across the codebase. Specifically:

  • The old namespace greptimedb-operator-system is no longer present in any YAML files.
  • The new namespace greptimedb-admin is correctly set in config/default/kustomization.yaml.
  • The new namespace is also consistently used in manifests/bundle.yaml, indicating that related configurations have been updated.

This thorough implementation suggests that the namespace change aligns with the intended operational context and has been properly propagated to all relevant resources and configurations.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new namespace `greptimedb-admin` across the codebase.

# Test 1: Search for the old namespace. Expect: No occurrences of the old namespace.
rg --type-add yaml:*.{yaml,yml} --type yaml $'greptimedb-operator-system'

# Test 2: Search for the new namespace. Expect: Only occurrences of the new namespace.
rg --type-add yaml:*.{yaml,yml} --type yaml $'greptimedb-admin'

Length of output: 277


Script:

#!/bin/bash
# Description: Verify the usage of the new namespace `greptimedb-admin` across the codebase using find and grep.

# Test 1: Search for the old namespace. Expect: No occurrences of the old namespace.
echo "Searching for old namespace 'greptimedb-operator-system':"
find . -type f \( -name "*.yaml" -o -name "*.yml" \) -exec grep -H "greptimedb-operator-system" {} +

# Test 2: Search for the new namespace. Expect: Only occurrences of the new namespace.
echo "Searching for new namespace 'greptimedb-admin':"
find . -type f \( -name "*.yaml" -o -name "*.yml" \) -exec grep -H "greptimedb-admin" {} +

Length of output: 878


29-29: Verify the resource reference change.

The bases section has been replaced with resources. Please ensure that:

  • The new resource references under the resources section are valid and correctly point to the intended resources.
  • The resource management approach aligns with the desired deployment strategy and operational requirements.

Run the following script to verify the existence of the referenced resources:

Verification successful

This script will help us verify the existence of the referenced resources and provide more information about their contents. We'll use this information to determine if the resource references are valid and align with the desired deployment strategy.


Resource references are valid and align with the directory structure.

The change from bases to resources in the main kustomization.yaml file is consistent with the existing directory structure and resource organization. Our verification shows:

  • The 'crd', 'rbac', and 'manager' directories exist under the 'config' folder.
  • Each directory contains appropriate YAML files for their respective purposes (CRDs, RBAC configurations, and manager deployment).
  • The presence of kustomization.yaml files in each directory supports the use of 'resources' for referencing in the main configuration.

This structure aligns with current Kustomize best practices and suggests that the resource management approach is appropriate for the desired deployment strategy.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the referenced resources.

# Test: Check if the referenced resource directories exist.
fd --type d --full-path $'^(../crd|../rbac|../manager)$'

Length of output: 57


Script:

#!/bin/bash
# Description: Search for 'crd', 'rbac', and 'manager' directories from the repository root

# Find directories named 'crd', 'rbac', or 'manager'
echo "Searching for resource directories:"
fd --type d --glob '{crd,rbac,manager}'

# If directories are found, list their contents
echo -e "\nListing contents of found directories (if any):"
fd --type d --glob '{crd,rbac,manager}' --exec sh -c 'echo "Contents of {}:"; ls -1 {} 2>/dev/null || echo "Empty or inaccessible"'

# Search for YAML files in these directories
echo -e "\nSearching for YAML files in resource directories:"
fd --type f --glob '{crd,rbac,manager}/**/*.{yaml,yml}'

Length of output: 952

.github/workflows/release.yaml (2)

107-108: LGTM!

The addition of bundle.yaml and crds.yaml to the release preparation step is a valid change. It ensures that these files are available in the root directory for inclusion in the release artifacts.


117-118: LGTM!

The inclusion of bundle.yaml and crds.yaml in the list of files to be published in the release is a valid change. It ensures that these files are available in the release artifacts for users to consume.

tests/e2e/setup/create-cluster.sh (1)

268-268: Verify the greptimedb-operator deployment in the greptimedb-admin namespace.

The namespace change aligns with the PR objective and looks good. Please ensure that the greptimedb-operator deployment exists in the greptimedb-admin namespace.

Run the following script to verify the deployment:

Verification successful

Namespace change to greptimedb-admin is verified and consistent

The change from greptimedb-operator-system to greptimedb-admin namespace for the greptimedb-operator deployment has been verified:

  • The deployment configuration in manifests/bundle.yaml confirms the use of the greptimedb-admin namespace.
  • The README.md file has been updated with instructions and examples using the new namespace.
  • This change is consistent across multiple files in the repository.

The namespace update in tests/e2e/setup/create-cluster.sh is correct and aligns with the overall changes in the project.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `greptimedb-operator` deployment exists in the `greptimedb-admin` namespace.

# Test: Check if the deployment exists. Expect: The deployment is found.
kubectl get deployment greptimedb-operator -n greptimedb-admin

Length of output: 139


Script:

#!/bin/bash
# Search for YAML files that might define the greptimedb-operator deployment
echo "Searching for YAML files related to greptimedb-operator deployment:"
fd -e yaml -e yml | xargs grep -l "greptimedb-operator" | xargs grep -l "greptimedb-admin"

echo "\nSearching for shell scripts mentioning greptimedb-operator and greptimedb-admin:"
fd -e sh | xargs grep -l "greptimedb-operator" | xargs grep -l "greptimedb-admin"

echo "\nSearching for any files mentioning both greptimedb-operator and greptimedb-admin:"
rg -l "greptimedb-operator" | xargs rg -l "greptimedb-admin"

Length of output: 846


Script:

#!/bin/bash
echo "Checking manifests/bundle.yaml for greptimedb-operator deployment configuration:"
grep -A 10 -B 2 "kind: Deployment" manifests/bundle.yaml | grep -E "name:.*greptimedb-operator|namespace:"

echo "\nChecking README.md for information about the namespace change:"
grep -A 3 -B 3 "greptimedb-admin" README.md

Length of output: 818

Makefile (2)

79-79: LGTM!

The change in the output filename for the CRD generation from greptimedb-operator-crd.yaml to crds.yaml aligns with the goal of using a more generic and standardized naming convention. It improves the clarity and consistency of the generated file names without impacting the functionality.


80-80: LGTM!

The change in the output filename for the deployment generation from greptimedb-operator-deployment.yaml to bundle.yaml aligns with the goal of using a more generic and standardized naming convention. It improves the clarity and consistency of the generated file names without impacting the functionality.


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>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@daviderli614 daviderli614 left a comment

Choose a reason for hiding this comment

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

LGTM

@daviderli614 daviderli614 merged commit 814234c into GreptimeTeam:develop Sep 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants