-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(greptimedb-standalone): add extra volume mount #187
Conversation
WalkthroughThe pull request introduces updates to 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
🧹 Outside diff range and nitpick comments (4)
charts/greptimedb-standalone/README.md (1)
60-61
: Documentation needs enhancement for the new volume mount featuresWhile the new configuration options are documented, the entries would benefit from additional details to help users, especially for the TLS certificate mounting use case mentioned in the PR objectives.
Consider adding:
- Description of the expected structure for volume configurations
- Example configuration for mounting TLS certificates
- Reference to Kubernetes documentation
Example enhancement:
-| extraVolumeMounts | list | `[]` | Volume mounts to add to the pods | -| extraVolumes | list | `[]` | Volumes to add to the pods | +| extraVolumeMounts | list | `[]` | Additional volume mounts to add to the pods. Follows the Kubernetes [VolumeMount spec](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1). Example for TLS cert mounting: +```yaml +extraVolumeMounts: + - name: tls-cert + mountPath: /etc/greptimedb/tls + readOnly: true +``` | +| extraVolumes | list | `[]` | Additional volumes to add to the pods. Follows the Kubernetes [Volume spec](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes). Example for TLS cert volume: +```yaml +extraVolumes: + - name: tls-cert + secret: + secretName: greptimedb-tls +``` |charts/greptimedb-standalone/values.yaml (1)
130-134
: LGTM! Consider enhancing the documentation with examples.The implementation follows Helm chart best practices by allowing flexible configuration through arrays. This change effectively supports the PR objective of mounting TLS certificates.
Consider enhancing the comments with examples and security considerations:
-# -- Volume mounts to add to the pods +# -- Volume mounts to add to the pods +# Example for TLS certificate: +# extraVolumeMounts: +# - name: tls-cert +# mountPath: /etc/greptimedb/tls +# readOnly: true extraVolumeMounts: [] -# -- Volumes to add to the pods +# -- Volumes to add to the pods +# Example for TLS certificate: +# extraVolumes: +# - name: tls-cert +# secret: +# secretName: greptimedb-tls +# Note: Ensure proper RBAC and security contexts when mounting sensitive data extraVolumes: []charts/greptimedb-standalone/templates/statefulset.yaml (2)
126-135
: Document security implications of extraVolumes.The implementation looks good, but since this feature allows mounting arbitrary volumes, it's recommended to document security implications and best practices in the README.
Consider adding a section in the README about:
- Recommended volume types
- Security considerations for mounting sensitive data
- Example configurations for common use cases like TLS certificates
126-126
: Consider adding validation for volume types.The condition
if or .Values.configToml .Values.extraVolumes
allows the volumes section to be created when only extraVolumes are defined, which is correct. However, consider adding validation to ensure only allowed volume types can be mounted.You could:
- Add a helper template to validate volume types
- Document supported volume types in values schema
- Add examples in values.yaml for common volume types like:
- secrets
- configMaps
- persistentVolumeClaims
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
charts/greptimedb-standalone/Chart.yaml
(1 hunks)charts/greptimedb-standalone/README.md
(2 hunks)charts/greptimedb-standalone/templates/statefulset.yaml
(1 hunks)charts/greptimedb-standalone/values.yaml
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- charts/greptimedb-standalone/Chart.yaml
🔇 Additional comments (2)
charts/greptimedb-standalone/README.md (1)
5-5
: LGTM: Version bump is appropriate
The version increment from 0.1.27 to 0.1.28 aligns with semantic versioning for feature additions.
charts/greptimedb-standalone/templates/statefulset.yaml (1)
119-121
: LGTM! Implementation follows Helm best practices.
The extra volume mounts implementation is clean and consistent with Kubernetes StatefulSet specifications. The indentation is correct, and the template syntax is proper.
Let's verify the YAML indentation in the values file:
✅ Verification successful
Extra volume mounts configuration is properly structured
The extraVolumeMounts
field is correctly defined in values.yaml as an empty array ([]
), which is the proper default value for an optional volume mounts array. This matches the template implementation and follows Kubernetes volume mount specifications.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the extraVolumeMounts structure in values.yaml
# Expect: Array of volumeMount objects with proper indentation
rg -A 5 "extraVolumeMounts:" charts/greptimedb-standalone/values.yaml
Length of output: 187
I want to mount tls certificate into the pod.
Summary by CodeRabbit
New Features
greptimedb-standalone
Helm chart to 0.1.28.extraVolumeMounts
andextraVolumes
to enhance deployment flexibility.Documentation
Bug Fixes