-
Notifications
You must be signed in to change notification settings - Fork 380
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
Add extend memory in nodeResourceManager #541
Conversation
chenkaiyue
commented
Sep 1, 2022
•
edited
Loading
edited
- Add extend memory in nodeResourceManager
- Don't exit when there is no node tsp
- Collect memory info for pod and container
- Fix cadvisor can't get container info error
pkg/agent/agent.go
Outdated
if err != nil { | ||
return agent, err | ||
} | ||
tspName, _ := agent.CreateNodeResourceTsp() |
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.
why ignore the error?
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.
If we can't creat node tsp, the program should go on, there is local data after all.
@@ -212,14 +219,19 @@ func (o *NodeResourceManager) BuildNodeStatus(node *v1.Node) map[string]int64 { | |||
var nextRecommendation float64 | |||
switch resourceName { | |||
case v1.ResourceCPU: | |||
if reserveCpuPercent != nil { | |||
if *reserveCpuPercent != 0 { |
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.
nil check for reserveCpuPercent
, or the program will crash with nil error
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.
The construction process of reserveCpuPercent make reserveCpuPercent will not be nil.
🎉 Successfully Build Images. Docker RegistryOverview: https://hub.docker.com/u/gocrane
Quick Deploy - Helm helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
--set craned.image.repository=gocrane/craned \
--set craned.image.tag=pr-541-20e5bd8 \
--set metricAdapter.image.repository=gocrane/metric-adapter \
--set metricAdapter.image.tag=pr-541-20e5bd8 \
--set craneAgent.image.repository=gocrane/crane-agent \
--set craneAgent.image.tag=pr-541-20e5bd8 \
--set cranedDashboard.image.repository=gocrane/dashboard \
--set cranedDashboard.image.tag=pr-541-20e5bd8 crane/crane Coding RegistryOverview: https://finops.coding.net/public-artifacts/gocrane/crane/packages
Quick Deploy - Helm helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
--set craned.image.repository=finops-docker.pkg.coding.net/gocrane/crane/craned \
--set craned.image.tag=pr-541-20e5bd8 \
--set metricAdapter.image.repository=finops-docker.pkg.coding.net/gocrane/crane/metric-adapter \
--set metricAdapter.image.tag=pr-541-20e5bd8 \
--set craneAgent.image.repository=finops-docker.pkg.coding.net/gocrane/crane/crane-agent \
--set craneAgent.image.tag=pr-541-20e5bd8 \
--set cranedDashboard.image.repository=finops-docker.pkg.coding.net/gocrane/crane/dashboard \
--set cranedDashboard.image.tag=pr-541-20e5bd8 crane/crane Ghcr RegistryOverview: https://github.com/orgs/gocrane/packages?repo_name=crane
Quick Deploy - Helm helm repo add crane https://finops-helm.pkg.coding.net/gocrane/gocrane
helm install crane -n crane-system --create-namespace \
--set craned.image.repository=ghcr.io/gocrane/crane/craned \
--set craned.image.tag=pr-541-20e5bd8 \
--set metricAdapter.image.repository=ghcr.io/gocrane/crane/metric-adapter \
--set metricAdapter.image.tag=pr-541-20e5bd8 \
--set craneAgent.image.repository=ghcr.io/gocrane/crane/crane-agent \
--set craneAgent.image.tag=pr-541-20e5bd8 \
--set cranedDashboard.image.repository=ghcr.io/gocrane/crane/dashboard \
--set cranedDashboard.image.tag=pr-541-20e5bd8 crane/crane |
0489097
to
f662738
Compare
…and container;Fix cadvisor can't get container info err
f662738
to
20e5bd8
Compare
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