-
Notifications
You must be signed in to change notification settings - Fork 65
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
bugfix/monitoring add nil checker #587
bugfix/monitoring add nil checker #587
Conversation
WalkthroughThis pull request focuses on updating the monitoring package version from 1.6.1 to 1.6.2. The changes involve modifying the Changes
Possibly related PRs
Suggested labels
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)
packages/extra/monitoring/templates/vm/vmcluster.yaml (1)
Line range hint
13-53
: Consider reducing duplication in resource configuration blocks.The resource configuration blocks for vminsert, vmselect, and vmstorage follow identical patterns. Consider extracting this into a named template to reduce duplication and improve maintainability.
Example refactor:
{{- define "monitoring.componentResources" }} {{- if and (hasKey . "component") (hasKey .component "resources") }} {{- toYaml .component.resources | nindent 6 }} {{- else }} limits: memory: {{ .defaultMemoryLimit }} requests: cpu: 100m memory: 500Mi {{- end }} {{- end }}Usage:
vminsert: replicaCount: 2 resources: {{- include "monitoring.componentResources" (dict "component" .vminsert "defaultMemoryLimit" "1000Mi") | nindent 4 }}🧰 Tools
🪛 yamllint (1.35.1)
[warning] 15-15: wrong indentation: expected 4 but found 6
(indentation)
[warning] 16-16: wrong indentation: expected 4 but found 6
(indentation)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/extra/monitoring/Chart.yaml
(1 hunks)packages/extra/monitoring/templates/vm/vmcluster.yaml
(2 hunks)packages/extra/versions_map
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/extra/monitoring/Chart.yaml
🧰 Additional context used
🪛 yamllint (1.35.1)
packages/extra/monitoring/templates/vm/vmcluster.yaml
[warning] 15-15: wrong indentation: expected 4 but found 6
(indentation)
[warning] 16-16: wrong indentation: expected 4 but found 6
(indentation)
🔇 Additional comments (4)
packages/extra/versions_map (1)
25-26
: LGTM! Version mappings are properly updated.The version mappings follow the established pattern and maintain chronological order:
- Version 1.6.1 is correctly mapped to commit 3bb9759
- Version 1.6.2 is appropriately marked as HEAD
packages/extra/monitoring/templates/vm/vmcluster.yaml (3)
13-14
: LGTM! Robust nil checking for vminsert resources.The double
hasKey
check properly validates both the vminsert component and its resources exist before attempting to use them.
25-26
: LGTM! Robust nil checking for vmselect resources.The double
hasKey
check properly validates both the vmselect component and its resources exist before attempting to use them.
51-52
: LGTM! Robust nil checking for vmstorage resources.The double
hasKey
check properly validates both the vmstorage component and its resources exist before attempting to use them.
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.
LGTM
Summary by CodeRabbit