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

[vpa] status.recommendation.containerRecomendations isn't sorted #4910

Closed
apolovov opened this issue May 24, 2022 · 0 comments · Fixed by #4979
Closed

[vpa] status.recommendation.containerRecomendations isn't sorted #4910

apolovov opened this issue May 24, 2022 · 0 comments · Fixed by #4979
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@apolovov
Copy link

apolovov commented May 24, 2022

Which component are you using?:
vertical-pod-autoscaler

What version of the component are you using?:

Component version: v0.9.0

What k8s version are you using (kubectl version)?:

kubectl version Output
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.11", GitCommit:"38d3c1f3d5306401bcf39a71bad3b5a5106033d7", GitTreeState:"clean", BuildDate:"2022-03-16T14:08:11Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.11", GitCommit:"0000000000000000000000000000000000000000", GitTreeState:"archive", BuildDate:"2022-04-07T10:27:33Z", GoVersion:"go1.16.3", Compiler:"gc", Platform:"linux/amd64"}

What environment is this in?:

Any cloud or bare metal setups.

What did you expect to happen?:

containerRecomendations field should be sorted.

What happened instead?:

The order is constantly changing.

How to reproduce it (as minimally and precisely as possible):

Create VPA for Deployment with two containers (machine-controller-manager in my case) and watch it:

$ kubectl -n foo get vpa machine-controller-manager -w
NAME                         MODE   CPU   MEM        PROVIDED   AGE
machine-controller-manager   Auto   38m   21337184   True       2y107d
machine-controller-manager   Auto   10m   12224193   True       2y107d
machine-controller-manager   Auto   38m   21337184   True       2y107d
machine-controller-manager   Auto   10m   12224193   True       2y107d
machine-controller-manager   Auto   38m   21337184   True       2y107d
machine-controller-manager   Auto   10m   12224193   True       2y107d
machine-controller-manager   Auto   38m   21337184   True       2y107d
machine-controller-manager   Auto   10m   12224193   True       2y107d
machine-controller-manager   Auto   38m   21337184   True       2y107d
machine-controller-manager   Auto   38m   21337184   True       2y107d

The status switches every time:

status:
  conditions:
  - lastTransitionTime: "2020-04-16T05:41:04Z"
    status: "True"
    type: RecommendationProvided
  recommendation:
    containerRecommendations:
    - containerName: controller
      lowerBound:
        cpu: 12m
        memory: "21337184"
      target:
        cpu: 38m
        memory: "21337184"
      uncappedTarget:
        cpu: 49m
        memory: "49566436"
      upperBound:
        cpu: 38m
        memory: "21337184"
    - containerName: kube-rbac-proxy
      lowerBound:
        cpu: 10m
        memory: "12224193"
      target:
        cpu: 10m
        memory: "12224193"
      uncappedTarget:
        cpu: 12m
        memory: "26214400"
      upperBound:
        cpu: 10m
        memory: "12224193"
status:
  conditions:
  - lastTransitionTime: "2020-04-16T05:41:04Z"
    status: "True"
    type: RecommendationProvided
  recommendation:
    containerRecommendations:
    - containerName: kube-rbac-proxy
      lowerBound:
        cpu: 10m
        memory: "12224193"
      target:
        cpu: 10m
        memory: "12224193"
      uncappedTarget:
        cpu: 12m
        memory: "26214400"
      upperBound:
        cpu: 10m
        memory: "12224193"
    - containerName: controller
      lowerBound:
        cpu: 12m
        memory: "21337184"
      target:
        cpu: 38m
        memory: "21337184"
      uncappedTarget:
        cpu: 49m
        memory: "49566436"
      upperBound:
        cpu: 38m
        memory: "21337184"

Anything else we need to know?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants