-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs #2017
internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs #2017
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you also add a line to the CHANGELOG for this fix.
/test e2e-aws-ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/test e2e-aws-ansible |
/test e2e-aws-helm |
… CRDs (operator-framework#2017) * internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs * CHANGELOG.md: add line for operator-framework#2017 (cherry picked from commit 5bfe311)
… CRDs (operator-framework#2017) * internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs * CHANGELOG.md: add line for operator-framework#2017 (cherry picked from commit 5bfe311)
* *: fix gen-csv to copy CRD manifests with any name (#2015) (cherry picked from commit 5d22a11) * internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs (#2017) * internal/pkg/scaffold/olm-catalog/csv_updaters.go: fix applying owned CRDs * CHANGELOG.md: add line for #2017 (cherry picked from commit 5bfe311)
Description of the change:
This PR fixes an issue in
olm-catalog gen-csv
where the CSV's owned CRDs are not properly populated from CRD manifests indeploy/crds
.The current code has two issues:
--from-version
is not used), no CRDs are populated.--from-version
is used), only CRDs that are in the original version will be carried forward to the new version, even if there are new CRDs present indeploy/crds
These issues stem from the fact that the CSV updater iterates the existing set of CRDs to build the new set. In case 1, the existing set is empty, since nothing exists, which explains why no CRDs are populated.
Motivation for the change:
Fixes the above described issue.