Skip to content

Strip OpenAPI description fields from vendored ASO CRDs#6281

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
mboersma:strip-aso-crd-descriptions
May 6, 2026
Merged

Strip OpenAPI description fields from vendored ASO CRDs#6281
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
mboersma:strip-aso-crd-descriptions

Conversation

@mboersma
Copy link
Copy Markdown
Contributor

@mboersma mboersma commented May 6, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it:

The vendored managedclusters.containerservice.azure.com ASO CRD is ~2.35 MB serialized, which exceeds the request-size / streaming-timeout budgets enforced by some Kubernetes API servers — notably EKS. As a result, clusterctl init -i azure against an EKS management cluster times out repeatedly trying to apply that single CRD and ultimately fails after the 10 retry attempts.

This PR adds a yq step to make generate-aso-crds that strips OpenAPI description fields from the schemas before writing config/aso/crds.yaml:

$(YQ) e 'del(.. | select(has("description")).description)' -

Verified impact:

Before After
managedclusters CRD 2.35 MB 990 KB
Whole config/aso/crds.yaml 3.9 MB 1.7 MB

description is pure metadata in OpenAPI v3 schemas, so this does not affect validation. The only loss is the inline doc text shown by kubectl explain; ASO publishes the same docs externally.

All 10 served spec.versions of every CRD are preserved, so ASO's conversion webhook compatibility is unaffected.

Which issue(s) this PR fixes:
Fixes #6080

Special notes for your reviewer:

The bulk of the diff is the regenerated config/aso/crds.yaml (-23 850 lines). Only the Makefile change is human-authored.

This is the smallest, lowest-risk fix. Two follow-up tracks worth pursuing separately:

  1. Push ASO upstream to publish a slim CRD bundle by default, so all consumers (not just CAPZ) benefit.
  2. Push CAPI/clusterctl to chunk huge CRD installs (apply empty CRD shell first, then stream the schema as JSONPatches).

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

Strip OpenAPI description fields from vendored ASO CRDs

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 6, 2026
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 6, 2026
@k8s-ci-robot k8s-ci-robot requested review from Jont828 and bryan-cox May 6, 2026 14:41
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.95%. Comparing base (bd0f01b) to head (724ac1b).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6281   +/-   ##
=======================================
  Coverage   43.95%   43.95%           
=======================================
  Files         289      289           
  Lines       25351    25351           
=======================================
  Hits        11143    11143           
  Misses      13435    13435           
  Partials      773      773           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mboersma
Copy link
Copy Markdown
Contributor Author

mboersma commented May 6, 2026

/test pull-cluster-api-provider-azure-aks-mgmt-e2e

@mboersma mboersma requested review from jackfrancis and willie-yao and removed request for Jont828 May 6, 2026 15:24
Copy link
Copy Markdown
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I've been running into issues in Tilt because of the files being too large
/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 May 6, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 5cfcf281542bc16bf2904bdd2cba6fca5c624142

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: willie-yao

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

The pull request process is described here

Details 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 May 6, 2026
@k8s-ci-robot k8s-ci-robot merged commit 774c8ac into kubernetes-sigs:main May 6, 2026
26 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone May 6, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in CAPZ Planning May 6, 2026
@mboersma mboersma deleted the strip-aso-crd-descriptions branch May 6, 2026 21:34
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

clusterctl init fails due to too large Managedclusters CRD on EKS

3 participants