Skip to content

bug: cannot handle CRDs with multiple versions #20

@embik

Description

@embik

Describe the bug

It seems that we cannot publish resources (via PublishedResources) for CRDs with multiple versions in the CRD. That obviously shouldn't be the case.

The error message in question is:

{"level":"error","time":"2025-02-06T17:39:01.145Z","caller":"controller/controller.go:263","msg":"Reconciler error","controller":"syncagent-apiresourceschema","controllerGroup":"syncagent.kcp.io","controllerKind":"PublishedResource","PublishedResource":{"name":"published-resource-name"},"namespace":"","name":"published-resource-name","reconcileID":"f1fea0dc-4568-4149-8943-694fe567eab5", "error":"failed to create APIResourceSchema: APIResourceSchema.apis.kcp.io \"v4577dd55.<resource>\" is invalid: spec: Invalid value: \"object\": Conversion must be specified when multiple versions exist"}

Steps To Reproduce

  1. Create CRD with multiple versions.
  2. Publish it.
  3. See api-syncagent fail.

Expected Behaviour

We should select the actively served version and publish that.

Additional Context

No response

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions