Skip to content
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

Installing operators at a particular version requires the full CSV name #2

Closed
joelanford opened this issue Jul 31, 2020 · 0 comments · Fixed by #76
Closed

Installing operators at a particular version requires the full CSV name #2

joelanford opened this issue Jul 31, 2020 · 0 comments · Fixed by #76
Labels
blocked-by-olm Related to an OLM feature or bug that blocks this issue/PR

Comments

@joelanford
Copy link
Member

joelanford commented Jul 31, 2020

Right now, the kubectl operator uses an error-prone shortcut to enable users to provide just a --version flag to the install subcommand rather than the full starting CSV.

It starts by using the package name to lookup the CSV name at the head of the channel (the package name can be different than the base name of the CSV, e.g. prometheus vs prometheusoperator). So we can lookup prometheus and resolve to prometheusoperator.0.37.0.

The next step assumes the CSV name at the head of the channel contains a semver version, and it replaces the semver version it finds, with the desired version provided on the command line.

Now we have a guess for the name of the CSV for an earlier version. We blindly put the resulting value into the starting CSV field of the subscription and hope for the best.

We end up making 2 major assumptions, which could both fail:

  1. That the CSV name has a particular format,
  2. That all CSVs in a channel have the exact same format.

Can this be improved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-olm Related to an OLM feature or bug that blocks this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant