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

refactor(greptimedb-standalone): Refactor the object storage configuration to make it simplify #178

Merged

Conversation

daviderli614
Copy link
Member

@daviderli614 daviderli614 commented Oct 25, 2024

Keep the keyID、secretkey information of the object storage secret, move other configurations to _helpers.tpl file, and configure it to GreptimeDB in the form of a toml file.
Add google cloud storage configurations.
Wait me to test...

Summary by CodeRabbit

  • New Features

    • Updated Helm charts for both greptimedb-cluster and greptimedb-standalone to version 0.2.23 and 0.1.25, respectively.
    • Introduced support for Google Cloud Storage (GCS) in the object storage configurations for both clusters.
    • Added new configuration options for debugging, monitoring, and logging in greptimedb-cluster.
    • Enhanced object storage configuration options in greptimedb-standalone, including new placeholders for GCS settings.
  • Bug Fixes

    • Enhanced secret management for object storage credentials in greptimedb-standalone.
  • Documentation

    • Updated README files to reflect new version numbers and configuration changes.

Copy link
Contributor

coderabbitai bot commented Oct 25, 2024

Warning

Rate limit exceeded

@daviderli614 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 24 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 0e5b1d0 and 3efb940.

Walkthrough

This pull request includes updates to the Helm charts for both greptimedb-cluster and greptimedb-standalone. The Chart.yaml files for both charts have their version numbers incremented. The README.md files reflect these version changes as well. The values.yaml file for greptimedb-cluster introduces new configuration options for object storage, including support for various cloud providers. The greptimedb-standalone chart adds similar support for Google Cloud Storage, along with enhancements to secret management and configuration templates.

Changes

File Change Summary
charts/greptimedb-cluster/Chart.yaml Version updated from 0.2.22 to 0.2.23.
charts/greptimedb-cluster/README.md Version updated from 0.2.22 to 0.2.23.
charts/greptimedb-cluster/values.yaml New section for objectStorage added; fields for credentials, s3, oss, and gcs included; Scope renamed to scope; debugPod image tag updated; new monitoring.logsCollection section; prometheusMonitor modified with enabled flag and interval.
charts/greptimedb-standalone/Chart.yaml Version updated from 0.1.24 to 0.1.25.
charts/greptimedb-standalone/README.md Version updated from 0.1.24 to 0.1.25; objectStorage updated to include gcs.
charts/greptimedb-standalone/templates/_helpers.tpl New template function greptimedb-standalone.objectStorageConfig added for object storage configuration.
charts/greptimedb-standalone/templates/configmap.yaml Added line to include output from greptimedb-standalone.objectStorageConfig if .Values.configToml is defined.
charts/greptimedb-standalone/templates/secret.yaml New conditional block for creating a Kubernetes Secret based on existingSecretName; new key GREPTIMEDB_STANDALONE__STORAGE__CREDENTIAL added for GCS.
charts/greptimedb-standalone/templates/statefulset.yaml Conditional logic added for secretRef under envFrom to use existing secret name.
charts/greptimedb-standalone/values.yaml New gcs configuration option added under objectStorage.

Possibly related PRs

Suggested reviewers

  • zyy17

Poem

🐰 In the meadow, changes bloom,
Version numbers rise, dispel the gloom.
With GCS now in the fray,
New storage paths lead the way.
Hop along, let’s celebrate,
Helm charts fresh, it’s time to create! 🌼


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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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
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.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (11)
charts/greptimedb-standalone/templates/configmap.yaml (2)

Line range hint 1-1: Document configuration precedence in values.yaml.

Since the configuration is composed from two sources (.Values.configToml and the object storage helper), it would be helpful to document:

  1. The order of configuration application
  2. Which settings take precedence in case of conflicts
  3. Example configurations showing the interaction between user-provided and generated configs

Also applies to: 11-12


11-12: Consider adding TOML validation.

To prevent runtime issues, consider adding validation to ensure the combined configuration produces valid TOML syntax.

Would you like me to provide an implementation for TOML validation in the template?

charts/greptimedb-standalone/templates/secret.yaml (2)

17-18: Fix indentation in the GCS block.

The indentation of the GCS block is inconsistent with other provider blocks.

Apply this diff to fix the indentation:

  {{ else if .Values.objectStorage.gcs }}
