Skip to content

Support multiple CRD versions #379

@whentojump

Description

@whentojump

Description

If the supplied CRD contains multiple versions, Acto will always pick up the first one during --learn stage:

"version": spec.versions[0].name,

If the intended or latest version isn't the head of the list, Acto will use the wrong one.

Specifically, for percona/percona-server-mongodb-operator, in its bundle.yaml of v1.15.0, a deprecated version (v1-2-0) is put under path spec.versions[0], and the version we want (v1) is put under path spec.versions[11]. Learning phase would fail because accessing https://host:port/apis/psmdb.percona.com/v1-2-0/... returns 404.

(Incidentally, for the old in-tree bundle.yaml, Acto also selected the first version (v1alpha1, see context.json) instead of the last one (v1-12-0). But somehow that config worked fine.)

Solutions

  1. Allow user to specify version in config.json
  2. Pick up the version more smartly (But this seems harder if the version scheme is ad-hoc per project)
  3. Before 1 or 2 is implemented, in relevant documentation, like here and here, we'd better put a notice that we should remove preceding unwanted versions and put the intended one first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions