-
Notifications
You must be signed in to change notification settings - Fork 7
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: add labels and annotations for pvc #219
refactor: add labels and annotations for pvc #219
Conversation
WalkthroughThis pull request introduces updates to the GreptimeDB Helm charts for both the cluster and operator components. The changes primarily involve version increments, image tag updates, and the addition of new configuration options for storage metadata. The modifications span multiple files across the Changes
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml (1)
3118-3125
: LGTM! Well-structured storage metadata additions.The implementation consistently adds
annotations
andlabels
fields across all storage-related sections, following Kubernetes best practices for resource metadata.Consider adding schema examples in the CRD comments to demonstrate the usage of these new fields.
Also applies to: 18474-18481, 18375-18382, 18714-18721, 18829-18836
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
charts/greptimedb-cluster/Chart.yaml
(1 hunks)charts/greptimedb-cluster/README.md
(5 hunks)charts/greptimedb-cluster/templates/cluster.yaml
(1 hunks)charts/greptimedb-cluster/values.yaml
(4 hunks)charts/greptimedb-operator/Chart.yaml
(1 hunks)charts/greptimedb-operator/README.md
(2 hunks)charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml
(6 hunks)charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml
(3 hunks)charts/greptimedb-operator/values.yaml
(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- charts/greptimedb-operator/values.yaml
- charts/greptimedb-operator/Chart.yaml
- charts/greptimedb-cluster/Chart.yaml
- charts/greptimedb-operator/README.md
🧰 Additional context used
🪛 LanguageTool
charts/greptimedb-cluster/README.md
[uncategorized] ~288-~288: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...is key prefix | | monitoring | object | {"enabled":false,"logsCollection":{"pipeline":{"data":""}},"standalone":{},"vector":{"registry":"docker.io","repository":"timberio/vector","resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}},"tag":"nightly-alpine"}}
| The monitoring bootstrap configur...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~293-~293: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...g data | | monitoring.vector | object | {"registry":"docker.io","repository":"timberio/vector","resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}},"tag":"nightly-alpine"}
| Configure vector for logs and metr...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: chart-test
🔇 Additional comments (7)
charts/greptimedb-cluster/templates/cluster.yaml (1)
368-373
: LGTM! Clean implementation of PVC metadata configuration.The implementation properly handles labels and annotations for PVC configuration, with correct indentation and conditional blocks.
charts/greptimedb-cluster/README.md (2)
133-135
: LGTM! Clear documentation of new storage metadata fields.Documentation properly describes the new PVC labels and annotations capabilities.
288-296
: Verify the resource allocation increase for vector.The monitoring vector resources have been significantly increased:
- CPU: 50m → 500m (10x increase)
- Memory: 64Mi → 256Mi (4x increase)
Please confirm if these increases are intentional and necessary.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~288-~288: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...is key prefix | | monitoring | object |{"enabled":false,"logsCollection":{"pipeline":{"data":""}},"standalone":{},"vector":{"registry":"docker.io","repository":"timberio/vector","resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}},"tag":"nightly-alpine"}}
| The monitoring bootstrap configur...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~293-~293: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...g data | | monitoring.vector | object |{"registry":"docker.io","repository":"timberio/vector","resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}},"tag":"nightly-alpine"}
| Configure vector for logs and metr...(HYPHENATED_LY_ADVERB_ADJECTIVE)
charts/greptimedb-cluster/values.yaml (2)
542-545
: LGTM! Proper default values for new storage metadata.The new storage metadata fields are properly initialized as empty objects, allowing users to optionally configure them.
906-910
: Consistent resource updates for vector monitoring.The vector resource changes match the documentation in README.md.
charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml (1)
3041-3048
: LGTM! Comprehensive schema updates for storage metadata.The CRD schema has been properly updated to include labels and annotations for all storage configurations:
- Datanode storage
- Cache storage
- RaftEngine storage
The schema definitions are consistent and include proper validation.
Also applies to: 3140-3147, 3288-3295
charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml (1)
3118-3125
: Verify schema validation for storage metadata.The schema looks correct, but let's verify the validation works as expected.
✅ Verification successful
Storage metadata schema validation is correctly implemented
The schema validation for storage metadata (annotations and labels) is properly implemented and matches the actual usage in the cluster template and values. The implementation correctly handles optional key-value string pairs with proper defaults.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if any existing CRs are using these fields and validate their structure # Search for any usage of annotations or labels in storage configurations ast-grep --pattern 'fs: $$$ annotations: $_ $$$' ast-grep --pattern 'fs: $$$ labels: $_ $$$'Length of output: 109
Script:
#!/bin/bash # Search for storage-related configurations in YAML files rg -l "kind:\s+GreptimeDBCluster" --type yaml # Check CRD schema structure rg -A 10 "properties:\s+storage:" --type yaml # Look for any example configurations or tests fd -e yaml -e yml | xargs rg "storage:|fs:"Length of output: 4016
Script:
#!/bin/bash # Get complete storage configuration from example CR rg -A 15 "^\s+storage:" charts/greptimedb-cluster/templates/cluster.yaml # Check values file storage configuration rg -A 15 "^\s+storage:" charts/greptimedb-cluster/values.yaml # Look specifically for any annotations or labels usage in storage context rg -B 5 -A 5 "annotations:|labels:" charts/greptimedb-cluster/templates/cluster.yamlLength of output: 5838
Summary by CodeRabbit
New Features
Improvements
Version Updates