-  GREPTIMEDB_STANDALONE__STORAGE__CREDENTIAL: {{ .Values.objectStorage.credentials.serviceAccountKey }}
+    GREPTIMEDB_STANDALONE__STORAGE__CREDENTIAL: {{ .Values.objectStorage.credentials.serviceAccountKey }}

Line range hint 1-22: Add template documentation for better maintainability.

Consider adding a comment block at the beginning of the template to explain:

  • The purpose of this secret
  • The relationship with object storage configuration
  • The conditions under which it gets created

Add this documentation at the start of the file:

{{/*
This template creates a Kubernetes Secret for object storage credentials when:
1. Object storage is enabled (.Values.objectStorage)
2. Credentials are provided (.Values.objectStorage.credentials)
3. No existing secret is specified (.Values.objectStorage.credentials.existingSecretName)

The secret contains provider-specific credentials for S3, OSS, or GCS,
while other storage configuration is managed through _helpers.tpl.
*/}}
charts/greptimedb-standalone/templates/_helpers.tpl (1)

64-84: Consider adding provider-specific validation templates.

To improve maintainability and validation, consider extracting provider-specific logic into separate template functions.

Create separate templates for each provider:

{{- define "greptimedb-standalone.s3Config" -}}
{{- $config := .Values.objectStorage.s3 }}
{{- if and $config.bucket $config.endpoint $config.region }}
type = "S3"
bucket = "{{ $config.bucket }}"
endpoint = "{{ $config.endpoint }}"
region = "{{ $config.region }}"
{{- if $config.root }}
root = "{{ $config.root }}"
{{- end }}
{{- end }}
{{- end }}

Then update the main template to use these provider-specific templates:

{{- define "greptimedb-standalone.objectStorageConfig" -}}
[storage]
{{- if .Values.objectStorage.s3 }}
{{ include "greptimedb-standalone.s3Config" . | indent 2 }}
{{- else if .Values.objectStorage.oss }}
{{ include "greptimedb-standalone.ossConfig" . | indent 2 }}
{{- else if .Values.objectStorage.gcs }}
{{ include "greptimedb-standalone.gcsConfig" . | indent 2 }}
{{- end }}
{{- end }}

This approach:

  1. Makes it easier to maintain provider-specific logic
  2. Allows for better validation per provider
  3. Improves code reusability
charts/greptimedb-standalone/README.md (1)

75-75: Documentation needs enhancement for GCS support

While the configuration now includes GCS support, the documentation should be enhanced to:

  1. Document GCS-specific configuration parameters
  2. Provide an example of GCS configuration similar to the existing AWS S3 example
  3. Include migration notes for users updating from previous versions

Here's a suggested addition to include after the AWS S3 example:

+ **Use Google Cloud Storage as backend storage**
+ ```console
+ helm upgrade --install greptimedb-standalone greptime/greptimedb-standalone \
+   --set objectStorage.credentials.keyID="your-gcs-key-id" \
+   --set objectStorage.credentials.secretKey="your-gcs-secret-key" \
+   --set objectStorage.gcs.bucket="your-bucket-name" \
+   --set objectStorage.gcs.scope="your-gcs-scope" \
+   --set objectStorage.gcs.endpoint="gcs-endpoint" \
+   --set objectStorage.gcs.root="root-directory-of-data" \
+   -n default
+ ```
charts/greptimedb-standalone/values.yaml (3)

45-54: Enhance documentation for credential configuration.

The credential configuration looks good, but let's improve the documentation for better clarity:

  1. For GCP credentials, specify that the service account key should be the entire JSON key file content, not just the private key.
  2. For the existing secret, document the expected key names within the secret.

Consider updating the comments like this:

-    # GCP cloudProvider serviceAccountKey JSON-formatted base64 value
+    # GCP cloudProvider serviceAccountKey: The entire service account JSON key file content in base64 format
+    # Generate it using: cat service-account.json | base64 -w 0

-    # Set the existing secret to get the key's of cloudProvider
+    # Name of existing secret containing cloud provider credentials
+    # Expected keys in secret:
+    # - For AWS/AliCloud: 'accessKeyId' and 'secretAccessKey'
+    # - For GCP: 'serviceAccountKey'

73-81: Enhance GCS configuration with examples and validation.

The GCS configuration structure is good, but consider these improvements:

  1. Add example values to demonstrate proper configuration
  2. Document which fields are required vs optional
  3. Include common scope values for different use cases

