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

Support multiple CRD versions #379

Open
whentojump opened this issue Apr 4, 2024 · 0 comments
Open

Support multiple CRD versions #379

whentojump opened this issue Apr 4, 2024 · 0 comments

Comments

@whentojump
Copy link
Member

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant