Resource
A Resource is a declared dependency on managed infrastructure — a database, a cache, a queue, an object store. It's a thin reference to a ResourceType (which governs how the infrastructure is provisioned) plus the parameters a developer is allowed to set. A Workload consumes a Resource by binding its declared outputs (host, port, password) into the container as environment variables or files.
Like a component, a Resource is snapshotted into an immutable ResourceRelease, which a ResourceReleaseBinding renders into each environment.
| Kind | Resource (short: res) |
| API group | openchoreo.dev/v1alpha1 |
| Scope | Namespaced |
| Audience | Developer |
| Parent | Project (spec.owner.projectName) |
| Selects | ResourceType (spec.type) |
| Consumed by | Workloads via dependencies.resources[] |
Where it sits
Project
└── Resource ← you are here
└── ResourceRelease → ResourceReleaseBinding → RenderedRelease
Key spec fields
| Field | Description |
|---|---|
spec.owner.projectName | The project this resource belongs to |
spec.type.kind | ResourceType or ClusterResourceType |
spec.type.name | The resource-type template name, e.g. valkey-cache |
spec.parameters | Values for the ResourceType's parameter schema (engine version, size class, …) |
Create in the portal
- Open Create… → Application Resources → Resource.
- Name it (e.g. the url-shortener cache), select the Project (
url-shortener), and pick the ResourceType (e.g. a Redis/Valkey cache type). - Set the parameters the type exposes (engine version, size class).
- Click Create. Then bind its outputs into a component under the workload's dependencies (see the consuming Workload).
Prefer YAML/GitOps? See the Example below, or Dependencies.
Example
apiVersion: openchoreo.dev/v1alpha1
kind: Resource
metadata:
name: cart-cache
namespace: fedshi
spec:
owner:
projectName: checkout
type:
kind: ResourceType
name: valkey-cache
parameters:
version: "8"
A workload then binds the outputs by name — the developer never sees the StatefulSet, the Secret, or the connection string:
# in the consuming Workload
spec:
dependencies:
resources:
- ref: cart-cache
envBindings:
host: REDIS_HOST
port: REDIS_PORT
password: REDIS_PASSWORD # secret-backed; only the {name,key} pointer transits the control plane
See also
- Resource type — the template a Resource references.
- Dependencies (developer view) — wiring resource outputs into a workload.
- Release binding — how a resource is rendered per environment.
- Upstream field-level API reference.