Skip to content

Commit

Permalink
Add the api-approved.kubernetes.io annotation via kubebuilder tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ialidzhikov committed Dec 13, 2024
1 parent bc0570b commit 4ee8f27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
11 changes: 2 additions & 9 deletions vertical-pod-autoscaler/hack/generate-crd-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,5 @@ grep -v -e 'map keys must be strings, not int' -e 'not all generators ran succes
&& { echo "Failed to generate CRD YAMLs."; exit 1; }

cd ${WORKSPACE}
cat <<EOF > kustomization.yaml
resources:
- autoscaling.k8s.io_verticalpodautoscalers.yaml
- autoscaling.k8s.io_verticalpodautoscalercheckpoints.yaml
commonAnnotations:
"api-approved.kubernetes.io": "https://github.com/kubernetes/kubernetes/pull/63797"
EOF
echo --- > ${OUTPUT}
kubectl kustomize . >> ${OUTPUT}
cat "${WORKSPACE}/autoscaling.k8s.io_verticalpodautoscalercheckpoints.yaml" > ${OUTPUT}
cat "${WORKSPACE}/autoscaling.k8s.io_verticalpodautoscalers.yaml" >> ${OUTPUT}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type VerticalPodAutoscalerList struct {
// +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"
// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes/kubernetes/pull/63797"

// VerticalPodAutoscaler is the configuration for a vertical pod
// autoscaler, which automatically manages pod resources based on historical and
Expand Down Expand Up @@ -347,6 +348,7 @@ type VerticalPodAutoscalerCondition struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=vpacheckpoint
// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes/kubernetes/pull/63797"

// VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that
// is used for recovery after recommender's restart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type VerticalPodAutoscalerList struct {
// +kubebuilder:resource:shortName=vpa
// +kubebuilder:subresource:status
// +k8s:prerelease-lifecycle-gen=true
// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes/kubernetes/pull/63797"

// VerticalPodAutoscaler is the configuration for a vertical pod
// autoscaler, which automatically manages pod resources based on historical and
Expand Down Expand Up @@ -273,6 +274,7 @@ type VerticalPodAutoscalerCondition struct {
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:shortName=vpacheckpoint
// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes/kubernetes/pull/63797"

// VerticalPodAutoscalerCheckpoint is the checkpoint of the internal state of VPA that
// is used for recovery after recommender's restart.
Expand Down

0 comments on commit 4ee8f27

Please sign in to comment.