-
Notifications
You must be signed in to change notification settings - Fork 386
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(analytics): Analytics refactor #307
Conversation
♻️ PR Preview 3449055 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
🎉 Successfully Build Images. Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages
|
|
||
分析和推荐提供了一套自动化的成本优化能力,它帮助用户自动的发现问题并提供优化的方案。就像电脑/手机助手一样,它会定期的扫描、分析你的集群并给出推荐建议。目前,我们提供了两种优化能力: | ||
|
||
- **资源推荐**: 基于应用的历史资源使用推荐 Container 合适的 requests 和 limits |
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.
- **资源推荐**: 基于应用的历史资源使用推荐 Container 合适的 requests 和 limits | |
- **资源推荐**: 基于应用的历史资源使用,为 Container 推荐合适的 requests 和 limits |
kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/analytics-hpa.yaml | ||
kubectl get analytics -n crane-system | ||
``` | ||
|
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.
We can use this feature to show details if the user wants.
Don't forget to enable this feature in mkdocs.yml
.
markdown_extensions:
- pymdownx.details
??? example "analytics-hpa.yaml" | |
```yaml | |
apiVersion: analysis.crane.io/v1alpha1 | |
kind: Analytics | |
metadata: | |
name: craned-hpa | |
namespace: crane-system | |
spec: | |
type: HPA # This can only be "Resource" or "HPA". | |
completionStrategy: | |
completionStrategyType: Periodical # This can only be "Once" or "Periodical". | |
periodSeconds: 600 # analytics selected resources every 10 minutes | |
resourceSelectors: # defines all the resources to be select with | |
- kind: Deployment | |
apiVersion: apps/v1 | |
name: craned | |
--- | |
apiVersion: analysis.crane.io/v1alpha1 | |
kind: Analytics | |
metadata: | |
name: metric-adapter-hpa | |
namespace: crane-system | |
spec: | |
type: HPA # This can only be "Resource" or "HPA". | |
completionStrategy: | |
completionStrategyType: Periodical # This can only be "Once" or "Periodical". | |
periodSeconds: 3600 # analytics selected resources every 1 hour | |
resourceSelectors: # defines all the resources to be select with | |
- kind: Deployment | |
apiVersion: apps/v1 | |
name: metric-adapter | |
``` | |
a666a56
to
4a6ab20
Compare
436c50c
to
a491692
Compare
LGTM |
0bd184b
to
7c3447e
Compare
docs/tutorials/using-effective-hpa-to-scaling-with-effectiveness.zh.md
Outdated
Show resolved
Hide resolved
docs/tutorials/using-effective-hpa-to-scaling-with-effectiveness.zh.md
Outdated
Show resolved
Hide resolved
Co-authored-by: zsnmwy <35299017+zsnmwy@users.noreply.github.com>
What type of PR is this?
Feature
What this PR does / why we need it:
Use RecommendationMission to track recommendation's lifecycle.
Add docs for Analytics and Recommendation.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: