Skip to content

Commit

Permalink
fix: update crd gen logic
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek committed Dec 16, 2024
1 parent 661ac22 commit 8dfbb96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 2 additions & 9 deletions multidimensional-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_multidimpodautoscalers.yaml
- autoscaling.k8s.io_multidimpodautoscalercheckpoints.yaml
commonAnnotations:
"api-approved.kubernetes.io": "https://github.com/kubernetes/kubernetes/pull/63797"
EOF
echo --- > ${OUTPUT}
kubectl kustomize . >> ${OUTPUT}
cat "${WORKSPACE}/autoscaling.k8s.io_multidimpodautoscalercheckpoints.yaml" > ${OUTPUT}
cat "${WORKSPACE}/autoscaling.k8s.io_multidimpodautoscalers.yaml" >> ${OUTPUT}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
// +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"

// MultidimPodAutoscaler is the configuration for a multidimensional pod autoscaler,
// which automatically manages pod resources and number of replicas based on historical and
Expand Down Expand Up @@ -220,6 +221,7 @@ type MultidimPodAutoscalerCondition struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=mpacheckpoint
// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes/kubernetes/pull/63797"

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

0 comments on commit 8dfbb96

Please sign in to comment.