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

manifest: reduce CRD size by removing some descriptions #13793

Merged
merged 2 commits into from Feb 20, 2024

Conversation

rkachach
Copy link
Contributor

@rkachach rkachach commented Feb 20, 2024

All credits to the original PR authored by @BlaineEXE : #13779

Reduce CRD size by removing some descriptions for things that:

  1. are long
  2. are repeated
  3. common kubernetes types.

Remove the Status field from VolumeClaimTemplates (a.k.a. PVCs) in types.go to remove all unnecessary status-related fields.

Use yq to go through generated crds.yaml to strip out descriptions for well-known k8s types that are long and repeated where we can't remove them from types.go. This is mostly placement descriptions and volumeSource descriptions.

The overall crds.yaml file is reduced to less than 60% of its original size.

Manual upgrade testing:

New image is upgraded correctly, and cluster is healthy after the upgrade:

bash-4.4$ ceph -s
  cluster:
    id:     554d990f-2e29-4935-ad5a-31403c10d18b
    health: HEALTH_OK
 
  services:
    mon: 1 daemons, quorum a (age 31m)
    mgr: a(active, since 30s)
    osd: 3 osds: 3 up (since 28m), 3 in (since 29m)
 
  data:
    pools:   1 pools, 32 pgs
    objects: 2 objects, 463 KiB
    usage:   80 MiB used, 120 GiB / 120 GiB avail
    pgs:     32 active+clean

Issue resolved by this Pull Request:
Resolves #
#13765

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Reduce CRD size by removing some descriptions for things that
(a) are long, (b) are repeated, and (c) are commong kubernetes types.

Remove the `Status` field from VolumeClaimTemplates (a.k.a. PVCs) in
types.go to remove all unnecessary status-related fields.

Use `yq` to go through generated `crds.yaml` to strip out descriptions
for well-known k8s types that are long and repeated where we can't
remove them from types.go. This is mostly placement descriptions and
volumeSource descriptions.

The overall `crds.yaml` file is reduced to less than 60% of its original
size.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
Co-authored-by: Blaine Gardner <blaine.gardner@ibm.com>
@rkachach rkachach requested review from BlaineEXE, travisn and a team February 20, 2024 09:10
@rkachach rkachach marked this pull request as ready for review February 20, 2024 11:37
@rkachach rkachach force-pushed the fix_issue_crds_desc branch 2 times, most recently from 690288d to 952ec5a Compare February 20, 2024 13:47
Copy link
Member

@BlaineEXE BlaineEXE left a comment

Choose a reason for hiding this comment

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

Short comment for now while we look at CI

pkg/apis/ceph.rook.io/v1/volume.go Outdated Show resolved Hide resolved
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
@BlaineEXE BlaineEXE merged commit bd9577f into rook:master Feb 20, 2024
51 checks passed
mergify bot added a commit that referenced this pull request Mar 7, 2024
manifest: reduce CRD size by removing some descriptions (backport #13793)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants