Skip to content
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 types for recommenderConfiguration #420

Merged
merged 2 commits into from
Jul 19, 2022
Merged

Conversation

qmhu
Copy link
Member

@qmhu qmhu commented Jul 18, 2022

What type of PR is this?

Feature

What this PR does / why we need it:

types for RecommendationConfiguration

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

RecommendationConfiguration is a config file that mount on craned.
this is a sample for RecommendationConfiguration:

apiVersion: v1
kind: ConfigMap
metadata:
  name: crane-config
  namespace: crane-system
data:
 recommendation_configuration.yaml: |-
    apiVersion: analysis.crane.io/v1alpha1
    kind: RecommendationConfiguration
    recommenders:
      - recommenderName: EKSWorkloadResourceRecommender.  // EKS 资源推荐器
         config:
           cpu-request-percentile: "0.98"            // 修改 cpu 百分比配置
      - recommenderName: CLBServiceRecommender                      // CLB 网络限制资源推荐器
      - recommenderName: WorkloadReplicasRecommender           // 通用的副本数推荐器
    recommenderPlugins:
      - recommenderName: MyCustomRecommender
        priority: 100
        serverConfig: 
        - urlPrefix: /                 // 自定义 Recommender 的 url 前缀

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2022

🎉 Successfully Build Images.

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-420-85695c4 docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-420-85695c4
dashboard:pr-420-85695c4 docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-420-85695c4
metric-adapter:pr-420-85695c4 docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-420-85695c4
craned:pr-420-85695c4 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-420-85695c4

xieydd
xieydd approved these changes Jul 19, 2022
Copy link
Member

@xieydd xieydd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nits.

pkg/recommendation/recommender/apis/types.go Outdated Show resolved Hide resolved
pkg/recommendation/recommender/apis/types.go Outdated Show resolved Hide resolved
@qmhu qmhu merged commit c7a56de into gocrane:main Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants