Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Create example config for Vertical Pod Autoscaler #49

Open
dak1n1 opened this issue Jun 1, 2020 · 2 comments
Open

Create example config for Vertical Pod Autoscaler #49

dak1n1 opened this issue Jun 1, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dak1n1
Copy link
Contributor

dak1n1 commented Jun 1, 2020

Description

I'm working on creating an example using GKE and Vertical Pod Autoscaler (VPA). This issue tracks work in progress.

Potential Terraform Configuration

I have part of it done here, but it needs more work:

References

Non-blocking bugs encountered during testing:

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@dak1n1 dak1n1 added the enhancement New feature or request label Jun 1, 2020
@dak1n1 dak1n1 self-assigned this Jun 1, 2020
@dak1n1
Copy link
Contributor Author

dak1n1 commented Jun 1, 2020

Here are more details about failing to create the VPA object:

$  terraform apply --auto-approve
kubernetes_manifest.deployment_redis_master: Refreshing state...

Error: rpc error: code = Unknown desc = update dry-run for 'default/redis-vpa' failed: admission webhook "gke-vpa.k8s.io" does not support dry run

Full debug trace here: https://gist.github.com/dak1n1/396b30f1503c69f1a0f42091d8e45ee5

I thought this indicated a server-side apply issue at first, but I was able to server-side apply the same objects using yaml:

$ kubectl apply -f redis.yaml --server-side
verticalpodautoscaler.autoscaling.k8s.io/redis-vpa serverside-applied
deployment.apps/redis-master serverside-applied

It only appears to be an issue during the server-side dry-run:

$ kubectl apply -f redis.yaml --server-dry-run
deployment.apps/redis-master created (server dry run)
Error from server (BadRequest): error when creating "redis.yaml": admission webhook "gke-vpa.k8s.io" does not support dry run

I found that if I edit the MutatingWebhookConfiguration for VPA, I can get this to apply:

$ kubectl edit mutatingwebhookconfiguration gke-vpa-webhook-config

I changed sideEffects: Unknown to sideEffects: None. Then it worked.

$ kubectl apply -f redis.yaml --server-dry-run
verticalpodautoscaler.autoscaling.k8s.io/redis-vpa created (server dry run)
deployment.apps/redis-master created (server dry run)

However, I'm not sure yet what the impacts of that change are, and how we might want to approach this in the example.

@dak1n1
Copy link
Contributor Author

dak1n1 commented Jun 1, 2020

Since the upstream project has added sideEffects: None to the controller, this seems like a safe change to make in this example app too. kubernetes/autoscaler#2278

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant