Skip to content

[Addon]: add open-component-model operator as source for deliverables - #808

Open
Skarlso wants to merge 3 commits into
kubevela:masterfrom
Skarlso:open-component-model-addon
Open

Skarlso wants to merge 3 commits into
kubevela:masterfrom
Skarlso:open-component-model-addon

Conversation

@Skarlso

@Skarlso Skarlso commented Nov 10, 2026 •

Copy link
Copy Markdown

Description of your changes

Hello! We at https://ocm.software find Vela a perfect fit for our ecosystem and would like to integrate with it as much as we can. :) There is a discussion about Vela + OCM + other tools that do life-cycle management and work in the same general area of delivering and running software.

OCM sits at the front. It has the ability to package and transfer components for Vela to work with!

We would like to add this experimental extension and see how the community can work with it. :)

Here is the discussion: kubevela/kubevela#7522 where you can read more.

Thanks!

Fixes #822

How has this code been tested?

I created a kind cluster, installed vela and then run what the README said. Checked health status and ran the README demo with ocm-k8s-toolkit 0.23.0.

➜  catalog git:(open-component-model-addon) k get components -A -owide
NAMESPACE   NAME      READY                    AGE
default     ocm-cli   Applied version 0.23.0   61m
➜  catalog git:(open-component-model-addon) k get resources -A -owide
NAMESPACE   NAME            READY                    AGE
default     ocm-cli-image   Applied version 0.23.0   61m
➜  catalog git:(open-component-model-addon)

...

➜  catalog git:(open-component-model-addon) vela status ocm-cli-demo
About:

  Name:         ocm-cli-demo
  Namespace:    default
  Created at:   2026-11-10 11:29:27 +0100 CET
  Healthy:      ✅
  Details:      running

Checklist

I have:

  • Title of the PR starts with type (e.g. [Addon] , [example] or [Doc]).
  • Updated/Added any relevant documentation and examples.
  • New addon should be put in experimental.
  • Update addon should modify the version in metadata.yaml to generate a new version.

Verified Addon promotion rules

If this pr wants to promote an experimental addon to verified, you must check whether meet these conditions too:

  • This addon must be tested by addon's e2e-test to guarantee this addon can be enabled successfully.
  • This addon must have some basic but necessary information.
    • An accessible icon url and source url defined in addon's metadata.yaml.
    • A detail introduction include a basic example about how to use and what's the benefit of this addon in README.md.
    • Also provide an introduction in KubeVela documentation.
    • It's more likely to be accepted if useful examples provided in example dir.

Summary by cubic

Adds an experimental open-component-model addon that makes Open Component Model (OCM) component versions consumable as KubeVela deliverables.

  • Installs the OCM controller via Helm chart, with configurable namespace and Helm values.
  • Adds ocm-component and ocm-resource component definitions that resolve component versions and their verified, digest-pinned resources.
  • Includes an example application that runs the OCM CLI image using the verified image reference.
  • Requires KubeVela v1.11.0+ for the native helmchart component.

Written for commit ea45fda. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.

View guided diff | Re-trigger cubic

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>

@briankane briankane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a million @Skarlso, it's great to see OCM land here, and the definitions line up nicely with the 0.23.0 CRDs. The health and status policies behave as I'd hope too (I ran them against a few fake statuses).

One blocker, I'm afraid. The error() guards in parameter.cue break vela addon enable on KubeVela 1.11. Before installing, the addon loader turns parameter.cue into an OpenAPI schema, and on 1.11 the CUE OpenAPI encoder can't handle error():

components.schemas.parameter.properties.values.properties.nameOverride.enum.0: nameOverride is not supported: ...

I checked on a 1.11.2 cluster and the enable stops before anything is installed. Your guard is the right idea, so that's on us: kubevela/kubevela#7679 is to treat error() fields as forbidden in the schema and never let the schema block an enable, backported to 1.11. Until that ships, the addon says >=v1.11.0, so it has to work on today's 1.11. Heads up that the catalog CI only enables changed addons under addons/, so it never ran this one, which is why it's green. Inline there's a version that forces fullnameOverride instead. With that, nameOverride is harmless, and I checked it generates on both 1.11 and master. Once kubevela/kubevela#7679 is out you could go back to error() if you prefer it.

