Skip to content

environment conflates logical environment with physical deployment target #310

Description

@xibz

Observation

Looking at the environment events (environmentCreated, environmentModified, environmentDeleted), the current model for an environment is:

  • id: a stable identifier
  • name: a human-readable label
  • uri: an address pointing to the environment (created/modified only)

The presence of uri reveals the underlying assumption: an environment is treated as a physical, addressable deployment target, something like a cluster endpoint or a namespace URL. This conflates two distinct concepts:

  1. Logical environment: an abstract tier in a delivery pipeline: prod, nonprod, staging. This is what most people mean when they say "environment" in
    the context of software delivery.
  2. Deployment target: the concrete infrastructure being deployed to: a Kubernetes cluster, a cloud region, a namespace. This is what id + uri are actually describing.

Why this matters

These two concepts don't map 1:1:

  • Multiple deployment targets can belong to the same logical environment (e.g. us-east-1-prod and eu-west-1-prod are both prod).
  • A single deployment target can serve multiple logical environments depending on context (e.g. a shared cluster with prod and staging namespaces).
  • Many CD tools only know one or the other, but they know which cluster they deployed to, or they know the environment label, but not both.

The current schema forces a single unified concept where there should be two, and requiring id assumes a stable identifier exists for the environment when often only a label does.

Proposal

Clarify whether environment in CDEvents is meant to represent the logical tier, the physical target, or both, and consider whether these should be separate concepts in the spec.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions