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

[CRITICAL] HorizontalPodAutoscaler has target - reporting a potential false positive #332

Open
rvillane opened this issue Nov 29, 2020 · 1 comment
Labels
waiting for info Waiting for more information from the issue reporter

Comments

@rvillane
Copy link

Which version of kube-score are you using?

kube-score version: 1.10.0, commit: 95faa2a, built: 2020-11-07T14:17:50Z

What did you do?

A complete description of the steps you took to trigger the incorrect behaviour.
scored an HPA YAML definition associated to a Deployment

Include Kubernetes object YAML/JSON if you have it

apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: inventory-processor-load-hpa
  namespace: default
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: inventory-processor-load
  minReplicas: 3
  maxReplicas: 12
  targetCPUUtilizationPercentage: 70

What did you expect to see?

A clear and concise description of what you expected to happen.

I've got the following validation error, definitely the HPA and Deployment and running fine, then it looks like a false positive to me, unless I'm totally misunderstanding the error message.

A description of what happened, include logs and program output

autoscaling/v1/HorizontalPodAutoscaler inventory-processor-load-hpa in default💥
    [CRITICAL] HorizontalPodAutoscaler has target
        · The HPA target does not match anything

@zegl
Copy link
Owner

zegl commented Nov 29, 2020

Hey,

kube-score expects to receive all objects as input to the program so that it can make the correlations between them. You can see the testcase in https://github.com/zegl/kube-score/blob/master/score/testdata/hpa-targets-deployment.yaml as an example.

@zegl zegl added the waiting for info Waiting for more information from the issue reporter label Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for info Waiting for more information from the issue reporter
Projects
None yet
Development

No branches or pull requests

2 participants