Consider updating the GCS configuration like this:

   # configure to use gcs storage
   gcs: {}
-  #  bucket: "bucket-name"
-  #  scope: "" # example: "https://www.googleapis.com/auth/devstorage.read_write"
+  #  # Required: GCS bucket name
+  #  bucket: "my-greptimedb-bucket"
+  #
+  #  # Required: OAuth 2.0 scope for GCS access
+  #  # Common values:
+  #  # - https://www.googleapis.com/auth/devstorage.read_write (Full access)
+  #  # - https://www.googleapis.com/auth/devstorage.read_only (Read-only access)
+  #  scope: "https://www.googleapis.com/auth/devstorage.read_write"

   #  # The data directory in gcs will be: 'gcs://<bucket>/<root>/data/...'.
-  #  root: "mycluster"
+  #  # Optional: Root path prefix (default: greptimedb-standalone)
+  #  root: "greptimedb-standalone"
+  #
+  #  # Optional: GCS endpoint (default: https://storage.googleapis.com)
+  #  # Only change this if using a custom endpoint
   #  endpoint: "https://storage.googleapis.com"

Line range hint 45-81: Consider documenting migration steps for existing users.

The refactoring of object storage configuration is well-structured and improves maintainability. However, since this changes how credentials are managed, existing users might need guidance on migrating their configurations.

Consider adding migration documentation that covers:

  1. How to move existing credentials to the new structure
  2. Steps to create and use external secrets
  3. Backward compatibility considerations
  4. Examples of migrating from the old to new configuration format

Would you like me to help draft the migration guide?

charts/greptimedb-cluster/values.yaml (2)

605-613: LGTM! Well-structured credentials configuration.

The credentials configuration properly handles sensitive information through Kubernetes secrets and provides flexibility with existingSecretName.

Consider adding comments to clarify:

  • The format of the serviceAccountKey (JSON key file content in base64)
  • The required IAM permissions for each cloud provider

Line range hint 605-638: Consider enhancing monitoring configuration documentation.

The monitoring configuration includes good defaults, but could benefit from:

  1. Example pipeline configuration for logs collection
  2. Documentation on how to tune Vector resource limits for different scales
  3. Guidelines for adjusting the Prometheus scraping interval based on cluster size

Add a comment block above the logsCollection section with an example pipeline configuration:

# Example pipeline configuration:
# logsCollection:
#   pipeline:
#     data: |
#       [sources.log_files]
#       type = "file"
#       include = ["/data/greptimedb/logs/*.log"]
#       
#       [transforms.parse_logs]
#       type = "remap"
#       inputs = ["log_files"]
#       
#       [sinks.greptimedb]
#       type = "greptimedb"
#       inputs = ["parse_logs"]
#       endpoint = "http://localhost:4000"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7676596 and 0da47f2.

