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

ProvisioningRequest v1 client #7195

Merged

Conversation

aleksandra-malinowska
Copy link
Contributor

@aleksandra-malinowska aleksandra-malinowska commented Aug 21, 2024

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Adds ProvisioningRequest v1 API client.

Special notes for your reviewer:

This PR has several commits because the process of generating client for v1 wasn't straightforward. Not squashing for transparency and future reference. I haven't found a better workaround than removing and adding apis/ module.

Steps to generate client:

  • (no commit) checked out k8s.io/codegen
  • Fixed hack/update-codegen.sh as it was outdated (assumed /vendor and used old scripts which no longer exist in codegen)
  • Turned apis/ into a regular package. Normally cluster-autoscaler/apis is a module that can be imported standalone, but it lives within cluster-autoscaler/, and codegen is very unhappy about it.
    • The same problem is solved in main Kubernetes repository with staging/ not being a module, and instead being mirrored in a separate repo.
    • Attempts to regenerate client without this step fail with main module (k8s.io/autoscaler/cluster-autoscaler) does not contain package k8s.io/autoscaler/cluster-autoscaler/apis/provisioningrequest/autoscaling.x-k8s.io/v1beta1.
  • Regenerated existing v1beta1 client using this setup and newer codegen by running hack/update-codegen.sh
  • Added types for v1
  • Generated v1 client by running hack/update-codegen.sh
  • Made apis/ a module again (reverted second commit)
  • Updated code using this API to use v1 client

Does this PR introduce a user-facing change?

Added support for ProvisioningRequest v1 API.

/hold
/cc @MaciekPytel @mwielgus

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 21, 2024
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/cluster-autoscaler size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 21, 2024
@aleksandra-malinowska
Copy link
Contributor Author

aleksandra-malinowska commented Aug 22, 2024

Tested conversion in a real cluster by creating a few v1beta1 ProvisioningRequests and verifying they're processed as expected by the version of CA built from this PR.

@aleksandra-malinowska
Copy link
Contributor Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 22, 2024
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@MaciekPytel
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aleksandra-malinowska, MaciekPytel

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 merged commit 70f0bcb into kubernetes:master Aug 23, 2024
6 checks passed
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/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants