Skip to content

Conversation

@fperearodriguez
Copy link
Contributor

@fperearodriguez fperearodriguez commented Sep 22, 2025

Proposed changes

Only the latest version of the Operator is available in the certified-operators index. 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:

  • skips: [] -> Which means all versions will be available in the catalog and can be part of the upgrade chain.
  • replaces -> Needed to create an upgrade path. In most cases, it is the previous one.

[1] #540

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Signed-off-by: Fran Perea <fperea@redhat.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@fperearodriguez
Copy link
Contributor Author

I have hereby read the F5 CLA and agree to its terms

@fperearodriguez fperearodriguez marked this pull request as ready for review September 22, 2025 23:48
@fperearodriguez fperearodriguez requested a review from a team as a code owner September 22, 2025 23:48
@haywoodsh
Copy link
Contributor

haywoodsh commented Sep 30, 2025

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 .spec.replaces optional. Any downsides missing or having the wrong one in the CSV?

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 REPLACES from previous version to current to avoid additional PRs.

@fperearodriguez
Copy link
Contributor Author

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 olm.package, olm.channel, and olm.bundle to manage the whole lifecycle of all versions in a declarative way. Besides, you can create an upgrade path [2] in which you will configure which version replaces the old one. That information will be placed in the olm.channel file.

Answering your questions:

 wonder if both solutions can co-exist?

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).

For the implementation, I am wondering if we have to make .spec.replaces optional. Any downsides missing or having the wrong one in the CSV?

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
[2] https://olm.operatorframework.io/docs/concepts/olm-architecture/operator-catalog/creating-an-update-graph/#methods-for-specifying-updates

@jmighion
Copy link

@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>
@fperearodriguez
Copy link
Contributor Author

@haywoodsh - Added the code to add the REPLACES with the pipeline automatically. At this point, with the changes to the Makefile and sync-chart.yml files, the upgrade path to the N-1 version must be followed.

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 CATALOG_BASE_IMG must be used to build the new one.

Signed-off-by: Fran Perea <fperea@redhat.com>
@haywoodsh haywoodsh linked an issue Oct 24, 2025 that may be closed by this pull request
@vepatel vepatel moved this from Todo ☑ to In Progress 🛠 in NGINX Ingress Controller Nov 10, 2025
@vepatel vepatel self-assigned this Nov 10, 2025
@danielnginx danielnginx requested a review from Copilot November 10, 2025 16:25
Copy link
Contributor

Copilot AI left a 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 REPLACES variable to define upgrade path from previous operator versions
  • Configures skips: [] to make all versions available in the catalog
  • Updates CI workflow to automatically set REPLACES to 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.

fperearodriguez and others added 4 commits November 10, 2025 23:17
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>
@vepatel
Copy link
Contributor

vepatel commented Nov 11, 2025

#575 (comment)

Signed-off-by: Fran Perea <fperea@redhat.com>
@vepatel
Copy link
Contributor

vepatel commented Nov 11, 2025

Screenshot 2025-11-11 at 17 29 33

tested in local crc environment!

@vepatel vepatel moved this from In Progress 🛠 to In Review 👀 in NGINX Ingress Controller Nov 11, 2025
@danielnginx danielnginx merged commit 9cbc503 into nginx:main Nov 12, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done 🚀 in NGINX Ingress Controller Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done 🚀

Development

Successfully merging this pull request may close these issues.

Keep a n-1 version of Nginx Ingress Operator in Bundle

6 participants