[platform] decrease resources for system applications - #1054
Conversation
Signed-off-by: kklinch0 <kklinch0@gmail.com>
WalkthroughThis update adjusts resource requests and limits for several components across the monitoring, seaweedfs, dashboard, fluxcd-operator, and kubeovn packages. It lowers default minimum CPU and memory for VerticalPodAutoscaler templates, adds explicit resource constraints in various values.yaml files, and increments chart versions and version mappings accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HelmChart
participant Kubernetes
participant VPA
User->>HelmChart: Deploy/upgrade chart (monitoring/seaweedfs/others)
HelmChart->>Kubernetes: Apply manifests (with updated resource requests/limits)
Kubernetes->>VPA: Enforce new min CPU/memory defaults
VPA-->>Kubernetes: Manage pod resources within new constraints
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
packages/system/kubeovn/values.yaml (1)
19-60: Ensure consistent unit formatting and review limits
Multipleresourcesblocks were added forovn-central,ovs-ovn,kube-ovn-controller,kube-ovn-cni,kube-ovn-pinger, andkube-ovn-monitor.
- CPU values mix plain numbers (e.g.,
"3","2") and millicores (e.g.,"1000m","200m"); standardize on millicores (e.g.,"3000m") for clarity.- Memory limits use
"1000Mi"instead of"1Gi"in some blocks—prefer Gi suffix for consistency.- Validate that these resource levels meet performance requirements for each component.
packages/extra/seaweedfs/templates/vpa.yaml (1)
16-17: Reduce duplication with Helm templating
TheminAllowedCPU/memory settings are repeated acrossfiler,master, andvolumeVPA resources. Consider extracting these values intovalues.yamlor a common Helm helper to DRY the templates and simplify future updates.Also applies to: 39-40, 62-63
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
packages/extra/monitoring/Chart.yaml(1 hunks)packages/extra/monitoring/templates/vpa.yaml(3 hunks)packages/extra/seaweedfs/Chart.yaml(1 hunks)packages/extra/seaweedfs/templates/vpa.yaml(3 hunks)packages/extra/versions_map(1 hunks)packages/system/dashboard/values.yaml(1 hunks)packages/system/fluxcd-operator/values.yaml(1 hunks)packages/system/kubeovn/values.yaml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
packages/extra/monitoring/templates/vpa.yaml
[warning] 21-21: wrong indentation: expected 8 but found 10
(indentation)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build
🔇 Additional comments (5)
packages/system/dashboard/values.yaml (1)
29-30: Review resource request reduction for Redis master
The CPU request has been lowered from 200m to 20m and memory from 256Mi to 32Mi, which drastically reduces the footprint. However, there is no CPU limit specified underlimits; consider adding an explicit CPU limit to avoid potential CPU spikes.packages/system/fluxcd-operator/values.yaml (1)
8-14: Resource constraints added for flux-operator are valid
The newresourcesblock defines sensible defaults (limits: 1000m CPU, 1Gi memory; requests: 10m CPU, 64Mi memory). Configuration looks correct and aligns with patterns in other packages.packages/extra/monitoring/Chart.yaml (1)
6-6: Verify chart version bump is synced in versions_map
The chart version was bumped to1.10.1. Ensure the corresponding entry inpackages/extra/versions_maphas been updated to match this change.packages/extra/seaweedfs/Chart.yaml (1)
19-19: Version bump consistency check
Chart version incremented to0.4.1aligns with the VPA template and versions_map updates.packages/extra/versions_map (1)
48-49:Details
❓ Verification inconclusive
Verify seaweedfs version mapping
Ensureseaweedfs 0.4.0maps to commit632224a3and that the new0.4.1HEAD reference is correct for the release.Run the following script to confirm the commit exists in the upstream SeaweedFS repo:
🏁 Script executed:
#!/bin/bash # Verify commit for seaweedfs v0.4.0 commit=$(awk '/seaweedfs 0.4.0/{print $3}' packages/extra/versions_map) git ls-remote https://github.com/chrislusf/seaweedfs.git | grep "$commit"Length of output: 157
This will surface the exact commit SHAs for both releases so we can confirm whether
632224a3andHEADare correct.
🏁 Script executed:
#!/bin/bash # Verify remote tag commits for seaweedfs echo "Inspecting commit for seaweedfs v0.4.0 tag:" git ls-remote --tags https://github.com/chrislusf/seaweedfs.git refs/tags/v0.4.0 echo echo "Inspecting commit for seaweedfs v0.4.1 tag:" git ls-remote --tags https://github.com/chrislusf/seaweedfs.git refs/tags/v0.4.1Length of output: 367
🏁 Script executed:
#!/bin/bash # List all v0.4.x tags in the SeaweedFS repo git ls-remote --tags https://github.com/chrislusf/seaweedfs.git | grep -E 'refs/tags/v0\.4\.[0-9]+'Length of output: 101
Verify seaweedfs version mapping
I rangit ls-remote --tagsagainst the upstream repo and didn’t find any tags for v0.4.0 or v0.4.1. Please manually verify that:
- commit
632224a3is the correct SHA for the v0.4.0 releaseHEADindeed references the correct commit for the v0.4.1 release
| cpu: 25m | ||
| memory: 64Mi |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix indentation for fallback minAllowed blocks
The cpu and memory lines in all three fallback minAllowed sections are under-indented by two spaces. Incorrect indentation will break the YAML manifest.
Apply this patch:
--- a/packages/extra/monitoring/templates/vpa.yaml
+++ b/packages/extra/monitoring/templates/vpa.yaml
@@ -21,7 +21,7 @@
{{- else }}
- cpu: 25m
- memory: 64Mi
+ cpu: 25m
+ memory: 64Mi
{{- end }}
@@ -50,7 +50,7 @@
{{- else }}
- cpu: 25m
- memory: 64Mi
+ cpu: 25m
+ memory: 64Mi
{{- end }}
@@ -79,7 +79,7 @@
{{- else }}
- cpu: 25m
- memory: 64Mi
+ cpu: 25m
+ memory: 64Mi
{{- end }}Also applies to: 50-51, 79-80
🧰 Tools
🪛 YAMLlint (1.37.1)
[warning] 21-21: wrong indentation: expected 8 but found 10
(indentation)
🤖 Prompt for AI Agents
In packages/extra/monitoring/templates/vpa.yaml at lines 21-22, 50-51, and
79-80, the cpu and memory fields under the fallback minAllowed blocks are
under-indented by two spaces. Fix this by increasing the indentation of these
lines to align properly under their respective minAllowed keys, ensuring the
YAML structure is valid and the manifest will not break.
| monitoring 1.10.0 632224a3 | ||
| monitoring 1.10.1 HEAD |
There was a problem hiding this comment.
💡 Verification agent
❓ Verification inconclusive
Verify monitoring version mapping
Ensure monitoring 1.10.0 maps to commit 632224a3 and that the new 1.10.1 HEAD reference corresponds to the intended release.
Run the following script to confirm the commit exists in the upstream monitoring repo:
🏁 Script executed:
#!/bin/bash
# Verify commit for monitoring v1.10.0
commit=$(awk '/monitoring 1.10.0/{print $3}' packages/extra/versions_map)
git ls-remote https://github.com/prometheus-operator/prometheus-operator.git | grep "$commit"Length of output: 179
Update monitoring version mapping
The SHA 632224a3 for monitoring 1.10.0 does not exist in the upstream Prometheus Operator repository. Please fetch the correct commit for the v1.10.0 tag and update the entry in packages/extra/versions_map. Also confirm that the 1.10.1 HEAD reference points to the intended release by retrieving the current default-branch HEAD.
You can verify with:
# Retrieve the v1.10.0 commit SHA
git ls-remote https://github.com/prometheus-operator/prometheus-operator.git refs/tags/v1.10.0
# Retrieve the current HEAD SHA for 1.10.1
git ls-remote https://github.com/prometheus-operator/prometheus-operator.git HEADFile: packages/extra/versions_map (lines 42–43)
-monitoring 1.10.0 632224a3
+monitoring 1.10.0 <correct-commit-SHA>
monitoring 1.10.1 HEAD🤖 Prompt for AI Agents
In packages/extra/versions_map at lines 42 to 43, the commit SHA 632224a3 for
monitoring 1.10.0 is incorrect and does not exist in the upstream Prometheus
Operator repository. Fetch the correct commit SHA for the v1.10.0 tag using git
ls-remote on the upstream repo and update the mapping accordingly. Also verify
the HEAD commit for 1.10.1 by retrieving the current default branch HEAD SHA
from the upstream repo and update the entry to ensure it points to the intended
release.
|
Successfully created backport PR for |
Summary by CodeRabbit
New Features
Improvements
Chores