Component Type
A ComponentType is the template a developer picks when they create a Component — and by picking it, they accept the workload shape, the configurable parameters, the Kubernetes resources that get generated, and the builders they may use. It's the single most important thing a platform engineer authors: the ComponentType is the golden path.
A ClusterComponentType is the cluster-scoped variant — same spec, visible to every organization namespace. The platform's defaults ship as ClusterComponentTypes.
| Kind | ComponentType / ClusterComponentType |
| API group | openchoreo.dev/v1alpha1 |
| Scope | Namespaced / Cluster |
| Audience | Platform engineer |
| Referenced by | Component (spec.componentType) |
| Gates | Traits (allowedTraits), Workflows (allowedWorkflows) |
Key spec fields
| Field | What it does |
|---|---|
spec.workloadType | The primary Kubernetes resource: deployment, statefulset, cronjob, job, or proxy |
spec.parameters.openAPIV3Schema | What a developer sets once per release — identical in every environment |
spec.environmentConfigs.openAPIV3Schema | What can be overridden per environment via a ReleaseBinding |
spec.resources[] | The Kubernetes manifests generated from the above, via CEL templating (forEach, includeWhen, var) |
spec.allowedTraits[] | Which Traits developers may attach |
spec.allowedWorkflows[] | Which build Workflows developers may use |
The parameters vs environmentConfigs split is what makes "build once, promote everywhere" work: parameters are captured in the immutable release; environment configs differ per environment while the release snapshot stays byte-for-byte identical.
Create in the portal
ComponentTypes are authored as YAML in the in-portal editor:
- Open Create… → Platform Resources → ClusterComponentType (cluster-wide) or ComponentType (namespace-scoped).
- The in-portal YAML editor opens seeded with the kind. Fill in
workloadType, the parameter and environment schemas, the resource templates, andallowedTraits/allowedWorkflows. - Click Create. The new type then appears as an option in the Create Component wizard.
Authoring is schema + CEL work — there's no no-YAML wizard. Full guide: Component types.
Example
A trimmed web-service ClusterComponentType — a Deployment plus an HTTPRoute per external endpoint:
apiVersion: openchoreo.dev/v1alpha1
kind: ClusterComponentType
metadata:
name: web-service # cluster-scoped: no metadata.namespace
spec:
workloadType: deployment
allowedTraits:
- kind: ClusterTrait
name: autoscaler
allowedWorkflows:
- kind: ClusterWorkflow
name: dockerfile-builder
parameters:
openAPIV3Schema:
type: object
properties:
replicas: { type: integer, default: 1, minimum: 1 }
environmentConfigs:
openAPIV3Schema:
type: object
properties:
resources:
type: object
properties:
cpu: { type: string, default: "100m" }
memory: { type: string, default: "256Mi" }
resources:
- id: deployment
template:
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${metadata.componentName}
namespace: ${metadata.namespace}
spec:
replicas: ${parameters.replicas}
# … containers, resources from ${environmentConfigs.resources.*} …
A ClusterComponentType is cluster-scoped, so its manifest must not set metadata.namespace.
See also
- Component types (authoring guide) — schema, CEL templating, validation.
- Trait · Workflow · Component
- Upstream: authoring ComponentTypes · CEL reference.