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

VerticalPodAutoscaler cannot load yaml with "controlledResources" #3776

Closed
matthyx opened this issue Jan 21, 2022 · 0 comments · Fixed by #3775
Closed

VerticalPodAutoscaler cannot load yaml with "controlledResources" #3776

matthyx opened this issue Jan 21, 2022 · 0 comments · Fixed by #3775
Assignees
Labels
Milestone

Comments

@matthyx
Copy link
Contributor

matthyx commented Jan 21, 2022

Describe the bug

In the VPA extension, it's impossible to use VerticalPodAutoscaler resources with "controlledResources" set.
A deserialization error occurs.

Fabric8 Kubernetes Client version

5.10.1@latest

Steps to reproduce

  1. modify yaml resource in io.fabric8.verticalpodautoscaler.test.crud.V1VerticalPodAutoscalerCrudTest.shouldLoadVerticalPodAutoscaler
  2. run the test
  3. it fails!

Expected behavior

Proper deserialization is expected.

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.22.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
	at io.fabric8.verticalpodautoscaler.test.crud.V1VerticalPodAutoscalerCrudTest.shouldLoadVerticalPodAutoscaler(V1VerticalPodAutoscalerCrudTest.java:82)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: 
Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('cpu')
 at [Source: (String)"{"apiVersion":"autoscaling.k8s.io/v1","kind":"VerticalPodAutoscaler","metadata":{"name":"my-app-vpa"},"spec":{"targetRef":{"apiVersion":"apps/v1","kind":"Deployment","name":"my-app"},"updatePolicy":{"updateMode":"Auto"},"resourcePolicy":{"containerPolicies":[{"containerName":"container","controlledResources":["cpu","memory"],"controlledValues":"RequestsOnly"}]}}}"; line: 1, column: 312] (through reference chain: io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscaler["spec"]->io.fabric8.verticalpodautoscaler.api.model.v1.VerticalPodAutoscalerSpec["resourcePolicy"]->io.fabric8.verticalpodautoscaler.api.model.v1.PodResourcePolicy["containerPolicies"]->java.util.ArrayList[0]->io.fabric8.verticalpodautoscaler.api.model.v1.ContainerResourcePolicy["controlledResources"]->java.util.ArrayList[0])
	at io.fabric8.verticalpodautoscaler.test.crud.V1VerticalPodAutoscalerCrudTest.shouldLoadVerticalPodAutoscaler(V1VerticalPodAutoscalerCrudTest.java:82)

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants