Component
A Component is a deployable unit of software — a service, a web app, a worker, a scheduled job. It belongs to a Project and, by picking a ComponentType, accepts a workload shape and a set of configurable parameters. A component can attach Traits for extra capabilities and reference a Workflow to build itself from source.
Each change to a component (or its Workload) is snapshotted into an immutable ComponentRelease — the unit you deploy and promote.
| Kind | Component (short: comp) |
| API group | openchoreo.dev/v1alpha1 |
| Scope | Namespaced |
| Audience | Developer |
| Parent | Project (spec.owner.projectName) |
| Selects | ComponentType, Traits, a Workflow |
| Produces | Workload, ComponentRelease |
Where it sits
Project
└── Component ← you are here
├── Workload → Endpoint
└── ComponentRelease → ReleaseBinding → RenderedRelease
Key spec fields
| Field | Description |
|---|---|
spec.owner.projectName | The project this component belongs to (immutable) |
spec.componentType.kind | ComponentType or ClusterComponentType |
spec.componentType.name | workloadType/name, e.g. deployment/web-service |
spec.parameters | Values for the ComponentType's parameter schema, captured in every release |
spec.traits[] | Attached traits — name, kind, instanceName, parameters |
spec.workflow | The build Workflow (must be in the ComponentType's allowedWorkflows) |
spec.autoDeploy | When true, each new release is bound to the first environment automatically |
Create in the portal
Components are created with the Create Component wizard:
- Open Create… → Application Resources → Component.
- General — name the component (e.g.
shortener-api) and select its Project (url-shortener) and a ComponentType (e.g.deployment/web-service). - Build & Deploy — choose Build from Source (point at the repo) or Container Image (a prebuilt image), and set args / env vars.
- Service Details — add the endpoints the component exposes and their visibility.
- Click Create. With
autoDeployon, the first release binds to the first environment automatically.
Prefer YAML/GitOps? See the Example below, or Projects and components.
Example
apiVersion: openchoreo.dev/v1alpha1
kind: Component
metadata:
name: cart-api
namespace: fedshi
spec:
owner:
projectName: checkout
componentType:
kind: ClusterComponentType
name: deployment/web-service
parameters:
replicas: 2
traits:
- name: autoscaler
kind: ClusterTrait
instanceName: hpa
parameters:
maxReplicas: 5
autoDeploy: true
The component can only attach Traits the ComponentType lists in allowedTraits, and only build
with Workflows in allowedWorkflows — a disallowed reference stops the component in a
WorkflowNotAllowed state.
See also
- Projects and components (developer view).
- Workload — the runtime contract a component defines.
- Component type · Trait · Workflow
- Upstream field-level API reference.