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: Add the api-approved.kubernetes.io annotation via kubebuilder tag #7605

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

ialidzhikov
Copy link
Contributor

@ialidzhikov ialidzhikov commented Dec 13, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

CRDs using the *.k8s.io group require the api-approved.kubernetes.io annotation to be present on the CRD.

Previously, it was not possible to provide this annotation with kubebuilder (see kubernetes-sigs/controller-tools#656), that's why we have a workaround logic on VPA CRD generation to add this annotation via kustomize:

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}

This PR:

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

PR can be reviewed following the dedicated commits.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot
Copy link
Contributor

@ialidzhikov: The label(s) kind/enhancement cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

CRDs from k8s.io require the api-approved.kubernetes.io annotation.
Previously, it was not possible to provide this annotation with kubebuilder (see kubernetes-sigs/controller-tools#656), that's why we have a workaround logic on VPA CRD generation to add this annotation via kustomize:

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}

This PR:

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

PR can be reviewed following the dedicated commits.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 13, 2024
@k8s-ci-robot k8s-ci-robot requested a review from kgolab December 13, 2024 15:11
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 13, 2024
@ialidzhikov ialidzhikov changed the title VPA: Add the api-approved.kubernetes.io annotation via kubebuilder tag VPA: Add the api-approved.kubernetes.io annotation via kubebuilder tag Dec 13, 2024
@ialidzhikov
Copy link
Contributor Author

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 13, 2024
@adrianmoisey
Copy link
Member

/lgtm

Thanks for handling this

/remove-kind feature
/kind cleanup

(Just making it a cleanup, since this isn't related to a new VPA feature)

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Dec 14, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2024
adrianmoisey added a commit to adrianmoisey/autoscaler that referenced this pull request Dec 16, 2024
Also update updates sigs.k8s.io/controller-tools/cmd/controller-gen from v0.9.2 to v0.16.5.
(kubernetes#7605)
@raywainman
Copy link
Contributor

Thanks for the cleanup!

/lgtm

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ialidzhikov, raywainman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit de5d64f into kubernetes:master Dec 16, 2024
7 checks passed
@ialidzhikov ialidzhikov deleted the enh/kubebuilder-tag branch December 17, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants