How to configure the CRD workload to use recommended features
Closed this issue · 2 comments
Describe the feature
K8s version v1.20.8
crane version v0.11.0
Submit the following configuration in the cluster:
apiVersion: analysis.crane.io/v1alpha1
kind: RecommendationRule
metadata:
name: workloads-rule
labels:
analysis.crane.io/recommendation-rule-preinstall: "true"
spec:
runInterval: 24h
resourceSelectors:
- kind: StatefulSet
apiVersion: apps/v1
- kind: Rollout #CRD
apiVersion: argoproj.io/v1alpha1
namespaceSelector:
any: true
recommenders:
- name: Replicas
- name: Resource
I hope to recommend Rollout resources just like StatefulSet, check the crane log and the following information appears:
E0105 18:06:04.327485 1 manager.go:138] RecommendationRule(workloads-rule) Target(demo-project/rollouts-demo): recommender "Resource" failed at filter phase: recommender is failed at filter, your kubernetes resource is not supported for recommender
I0105 18:06:04.327622 1 manager.go:133] RecommendationRule(workloads-rule) Target(demo-project/rollouts-demo): start to run recommender "Replicas".
E0105 18:06:04.327634 1 manager.go:138] RecommendationRule(workloads-rule) Target(demo-project/rollouts-demo): recommender "Replicas" failed at filter phase: recommender is failed at filter, your kubernetes resource is not supported for recommender
I0105 18:06:04.327834 1 manager.go:133] RecommendationRule(workloads-rule) Target(default/nginx-rollout): start to run recommender "Resource".
Recommended values that are not available in the crane console:
How to solve this problem ?
Please check if the configmap named "recommendation-configuration" is correctly configured.
crane/deploy/craned/deployment.yaml
Lines 96 to 130 in 6d7758e
Please check if the configmap named "recommendation-configuration" is correctly configured.
crane/deploy/craned/deployment.yaml
Lines 96 to 130 in 6d7758e
Thank you. It has been solved. Add resources based on this configuration.