Resource Type
A ResourceType is to managed infrastructure what a ComponentType is to code. It's the template a developer references when they declare a Resource — a database, a queue, a cache — and it governs how that infrastructure is provisioned on the data plane and what it exposes back to consuming Workloads.
A ClusterResourceType is the cluster-scoped variant. The platform ships example
ClusterResourceTypes (postgres, valkey, nats) backed by in-cluster StatefulSets — fine for
development, but for production you author your own targeting a real provisioner (Crossplane, a
cloud operator).
| Kind | ResourceType / ClusterResourceType |
| API group | openchoreo.dev/v1alpha1 |
| Scope | Namespaced / Cluster |
| Audience | Platform engineer |
| Referenced by | Resource (spec.type) |
Key spec fields
| Field | What it does |
|---|---|
spec.parameters.openAPIV3Schema | Developer-set values captured in the immutable ResourceRelease |
spec.environmentConfigs.openAPIV3Schema | Per-environment overrides via the binding (memory, storage size) |
spec.resources[] | The Kubernetes manifests the provisioner emits, rendered with CEL (includeWhen, readyWhen) |
spec.outputs[] | Named values (host, port, password) consuming workloads bind into containers |
spec.retainPolicy | Default deletion behavior — Delete or Retain |
Outputs are the whole reason a ResourceType is useful — each has a unique name and one
source: value (non-sensitive), secretKeyRef (credentials — only the {name,key} pointer
leaves the data plane), or configMapKeyRef.
Create in the portal
- Open Create… → Platform Resources → ClusterResourceType (or ResourceType for namespace scope).
- In the in-portal YAML editor, define the parameter / environment schemas, the
resources, theoutputs, andretainPolicy. - Click Create. Developers can now declare a Resource of this type.
Full guide: Resource types.
Example
A valkey-cache ResourceType exposing host, port, and password:
apiVersion: openchoreo.dev/v1alpha1
kind: ResourceType
metadata:
name: valkey-cache
namespace: fedshi
spec:
parameters:
openAPIV3Schema:
type: object
properties:
version: { type: string, enum: ["7", "8"], default: "8" }
environmentConfigs:
openAPIV3Schema:
type: object
properties:
memory: { type: string, default: "128Mi" }
retainPolicy: Delete
outputs:
- name: host
value: "${metadata.name}.${metadata.namespace}.svc.cluster.local"
- name: port
value: "6379"
- name: password
secretKeyRef: # credential stays on the data plane
name: "${metadata.name}-creds"
key: password
resources:
- id: statefulset
# … StatefulSet template rendered with CEL …
See also
- Resource types (authoring guide) — outputs, retention, the CEL surface.
- Resource — what a developer declares against this type.
- Trait — when to overlay a capability instead of provisioning infrastructure.
- Upstream: authoring ResourceTypes.