-
Notifications
You must be signed in to change notification settings - Fork 27
Update Makefile to handle old versions in OLM #575
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
Update Makefile to handle old versions in OLM #575
Conversation
Signed-off-by: Fran Perea <fperea@redhat.com>
|
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
|
I have hereby read the F5 CLA and agree to its terms |
|
We are currently investigating the possibilty of making older operator bundles available on OpenShift by converting the repo to file based catalog nginx/kubernetes-ingress#8222, but this PR also appears to be a solution to make the immediate previous version of the bundle available. I wonder if both solutions can co-exist? For the implementation, I am wondering if we have to make Also, during release, we update the operator version from current to the new automatically with the pipeline (see https://github.com/nginx/nginx-ingress-helm-operator/blob/main/.github/workflows/sync-chart.yml). I think we will need to find a way to automate updating |
|
Thanks for your comment @haywoodsh. Honestly, the PR is a quick patch to keep all the versions available for the current model (metadata-bundle based), but the right approach is to convert the repo to FBC (file based catalog) since you are already considering it. If you decide to switch to FBC [1], you will use the Answering your questions: I don't think both implementations must be done at the same time. For the short term, applying the skip/replaces in the CSV file will configure the catalog/bundle to include all versions (as per the current PR). Needed, but not mandatory. Helpful if you want to have an upgrade path. About the pipeline, I guess, depending on the decision you take. With FBC, you don't need that variable, but you do need the variable with the current PR approach, agree. [1] https://olm.operatorframework.io/docs/reference/file-based-catalogs/#olm-defined-schemas |
|
@haywoodsh any chance this can be merged? We're hoping to get some stability from having a known good version to install in case something happens. |
Signed-off-by: Fran Perea <fperea@redhat.com>
|
@haywoodsh - Added the code to add the After a deep review of the code, I confirmed that the Makefile is already set up to add older versions to the catalog, see Makefile. This is an essential step too, so when the Upgrade is triggered, the variable |
Signed-off-by: Fran Perea <fperea@redhat.com>
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.
Pull Request Overview
This PR updates the OLM (Operator Lifecycle Manager) bundle generation process to maintain an upgrade path between operator versions in the certified-operators catalog. Previously, only the latest version was available; this change ensures older versions remain accessible and properly linked through OLM's upgrade mechanism.
Key Changes:
- Adds
REPLACESvariable to define upgrade path from previous operator versions - Configures
skips: []to make all versions available in the catalog - Updates CI workflow to automatically set
REPLACESto the current version before incrementing
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Makefile | Adds REPLACES variable and bundle generation logic to inject OLM upgrade metadata (replaces/skips fields) into ClusterServiceVersion |
| .github/workflows/sync-chart.yml | Adds workflow step to update REPLACES value to current version before version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Change the sed command to use a more portable approach. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Fran Perea <32894988+fperearodriguez@users.noreply.github.com>
Change the sed command to use a more portable approach. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Fran Perea <32894988+fperearodriguez@users.noreply.github.com>
Change the grep command to avoid a deprecated option. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Fran Perea <32894988+fperearodriguez@users.noreply.github.com>
Change the grep command to avoid a deprecated option. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Fran Perea <32894988+fperearodriguez@users.noreply.github.com>
Signed-off-by: Fran Perea <fperea@redhat.com>
Signed-off-by: Fran Perea <fperea@redhat.com>

Proposed changes
Only the latest version of the Operator is available in the
certified-operatorsindex. I am unsure if that configuration is intentional or not, but I have verified that all the images are available in Quay. The issue appears to be with the creation of the OLM bundle, and I would like to propose keeping the old versions of the operator available [1].This PR updates the Makefile to configure OLM to keep an old version of the operator available:
[1] #540
Checklist
Before creating a PR, run through this checklist and mark each as complete.