Skip to content

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

Closed
@joelanford

Description

@joelanford

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-by-olmRelated to an OLM feature or bug that blocks this issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions