Skip to main content
Version: v0.3.x

WebApplicationBinding

A WebApplicationBinding represents the deployment of a WebApplication to a specific Environment in OpenChoreo. It binds a WebApplication component to an environment, creating the actual runtime instances. WebApplicationBindings contain environment-specific configurations including the workload specification. They control the lifecycle of the deployed web application.

API Version​

openchoreo.dev/v1alpha1

Resource Definition​

Metadata​

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

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

Spec Fields​

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

WebApplicationOwner​

FieldTypeRequiredDefaultDescription
projectNamestringYes-Name of the project that owns this web application binding
componentNamestringYes-Name of the component that owns this web application 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. Supports template variables provided by the connection type

ReleaseState​

ValueDescription
ActiveResources are deployed normally to the data plane
SuspendResources are suspended (scaled to zero or paused)
UndeployResources are removed from the data plane

Status Fields​

FieldTypeDefaultDescription
conditions[]Condition[]Standard Kubernetes conditions tracking the binding state
endpoints[EndpointStatus][]Status information for each endpoint

EndpointStatus​

FieldTypeDefaultDescription
namestring""Endpoint identifier matching spec.endpoints
typestring""Type of the endpoint
projectEndpointAccess-Access info for project-level visibility
organizationEndpointAccess-Access info for organization-level visibility
publicEndpointAccess-Access info for public visibility

EndpointAccess​

FieldTypeDefaultDescription
hoststring""Hostname or service name
portint320Port number
schemestring""Connection scheme (http, https)
basePathstring""Base URL path (for HTTP-based endpoints)
uristring""Computed URI for connecting to the endpoint (e.g., https://api.example.com:8080/v1)

Examples​

Basic WebApplicationBinding​

apiVersion: openchoreo.dev/v1alpha1
kind: WebApplicationBinding
metadata:
name: frontend-app-prod-binding
namespace: default
spec:
owner:
projectName: my-project
componentName: frontend
environment: production
className: default
workloadSpec:
containers:
main:
image: myregistry/frontend:v2.0.0
env:
- key: API_URL
value: https://api.production.example.com
- key: ENVIRONMENT
value: production
endpoints:
http:
type: HTTP
port: 3000

WebApplicationBinding with Connections​

apiVersion: openchoreo.dev/v1alpha1
kind: WebApplicationBinding
metadata:
name: admin-dashboard-staging-binding
namespace: default
spec:
owner:
projectName: my-project
componentName: admin-ui
environment: staging
className: production-webapp
workloadSpec:
containers:
main:
image: myregistry/admin-dashboard:v1.5.0-rc2
env:
- key: LOG_LEVEL
value: debug
endpoints:
web:
type: HTTP
port: 8080
connections:
backend-api:
type: api
params:
projectName: my-project
componentName: admin-backend
endpoint: http-endpoint
inject:
env:
- name: BACKEND_URL
value: "{{ .host }}:{{ .port }}"
auth-service:
type: api
params:
projectName: my-project
componentName: auth-service
endpoint: http-endpoint
inject:
env:
- name: AUTH_HOST
value: "{{ .host }}"
- name: AUTH_PORT
value: "{{ .port }}"

Annotations​

WebApplicationBindings support the following annotations:

AnnotationDescription
openchoreo.dev/display-nameHuman-readable name for UI display
openchoreo.dev/descriptionDetailed description of the web application binding
  • WebApplication - WebApplication resources that WebApplicationBindings deploy
  • Environment - Environments where web applications are bound
  • Release - Releases created by WebApplicationBindings
  • Workload - Workload specifications used in bindings