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 CRD not contain status subresource #5675

Closed
wu0407 opened this issue Apr 12, 2023 · 0 comments · Fixed by #5680, #5766 or #5911
Closed

vpa CRD not contain status subresource #5675

wu0407 opened this issue Apr 12, 2023 · 0 comments · Fixed by #5680, #5766 or #5911
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@wu0407
Copy link
Contributor

wu0407 commented Apr 12, 2023

Which component are you using?:

vertical-pod-autoscaler

What version of the component are you using?:

Component version: 0.13.0

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

kubectl version Output
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.10", GitCommit:"7e54d50d3012cf3389e43b096ba35300f36e0817", GitTreeState:"clean", BuildDate:"2022-08-17T18:32:54Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.10", GitCommit:"7e54d50d3012cf3389e43b096ba35300f36e0817", GitTreeState:"clean", BuildDate:"2022-08-17T18:26:59Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}

What environment is this in?:
kubernetes 1.23

What did you expect to happen?:

vpa crd has stataus field in subresources, that metadata.generation only increase in spec change
relate pr #3606

What happened instead?:

The vpa crd has empty subresources that leads to metadata.generation increase on vpa status update

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

Anything else we need to know?:

relate code:

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=vpa
// +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.updatePolicy.updateMode"
// +kubebuilder:printcolumn:name="CPU",type="string",JSONPath=".status.recommendation.containerRecommendations[0].target.cpu"
// +kubebuilder:printcolumn:name="Mem",type="string",JSONPath=".status.recommendation.containerRecommendations[0].target.memory"
// +kubebuilder:printcolumn:name="Provided",type="string",JSONPath=".status.conditions[?(@.type=='RecommendationProvided')].status"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// VerticalPodAutoscaler is the configuration for a vertical pod
// autoscaler, which automatically manages pod resources based on historical and
// real time resource utilization.
type VerticalPodAutoscaler struct {

@wu0407 wu0407 added the kind/bug Categorizes issue or PR as related to a bug. label Apr 12, 2023
wu0407 added a commit to wu0407/autoscaler that referenced this issue Apr 13, 2023
wu0407 added a commit to wu0407/autoscaler that referenced this issue Apr 13, 2023
wu0407 added a commit to wu0407/autoscaler that referenced this issue Apr 22, 2023
wu0407 added a commit to wu0407/autoscaler that referenced this issue Apr 26, 2023
Add status field in subresource on crd yaml and add new ClusterRole system:vpa-actor to patch /status subresource.
The `metadata.generation` only increase on vpa spec update.

Fixes: kubernetes#5675

Signed-off-by: xiaoqing <[email protected]>
@jbartosik jbartosik reopened this Jun 30, 2023
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
2 participants