📒 Files selected for processing (10)
  • charts/greptimedb-cluster/Chart.yaml (1 hunks)
  • charts/greptimedb-cluster/README.md (1 hunks)
  • charts/greptimedb-cluster/values.yaml (2 hunks)
  • charts/greptimedb-standalone/Chart.yaml (1 hunks)
  • charts/greptimedb-standalone/README.md (2 hunks)
  • charts/greptimedb-standalone/templates/_helpers.tpl (1 hunks)
  • charts/greptimedb-standalone/templates/configmap.yaml (1 hunks)
  • charts/greptimedb-standalone/templates/secret.yaml (2 hunks)
  • charts/greptimedb-standalone/templates/statefulset.yaml (1 hunks)
  • charts/greptimedb-standalone/values.yaml (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • charts/greptimedb-cluster/Chart.yaml
  • charts/greptimedb-cluster/README.md
  • charts/greptimedb-standalone/Chart.yaml
🔇 Additional comments (5)
charts/greptimedb-standalone/templates/configmap.yaml (1)

12-12: Verify object storage configuration template output.

The object storage configuration is appended after the user-provided config. Please ensure:

  1. The helper template generates valid TOML syntax
  2. There are no conflicting sections between user config and generated config
✅ Verification successful

Object storage configuration template is valid and safe to use

The helper template greptimedb-standalone.objectStorageConfig is well-designed and generates valid TOML syntax:

  1. It only generates the [storage] section when object storage is configured (s3/oss/gcs)
  2. The template handles all required fields (type, bucket, root) and provider-specific fields (endpoint, region, scope)
  3. The values.yaml shows no conflicting storage sections with user-provided config
  4. The indentation (4 spaces) matches the ConfigMap structure

The template safely handles object storage configuration without risk of duplicate or conflicting sections.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the helper template implementation and verify TOML structure

# Look for the helper template definition
rg -A 10 "objectStorageConfig" charts/greptimedb-standalone/templates/_helpers.tpl

# Check for potential duplicate sections in values.yaml
rg "^\[.*storage.*\]" charts/greptimedb-standalone/values.yaml

Length of output: 1029


Script:

#!/bin/bash
# Let's check the complete helper template definition and values.yaml for storage configuration

# Get the complete helper template
cat charts/greptimedb-standalone/templates/_helpers.tpl

# Check the values.yaml for any storage configuration
cat charts/greptimedb-standalone/values.yaml

# Check if there are any example values or documentation
fd -g "*values*.yaml" -x cat {}

Length of output: 37678

charts/greptimedb-standalone/templates/secret.yaml (1)

3-3: LGTM: Good addition of existing secret support!

The new conditional check for existingSecretName follows Helm best practices by allowing users to either create a new secret or use an existing one.

charts/greptimedb-standalone/templates/_helpers.tpl (1)

64-84: Verify the impact on existing deployments.

The refactoring of object storage configuration might affect existing deployments.

Let's verify the usage and potential impact:

✅ Verification successful

Let's gather more specific information about the object storage configuration format and its usage.


Let's check how this template is being used in the deployment configuration.


Let's check one final thing - the configuration map setup where this template might be used.


The object storage configuration changes are safe for existing deployments

This is a new feature addition that:

  1. Adds a new helper template objectStorageConfig that generates storage configuration
  2. Only gets included in the ConfigMap when configToml is enabled
  3. Uses values from the existing objectStorage structure in values.yaml
  4. Maintains backward compatibility as it's purely additive and optional

The changes don't modify any existing behavior and will only take effect when explicitly configured through values. The implementation properly handles all three storage providers (S3, OSS, GCS) while maintaining the same configuration structure.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for existing object storage configurations in values files
echo "Checking for object storage configurations in values files:"
rg -l 'objectStorage:' charts/

# Check for potential uses of the old configuration format
echo "Checking for potential uses of old configuration format:"
rg -l 'storage:' charts/

Length of output: 939


Script:

#!/bin/bash
# Check the values.yaml for object storage configuration structure
echo "=== Checking values.yaml for object storage configuration ==="
cat charts/greptimedb-standalone/values.yaml | grep -A 20 "objectStorage:"

# Check if there are any existing deployments using the old format
echo -e "\n=== Checking for existing object storage configuration patterns ==="
rg "type\s*=\s*[\"'](?:S3|Oss|Gcs)[\"']" charts/ -A 5

# Check the changes in this PR
echo -e "\n=== Checking git diff for object storage changes ==="
git diff HEAD^1 -- charts/greptimedb-standalone/templates/_helpers.tpl

Length of output: 3061


Script:

#!/bin/bash
# Check where the new template is being used
echo "=== Checking usage of objectStorageConfig template ==="
rg "template.*greptimedb-standalone\.objectStorageConfig" charts/

# Check the statefulset configuration
echo -e "\n=== Checking StatefulSet configuration ==="
cat charts/greptimedb-standalone/templates/statefulset.yaml

# Check if there are any existing deployments using different storage configuration
echo -e "\n=== Checking for other storage configurations ==="
rg "\[storage\]" charts/ -B 2 -A 5

Length of output: 7005


Script:

#!/bin/bash
# Check for configmap template
echo "=== Checking ConfigMap template ==="
cat charts/greptimedb-standalone/templates/configmap.yaml 2>/dev/null || echo "ConfigMap template not found"

# Check for any other files that might use this configuration
echo -e "\n=== Checking for other files that might reference the config ==="
rg "greptimedb-standalone\.objectStorageConfig" charts/ --type yaml --type toml

Length of output: 852

charts/greptimedb-standalone/README.md (1)

5-5: LGTM: Version bump aligns with changes

The version increment from 0.1.24 to 0.1.25 appropriately reflects the backward-compatible changes being made to the object storage configuration.

charts/greptimedb-cluster/values.yaml (1)

638-638: Verify the stability of the debug pod image tag.

The image tag 20240905-67eaa147 appears to be a development build. Consider:

  • Using a stable release tag for production environments
  • Documenting the process for updating this tag

Let's verify if this is the latest stable tag:

charts/greptimedb-standalone/templates/secret.yaml Outdated Show resolved Hide resolved
charts/greptimedb-standalone/templates/_helpers.tpl 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.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
charts/greptimedb-standalone/values.yaml (2)

1-1: Remove unnecessary empty line at the start of the file.

The static analysis tool indicates there are too many blank lines at the start of the file.

-
 image:
🧰 Tools
🪛 GitHub Check: chart-test

[failure] 1-1:
1:1 [empty-lines] too many blank lines (1 > 0)


45-59: Enhance credential configuration documentation.

While the configuration options are clear, it would be helpful to add:

  1. The expected format of the secret when using existingSecretName
  2. Example of how to create the secret for each cloud provider

Consider adding comments like:

# Example secret format for AWS:
# apiVersion: v1
# kind: Secret
# metadata:
#   name: object-storage-creds
# type: Opaque
# data:
#   accessKeyId: <base64-encoded-value>
#   secretAccessKey: <base64-encoded-value>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0da47f2 and 4348ab3.

📒 Files selected for processing (2)
  • charts/greptimedb-standalone/templates/secret.yaml (1 hunks)
  • charts/greptimedb-standalone/values.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/greptimedb-standalone/templates/secret.yaml
🧰 Additional context used
🪛 GitHub Check: chart-test
charts/greptimedb-standalone/values.yaml

[failure] 1-1:
1:1 [empty-lines] too many blank lines (1 > 0)

charts/greptimedb-standalone/values.yaml Show resolved Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
charts/greptimedb-standalone/templates/_helpers.tpl (1)

64-65: Add GoTemplate documentation for the new function.

Consider adding documentation comments explaining the purpose, parameters, and usage of this template function, following the style of other functions in this file.

+{{/*
+Generate object storage configuration in TOML format.
+
+This template function generates storage configuration based on the provided values
+for S3, OSS, or GCS storage providers. It outputs a TOML-formatted configuration
+block that can be used in GreptimeDB's configuration.
+*/}}
 {{- define "greptimedb-standalone.objectStorageConfig" -}}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4348ab3 and 0e5b1d0.

📒 Files selected for processing (1)
  • charts/greptimedb-standalone/templates/_helpers.tpl (1 hunks)
🔇 Additional comments (1)
charts/greptimedb-standalone/templates/_helpers.tpl (1)

64-109: Verify template usage and backward compatibility.

Since this is a refactored configuration template, we should verify its integration and compatibility.

✅ Verification successful

Let me gather more information about the configuration usage and changes.


Let me check for any historical changes to understand if this is a breaking change.


Template refactoring maintains backward compatibility

The changes to the object storage configuration template are safe and maintain backward compatibility:

  • The template is only used in configmap.yaml for generating the storage configuration
  • The refactoring improves readability by using variables while preserving the same configuration structure
  • All storage providers (S3, OSS, GCS) and their parameters remain unchanged
  • The values.yaml shows consistent evolution of the configuration schema
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the new template and potential breaking changes

# Test 1: Find all files that use this template
echo "Files using the object storage template:"
rg "greptimedb-standalone\.objectStorageConfig" charts/

# Test 2: Check for any existing storage configurations that might be affected
echo -e "\nExisting storage configurations:"
rg -A 5 "\[storage\]" charts/

Length of output: 957


Script:

#!/bin/bash
# Check the configmap.yaml file to understand how the template is used
echo "Content of configmap.yaml:"
cat charts/greptimedb-standalone/templates/configmap.yaml

# Check values.yaml for default configurations
echo -e "\nDefault values in values.yaml:"
cat charts/greptimedb-standalone/values.yaml | grep -A 20 "objectStorage:"

Length of output: 1352


Script:

#!/bin/bash
# Check git history for the helper template and values
echo "History of _helpers.tpl:"
git log -p charts/greptimedb-standalone/templates/_helpers.tpl | grep -A 10 "objectStorageConfig"

echo -e "\nHistory of values.yaml:"
git log -p charts/greptimedb-standalone/values.yaml | grep -A 10 "objectStorage:"

Length of output: 3683

charts/greptimedb-standalone/templates/_helpers.tpl Outdated Show resolved Hide resolved
@daviderli614 daviderli614 requested a review from zyy17 October 25, 2024 09:49
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