#7414·kubevela

[Feature] CEL expressions in Application properties

Author: briankaneCreated Sep 29, 2026Updated Sep 29, 2026
Labelstype/feature

Is there an existing issue for this?

  • I have searched the existing issues

What problem or limitation does this address?

Application properties are static. Anything dynamic has to be solved somewhere else:

  • External data (a registry host, a config value, a secret-backed setting) means a custom definition that reads it in CUE, or templating the Application before it's applied.
  • One component's output in another means outputs/inputs: the producer declares every value up front, a value lands whole in one parameter (you can't build postgres://<host>:5432/orders from it), and what it means depends on the workflow's shape.
  • Basic context (the app's name, namespace, cluster) is only available inside definition templates, not to the person writing the Application.

Describe the solution you'd like

Inline expressions in Application fields, written $( ... ) and evaluated with CEL:

yaml
components:
  - name: api
    type: webservice
    properties:
      image: '$(source.registry.data["image"]):v1'
      env:
        - name: DATABASE_URL
          value: 'postgres://$(component.db.output.status.endpoint):5432/$(context.appName)'

Three roots:

Root Reads
context the app's name, namespace, cluster and so on
source.<name> external data fetched by a new SourceDefinition CRD, with a declared schema
component.<name> another component's live output, beside the reader or at a named .cluster() / .namespace()

Where they're allowed: component and trait properties, policies, and workflow step properties, each surface offering only the roots that make sense there.

What it should guarantee:

  • Off by default. A feature gate, plus a per-Application opt-in annotation (app.oam.dev/cel-expressions: "true"), so existing apps whose text happens to contain $( are untouched. $$( escapes a literal.
  • Checked at admission without side effects. Expressions are type-checked against the source's schema and the parameter they feed, without fetching anything.
  • Reads between components are dependencies. A read orders its reader after the producer the way dependsOn does, and shows up in the Application's status.
  • Dry-run still works. Values only known at runtime render as placeholders.
  • One engine. The CEL engine lives in kubevela/pkg, so the workflow engine and other controllers can use the same expressions (for example forEach items in a workflow step).

Alternatives considered

  • More CUE in definitions. Works for platform authors, but puts every dynamic value behind a new definition, and application authors can't use it directly.
  • Extending outputs/inputs. Keeps the declare-everything-up-front model and the workflow-shape dependence.
  • External templating (Helm, Kustomize) before apply. Loses the live values the controller has at render time, and runs outside KubeVela's validation.

Additional context

Design: KEP-2.16, design/vela-core/keps/2.16-source-definition.

Repos involved: kubevela, kubevela/pkg (shared engine), velaux (display). Docs to follow in kubevela.io.

Related PRs:

  • kubevela/kubevela#7371 SourceDefinition and the $( ) syntax
  • kubevela/kubevela#7389 Type-check expressions from the schema at admission instead of resolving them
  • kubevela/kubevela#7397 Read another component's output with component.<name>
  • kubevela/kubevela#7396 forEach workflow steps with items from expressions
  • kubevela/pkg#143 Root-agnostic CEL engine for $( ) expressions
  • kubevela/kubevela#7398 Run property expressions on the kubevela/pkg engine
  • kubevela/velaux#942 Show a component's dependencies, marking those from expressions