kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
8.05k stars 3.97k forks source link

VPA E2E tests are failing #4557

Closed jbartosik closed 2 years ago

jbartosik commented 2 years ago

VPA e2e tests are consistently failing. They were consistently passing (flake once every few days) until recently.

For full suite:

For admission-controller:

For actuation:

It looks like admission-controller is broken. I suspect that the culprit is #4537

jbartosik commented 2 years ago

4537 merged on 2021-12-20 17:02 CET and affects admission controller, that's why I suspect it causes the problem.

jbartosik commented 2 years ago

When I run e2e tests in my cluster from current master in logs of API server I see logs like:

"failed calling webhook "vpa.k8s.io": expected webhook response of admission.k8s.io/v1, Kind=AdmissionReview, got /, Kind="

adriananeci commented 2 years ago

What do you have configured for admissionReviewVersions in vpa webhook in your cluster? Was the VPA webhook manually created and vpa admission-controller started with--register-webhook=False ?

adriananeci commented 2 years ago

Is there a way I can run the E2E tests suite locally, on my laptop?

jbartosik commented 2 years ago

Is there a way I can run the E2E tests suite locally, on my laptop?

I don't know. I create a cluster and use ./hack/deploy-for-e2e.sh admission-controller to deploy admission controller from what's in my repo, then ./hack/run-e2e-tests.sh admission-controller to run e2e test.

jbartosik commented 2 years ago

What do you have configured for admissionReviewVersions in vpa webhook in your cluster? Was the VPA webhook manually created and vpa admission-controller started with--register-webhook=False ?

$ kubectl get MutatingWebhookConfiguration vpa-webhook-config -oyaml
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  creationTimestamp: {{scrubbed}}
  generation: 1
  name: vpa-webhook-config
  resourceVersion: {{scrubbed}}
  uid: {{scrubbed}}
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    caBundle: {{scrubbed}}
    service:
      name: vpa-webhook
      namespace: kube-system
      port: 443
  failurePolicy: Ignore
  matchPolicy: Equivalent
  name: vpa.k8s.io
  namespaceSelector: {}
  objectSelector: {}
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    resources:
    - pods
    scope: '*'
  - apiGroups:
    - autoscaling.k8s.io
    apiVersions:
    - '*'
    operations:
    - CREATE
    - UPDATE
    resources:
    - verticalpodautoscalers
    scope: '*'
  sideEffects: None
  timeoutSeconds: 30