Skip to content

Upgrade OLM between releases #2695

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

Open
kevinrizza opened this issue Mar 17, 2022 · 5 comments
Open

Upgrade OLM between releases #2695

kevinrizza opened this issue Mar 17, 2022 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@kevinrizza
Copy link
Member

Feature Request

Is your feature request related to a problem? Please describe.
OLM itself is installed by applying the manifests in the latest release to a cluster via kubectl apply. However, for a long running cluster that expects to pull in newer versions of OLM over time, there is no clear path between releases. How do you install a newer version of OLM without first uninstalling it? In the trivial case, you could just reapply the new manifests and pull in their updates, but in some cases (ex a manifest that has been removed

Describe the solution you'd like
An explicit upgrade script (similar to install.sh) but that compares the current version on cluster to the new version being applied that is aware of how to upgrade from one version to the next. Potentially, if there are issues upgrading between those versions, an error message stating why along with next steps beyond that.

@kevinrizza kevinrizza added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 17, 2022
@kevinrizza kevinrizza added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Mar 17, 2022
@njhale
Copy link
Member

njhale commented May 10, 2022

With the advent of operator-framework/rukpak -- and it's counterpart, deppy -- I think we should package OLM as a "plain bundle", and use rukpak to handle its upgrades. @kevinrizza wdyt?

cc @timflannagan @perdasilva

@timflannagan
Copy link
Member

@njhale The only problem with packaging OLM as a plain bundle is that rukpak's plain provisioner has the current limitation where Bundles that contain both the CRD definitions and instances of those CRDs as CRs results in an ordering problem due to our usage of helm under-the-hood. See operator-framework/rukpak#131 for more information.

That said, it's definitely possible to package OLM as two different Bundle resources:

  • CRD definitions
  • Application + custom resource instances

With the introduction of embedded Bundles, we'd need to create two BundleInstances to instantiate OLM, which seems like overkill right now?

@hedgss
Copy link

hedgss commented Mar 22, 2023

I can upgrade OLM

# You should run this command the first time without --force-conflicts to check if you have any conflicts.
# If you have some conflicts, it is better to analyse them.
kubectl apply -f ./crds.yaml --server-side=true --force-conflicts

# check that all CRDs were installed properly.
kubectl wait --for=condition=Established -f ./crds.yaml

# OLM operators will be updated here and restarted.
kubectl apply -f ./olm.yaml 

What potential issues can I have in this case?

@hedgss
Copy link

hedgss commented Mar 22, 2023

Do you have at least a rough timeline as to when this is planned to be implemented?

@dmesser
Copy link
Contributor

dmesser commented Mar 24, 2023

@hedgss Since this is manually applying manifests this can cause issues if we rename or restructure the manifest files that are part of an OLM release. But to be honest we haven't done that so far as I can remember.

The other scenario is that within olm.yaml we do change the structure in which OLM is deployed, i.e. when adding new controllers or removing older ones. Again, not a likely scenario at the moment and not something we would do without a major version bump of OLM. But if you want to be extra sure, you can essentially kubectl apply delete -f ./olm.yaml with the previous olm.yaml and kubectl apply... the new one for a clean removal and install of the new version. The CRDs should never be deleted and should always be safe to be updated by applying the crd.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

5 participants