Skip to main content
Version: v0.3.x

ScheduledTaskBinding

A ScheduledTaskBinding represents the deployment of a ScheduledTask to a specific Environment in OpenChoreo. It binds a ScheduledTask component to an environment, creating the actual runtime instances for scheduled jobs. ScheduledTaskBindings contain environment-specific configurations including the workload specification and scheduling parameters. They control the lifecycle of the deployed scheduled task.

API Version​

openchoreo.dev/v1alpha1

Resource Definition​

Metadata​

ScheduledTaskBindings are namespace-scoped resources that must be created within an Organization's namespace.

apiVersion: openchoreo.dev/v1alpha1
kind: ScheduledTaskBinding
metadata:
name: <scheduledtaskbinding-name>
namespace: <org-namespace> # Organization namespace

Spec Fields​

FieldTypeRequiredDefaultDescription
ownerScheduledTaskOwnerYes-Ownership information linking the binding to a project and component
environmentstringYes-Target environment for this binding
classNamestringNo"default"Name of the ScheduledTaskClass that provides deployment configuration
workloadSpecWorkloadTemplateSpecYes-Workload specification for this environment
releaseStateReleaseStateNo"Active"Controls the deployment state of the release

ScheduledTaskOwner​

FieldTypeRequiredDefaultDescription
projectNamestringYes-Name of the project that owns this scheduled task binding
componentNamestringYes-Name of the component that owns this scheduled task binding

WorkloadTemplateSpec​

The WorkloadTemplateSpec contains the same fields as the Workload spec, allowing environment-specific configuration.

FieldTypeRequiredDefaultDescription
containersmap[string]ContainerYes-Container specifications keyed by container name. Must have at least one container with the key "main"
endpointsmap[string]WorkloadEndpointNoNetwork endpoints for port exposure keyed by endpoint name
connectionsmap[string]WorkloadConnectionNoConnections to internal/external resources keyed by connection name

ReleaseState​

ValueDescription
ActiveResources are deployed normally to the data plane
SuspendResources are suspended (scheduled job is paused)
UndeployResources are removed from the data plane

Examples​

Basic ScheduledTaskBinding​

apiVersion: openchoreo.dev/v1alpha1
kind: ScheduledTaskBinding
metadata:
name: data-cleanup-prod-binding
namespace: default
spec:
owner:
projectName: my-project
componentName: data-cleanup
environment: production
className: default
workloadSpec:
containers:
main:
image: myregistry/data-cleanup:v1.2.0
env:
- key: RETENTION_DAYS
value: "30"
- key: LOG_LEVEL
value: info

Annotations​

ScheduledTaskBindings support the following annotations:

AnnotationDescription
openchoreo.dev/display-nameHuman-readable name for UI display
openchoreo.dev/descriptionDetailed description of the scheduled task binding
  • ScheduledTask - ScheduledTask resources that ScheduledTaskBindings deploy
  • Environment - Environments where scheduled tasks are bound
  • Release - Releases created by ScheduledTaskBindings
  • Workload - Workload specifications used in bindings