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

Cannot render multiple bundles with same name in semver template #3174

Open
Jeansen opened this issue Feb 12, 2024 · 0 comments
Open

Cannot render multiple bundles with same name in semver template #3174

Jeansen opened this issue Feb 12, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Jeansen
Copy link

Jeansen commented Feb 12, 2024

Bug Report

What did you do?
Following the Core Tasks in the documentation, I have a semver template with multiple bundle versions. Rendering it gives me: render: unable to post-process bundle info: duplicate bundle name "cis-operator"

What did you expect to see?
A clear and concise description of what you expected to happen (or insert a code snippet).

Using the following template, catalog_render_template.yaml:

Schema: olm.semver
GenerateMajorChannels: true
GenerateMinorChannels: false
Stable:
  Bundles:
    - Image: proxy-ng:443/quarkus/cis-operator-bdl:1.96.0
    - Image: proxy-ng:443/quarkus/cis-operator-bdl:1.97.0

And running the following command:

opm alpha render-template semver -o yaml < catalog_render_template.yaml > /tmp/catalog.yaml

I'd expect the command to create a catalog.yaml file with all relevant configuration data.

What did you see instead? Under which circumstances?
A clear and concise description of what you expected to happen (or insert a code snippet).

Instead, I get:

2024/02/12 17:18:05 semver "stdin": render: unable to post-process bundle info: duplicate bundle name "cis-operator"

and the catalog.yaml is empty!

Environment

  • operator-lifecycle-manager version:

0.26.0

  • Kubernetes version information:

1.29.0

  • Kubernetes cluster kind:

Bare metal, kubeadm.
Possible Solution

Additional context
Add any other context about the problem here.

If one removes the second Entry from the template, e.g.

Schema: olm.semver
GenerateMajorChannels: true
GenerateMinorChannels: false
Stable:
  Bundles:
    - Image: proxy-ng:443/quarkus/cis-operator-bdl:1.96.0

Then, the render command succeeds and the catalog is filled with:

---
defaultChannel: stable-v1
name: cis-operator
schema: olm.package
---
entries:
- name: cis-operator
name: stable-v1
package: cis-operator
schema: olm.channel
---
image: proxy-ng:443/quarkus/cis-operator-bdl:1.96.0
name: cis-operator
package: cis-operator
properties:
- type: olm.gvk
  value:
    group: example.cis
    kind: CisOperator
    version: v1
- type: olm.package
  value:
    packageName: cis-operator
    version: 1.96.0
- type: olm.csv.metadata
  value:
    apiServiceDefinitions: {}
    crdDescriptions:
      owned:
      - kind: CisOperator
        name: cisoperators.example.cis
        version: v1
    displayName: cis-operator
    installModes:
    - supported: true
      type: AllNamespaces
    provider: {}
relatedImages:
- image: proxy-ng:443/quarkus/cis-operator-bdl:1.96.0
  name: ""
- image: proxy-ng:443/quarkus/cis-operator:1.96.0
  name: ""
schema: olm.bundle
@Jeansen Jeansen added the kind/bug Categorizes issue or PR as related to a bug. label Feb 12, 2024
@Jeansen Jeansen changed the title Cannot render multiple bundles with same name in semver tempalate Cannot render multiple bundles with same name in semver template Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant