Skip to main content
Version: v0.3.x

Environment

An Environment represents a runtime context (e.g., dev, test, staging, production) where workloads are deployed and executed. Environments define deployment targets within a DataPlane and control environment-specific configurations like gateway settings and production flags.

API Version​

openchoreo.dev/v1alpha1

Resource Definition​

Metadata​

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

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

Spec Fields​

FieldTypeRequiredDefaultDescription
dataPlaneRefstringNo"default"Reference to the DataPlane where this environment is deployed
isProductionbooleanNofalseIndicates if this is a production environment
gatewayGatewayConfigNo-Gateway configuration specific to this environment

GatewayConfig​

FieldTypeRequiredDefaultDescription
dnsPrefixstringNo""DNS prefix for the environment (e.g., "dev" for dev.example.com)
security.remoteJwks.uristringNo""URI for remote JWKS endpoint for JWT validation

Status Fields​

FieldTypeDefaultDescription
observedGenerationinteger0The generation observed by the controller
conditions[]Condition[]Standard Kubernetes conditions tracking the environment state

Condition Types​

Common condition types for Environment resources:

  • Ready - Indicates if the environment is fully provisioned and ready
  • DataPlaneConnected - Indicates if the environment is connected to its DataPlane
  • GatewayConfigured - Indicates if gateway configuration has been applied

Examples​

Development Environment​

apiVersion: openchoreo.dev/v1alpha1
kind: Environment
metadata:
name: development
namespace: default
spec:
dataPlaneRef: dev-dataplane
isProduction: false
gateway:
dnsPrefix: dev
security:
remoteJwks:
uri: https://auth.example.com/.well-known/jwks.json

Production Environment​

apiVersion: openchoreo.dev/v1alpha1
kind: Environment
metadata:
name: production
namespace: default
spec:
dataPlaneRef: prod-dataplane
isProduction: true
gateway:
dnsPrefix: api
security:
remoteJwks:
uri: https://auth.example.com/.well-known/jwks.json

Annotations​

Environments support the following annotations:

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