Skip to main content
Version: Next

ReleaseLine

A ReleaseLine is a named series of releases of one Component that evolves independently of the component's other lines. Each line has its own Workload, its own ComponentReleases, and at most one ReleaseBinding per Environment. Values set on a line are layered on top of the component's spec for that line only.

Every component also has an implicit main line, which has no ReleaseLine: resources that leave spec.owner.releaseLine empty belong to it. See Release Lines.

API Version​

openchoreo.dev/v1alpha1

Resource Definition​

Metadata​

ReleaseLines are namespace-scoped. The name is the line name. It is unique within the namespace and at most 63 characters long. It cannot be main, which is the component's implicit line, or default, which is reserved.

apiVersion: openchoreo.dev/v1alpha1
kind: ReleaseLine
metadata:
name: <line-name>
namespace: <namespace>

Short names: rl, rls.

Spec Fields​

FieldTypeRequiredDefaultDescription
ownerReleaseLineOwnerYes-The component this line belongs to. Immutable
autoDeploybooleanNo-Overrides the component's autoDeploy for this line
parametersobjectNo-Deep-merged onto the component's parameters for this line. Maps merge key by key. Scalars and lists replace
traits[ComponentTrait]No[]Merged onto the component's traits by kind, name, and instanceName. A matching trait has its parameters deep-merged, and a new trait is appended
workflowReleaseLineWorkflowNo-Overrides of the component's build configuration for this line

ReleaseLineOwner​

FieldTypeRequiredDefaultDescription
projectNamestringYes-Name of the project that owns the component (min: 1)
componentNamestringYes-Name of the component (min: 1)

ReleaseLineWorkflow​

The workflow kind and name are shared by every line of the component.

FieldTypeRequiredDefaultDescription
parametersobjectNo-Deep-merged onto the component's workflow.parameters for this line, typically to build from a different branch

Status Fields​

FieldTypeDefaultDescription
observedGenerationinteger0The generation observed by the controller
conditions[]Condition[]Standard Kubernetes conditions tracking the line's state
latestReleaseLatestRelease-The most recent ComponentRelease created for this line by autoDeploy
environments[ReleaseLineEnvironment][]The line's ReleaseBindings, one per environment it is deployed to

ReleaseLineEnvironment​

FieldTypeDescription
environmentstringName of the environment
releaseBindingstringName of the line's ReleaseBinding in the environment
releasestringThe ComponentRelease bound in the environment
readybooleanWhether the ReleaseBinding is Ready

Condition Types​

Ready reports the line's state. Its reasons:

ReasonStatusMeaning
ComponentReleaseReadyTrueThe line's latest release is bound in the first environment
ReconciledTrueThe line was validated. autoDeploy is off for the line
ComponentNotFoundFalseThe owning Component does not exist
InvalidConfigurationFalseThe line, or the component with the line's overrides applied, is invalid
WorkloadNotFoundFalseThe line has no Workload yet
TraitNotFoundFalseA trait the line uses does not exist
AutoDeployFailedFalseThe line's release or binding could not be created or updated

Ready also carries the component's own reasons, such as ComponentTypeNotFound, WorkflowNotFound, or DeploymentPipelineNotFound, when the component with the line's overrides applied fails the same checks.

Resources of a Line​

Workloads, ComponentReleases, and ReleaseBindings belong to a line through spec.owner.releaseLine, which is immutable. Leave it empty for the main line.

ResourceFieldConventional name
Workloadspec.owner.releaseLine<component>-<line>-<line hash>-workload
ComponentReleasespec.owner.releaseLine<component>-<line>-<line hash>-<hash>
ReleaseBindingspec.owner.releaseLine<component>-<line>-<line hash>-<environment>

The line hash depends only on the component and the line, for example hello-next-4833a175-workload, so a line's names never take those of another component. The table shows the name of a ComponentRelease that autoDeploy creates. One created with occ component deploy, the API, or occ componentrelease generate is named <component>-<line>-<line hash>-<date>-<n>.

Deleting a ReleaseLine undeploys it from every environment and deletes its ReleaseBindings, ComponentReleases, Workload, and WorkflowRuns. Deleting the Component deletes its ReleaseLines.

Examples​

Line That Uses the Component as It Is​

apiVersion: openchoreo.dev/v1alpha1
kind: ReleaseLine
metadata:
name: canary
namespace: default
spec:
owner:
projectName: default
componentName: hello

Line That Builds From Another Branch​

apiVersion: openchoreo.dev/v1alpha1
kind: ReleaseLine
metadata:
name: next
namespace: default
spec:
owner:
projectName: default
componentName: hello
autoDeploy: true
workflow:
parameters:
repository:
revision:
branch: "next"
traits:
- kind: ClusterTrait
name: health-probes
instanceName: health
parameters:
readiness:
enabled: true
handler:
httpGet:
path: /readyz
port: 9090

Usage​

# List the lines of a component
occ component releaseline list hello --namespace default

# Show one line and its status per environment
occ component releaseline get hello next --namespace default

# Create or update lines
occ apply -f release-lines.yaml

# Delete a line
occ component releaseline delete hello next --namespace default

The OpenChoreo API serves a component's lines at /api/v1/namespaces/{namespace}/components/{component}/releaselines. The first page of a list without a label selector starts with main. POST on that path creates a line. GET, PUT, and DELETE on /releaselines/{line} read, replace, and delete one. main can be read but not created, replaced, or deleted. Listing and reading need the releaseline:view action, and creating, replacing, and deleting need releaseline:create, releaseline:update, and releaseline:delete.