On your two replies to cubic: agreed on both. additionalStatusFields is free JSON in the CRD, and pinning the release name is the right call. On 1.11 the helmchart health check needs name set anyway, since it errors without one (fixed on master).

A few smaller things:

  • Could you open an issue for the addon and link the discussion? It's how we track new addons.
  • The addon version is the toolkit version, so how would you ship an addon-only fix? I'd be grand with the addon having its own version, or 0.23.0-1 style, whatever you prefer, as long as we agree it up front.
  • cue fmt wants a couple of whitespace tweaks in ocm-resource.cue and controller.cue.

Happy to approve once the parameter fix is in. Thanks again, really nice addition.

Comment on lines +5 to +10
values?: {
// Both rename the controller Deployment, which the addon health check looks up by name.
nameOverride?: error("nameOverride is not supported: the addon health check needs the default Deployment name")
fullnameOverride?: error("fullnameOverride is not supported: the addon health check needs the default Deployment name")
...
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On KubeVela 1.11 the addon loader generates an OpenAPI schema from this file before enabling, and the encoder fails on error(), so vela addon enable stops with fail to generate openAPIschema. How about forcing the name rather than rejecting the field? Something like:

values?: {
	// The addon health check looks the controller Deployment up by this name.
	fullnameOverride?: "ocm-k8s-toolkit"
	...
}

With fullnameOverride always set (see controller.cue), the Deployment is ocm-k8s-toolkit-controller-manager whatever nameOverride says, so that one can go through.

Comment on lines +15 to +17
if parameter.values != _|_ {
values: parameter.values
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pairs with the parameter.cue change:

values: {
	if parameter.values != _|_ {
		parameter.values
	}
	fullnameOverride: "ocm-k8s-toolkit"
}

Comment on lines +18 to +19
// I needed to add this for the health reporting to work properly once the release is applied.
// The name was needed because vela 1.11.1 did not use the match criteria without this being set.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small one: could this say the rule rather than the history? e.g. "KubeVela 1.11's helmchart health check needs the resource name; the release name is fixed so this one is stable."

@@ -0,0 +1,16 @@
name: open-component-model
version: 0.23.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the toolkit version, what would an addon-only fix bump to? Fine by me to decouple it, just want to agree it before the first release.

// +usage=Whether to verify the resource digest
verificationPolicy: *"Always" | "Never"
// +usage=CEL expressions evaluated against the resource, published under status.additional, for example {image: "resource.access.imageReference"}
additionalStatusFields?: {...}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with your reply to cubic, the CRD takes free JSON. If you fancy it, [string]: string matches how it's used (CEL strings) and gives VelaUX a nicer form. Not a blocker.

// +usage=How often the repository is checked for new component versions
interval: *"10m" | string
// +usage=References to secrets or config maps with OCM configuration, such as credentials
ocmConfig?: [...{...}]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: typing this as [...{kind: "Secret" | "ConfigMap" | ..., name: string, apiVersion?: string, namespace?: string, policy?: *"Propagate" | "DoNotPropagate"}] would show the shape in vela show and VelaUX.

@Skarlso

Skarlso commented Nov 22, 2026

Copy link
Copy Markdown
Author

@briankane nice, thanks so much Brian! :) I will address these comments! :)

@Skarlso

Skarlso commented Nov 22, 2026

Copy link
Copy Markdown
Author

@briankane hey Brian. I created the issue, just unsure if it's at the right location. :) Please tell me if I should move it to kubevela/kubevela instead. :)

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso

Skarlso commented Nov 22, 2026

Copy link
Copy Markdown
Author

The addon version is the toolkit version, so how would you ship an addon-only fix? I'd be grand with the addon having its own version, or 0.23.0-1 style, whatever you prefer, as long as we agree it up front.

Good call! I versioned it 0.1.0 in the end if that's okay. :)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

View guided diff | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso
Skarlso force-pushed the open-component-model-addon branch from 8a3dfd7 to ea45fda Compare November 22, 2026 20:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/new-addon Adds a new addon issue-required PR has no linked issue type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Addon] Add open-component-model as an experimental addon

2 participants