Skip to content

generate: keep owned CRD order from the base CSV - #7148

Open
RaphaelFakhri wants to merge 1 commit into
operator-framework:masterfrom
RaphaelFakhri:fix/6771-bundle-owned-crd-order
Open

RaphaelFakhri wants to merge 1 commit into
operator-framework:masterfrom
RaphaelFakhri:fix/6771-bundle-owned-crd-order

Conversation

@RaphaelFakhri

Copy link
Copy Markdown

Description of the change:

applyCustomResourceDefinitions rebuilt spec.customresourcedefinitions.owned in the order the CRD manifests were collected. This change keeps descriptions already in the base CSV in their existing order, drops descriptions whose CRD is no longer present, and appends descriptions for new CRDs in collector order.

A new unit test covers the ordering, the removal of stale entries, and the appending of new CRDs.

Motivation for the change:

The +operator-sdk:csv:customresourcedefinitions:order marker reorders owned in config/manifests/bases/*.clusterserviceversion.yaml, but make bundle reordered the list again by CRD manifest order (effectively alphabetical after kustomize build). The bundle CSV ignored both the marker and any manual ordering, and OperatorHub and the OpenShift console use this order to display CRDs.

Closes #6771

Checklist

If the pull request includes user-facing changes, extra documentation is required:

applyCustomResourceDefinitions rebuilt spec.customresourcedefinitions.owned
in the order the CRD manifests were collected, so the order set in the base
CSV by the customresourcedefinitions order marker (or by hand) was lost in
the bundle CSV. Keep existing descriptions in their base order, drop those
whose CRD is no longer present, and append new CRDs in collector order.

Closes operator-framework#6771

Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

+operator-sdk:csv:customresourcedefinitions:order does not change order in bundle

1 participant