Skip to main content
Version: Next

WebApplicationClass

A WebApplicationClass is a platform-level template that provides governance and standardization for WebApplication resources in OpenChoreo. It follows the Claim/Class pattern where platform teams define Classes to enforce organizational policies, resource limits, and deployment configurations while application teams create WebApplications (claims) that reference these classes.

API Version

openchoreo.dev/v1alpha1

Resource Definition

Metadata

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

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

Spec Fields

FieldTypeRequiredDefaultDescription
deploymentTemplateDeploymentSpecNo-Kubernetes Deployment specification template for web application workloads
serviceTemplateServiceSpecNo-Kubernetes Service specification template for web application networking

Examples

Basic WebApplicationClass

apiVersion: openchoreo.dev/v1alpha1
kind: WebApplicationClass
metadata:
name: standard-webapp
namespace: default
spec:
deploymentTemplate:
replicas: 3
selector:
matchLabels:
app: webapp
template:
spec:
containers:
- name: main
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1000m"
serviceTemplate:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
protocol: TCP

Annotations

WebApplicationClasses support the following annotations:

AnnotationDescription
openchoreo.dev/display-nameHuman-readable name for UI display
openchoreo.dev/descriptionDetailed description of the WebApplicationClass