Closed jcstanaway closed 1 year ago
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
Which component are you using?:
vertical-pod-autoscaler
What version of the component are you using?:
Component version: 0.12.0
What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?: n/a
What did you expect to happen?:
I have a golang app that creates a VPA client and retrieves the VPA objects per namespace. This is working just fine using
k8s.io/autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned
and instantiating it as:I attempt to create a unit test and use
k8s.io/autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned/fake
and instantiate is as:When calling a function under test and passing
fakeVpaCs
to that function which is expecting a parameter of typek8s.io/autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned.Clientset
I expect there to be no type errors.The function under test (in the main app) has the following signature:
What happened instead?:
I'm getting:
I'm also using the regular fake k8s client (
k8s.io/client-go/kubernetes/fake
) without issue in other unit tests.Due to this error, I'm unable to create any unit tests where I need to stub out the VPA client.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
From the package documentation for
k8s.io/autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned/fake
: