gocrane / crane

Crane is a FinOps Platform for Cloud Resource Analytics and Economics in Kubernetes clusters. The goal is not only to help users to manage cloud cost easier but also ensure the quality of applications.
https://gocrane.io
Apache License 2.0
1.85k stars 378 forks source link

When using feature gates to turn off recommendation, crane still loads the recommendation configuration #832

Closed aheizi closed 1 year ago

aheizi commented 1 year ago

Describe the bug When using feature gates to turn off recommendation, crane still loads the recommendation configuration

Reproduce steps

args:

- --feature-gates=TimeSeriesPrediction=true,Autoscaling=true,NodeResource=false,Analysis=false

start-up crane

The error is as follows:

E0704 20:34:23.288120   88234 config.go:66] load recommender configuration failed, failed to read file path "/tmp/recommendation-framework/recommendation_configuration.yaml": open /tmp/recommendation-framework/recommendation_configuration.yaml: no such file or directory
E0704 20:34:23.288195   88234 manager.go:124] "Failed to load recommendation config file" err="failed to read file path \"/tmp/recommendation-framework/recommendation_configuration.yaml\": open /tmp/recommendation-framework/recommendation_configuration.yaml: no such file or directory" file="/tmp/recommendation-framework/recommendation_configuration.yaml"
E0704 20:34:23.288333   88234 manager.go:81] "Failed to watch" err="lstat /tmp/recommendation-framework/recommendation_configuration.yaml: no such file or directory" file="/tmp/recommendation-framework/recommendation_configuration.yaml"

Expected behavior

When the recommendation is turned off, it can be completely turned off

Screenshots

Environment (please complete the following information):