Skip to main content

Deployment

API Group: environments.blanketops.dev

Version: v1alpha1

Scope: Namespaced


Description

Deployment defines the governed runtime projection of one or more ServiceUnits.

It binds resolved workload contracts to a runtime substrate and reconciliation strategy.

  • Deployment does not build artifacts.
  • Deployment does not expose traffic.
  • Deployment governs runtime state projection.

Spec

spec

FieldTypeRequiredDescription
contractobjectYesRuntime projection contract

spec.contract

FieldTypeRequiredDescription
serviceUnitsstring[]YesNames of ServiceUnit resources to deploy
runtimestringYesRuntime substrate identifier
strategystringYesRollout strategy: Rolling, BlueGreen, or Canary
imageAutomationbooleanNoWhether image updates are automatically reconciled
gitOwnerstringNoOwning Git organisation or user
reconciliationStrategystringYes, if manifestsRepo is setStrategy used to reconcile manifests: kustomize or helm. Must be absent if manifestsRepo is not set — defaults to imperative reconciliation
manifestsRepoobjectNoGit repository containing runtime manifests

spec.contract.manifestsRepo

FieldTypeRequiredDescription
urlstringYesGit repository URL containing manifests
cloneSecretstringNoSecret used for Git authentication
strategystringYesReconciliation strategy (e.g. kustomization)
pathstringYesPath within repository to manifests

Status

FieldTypeDescription
phasestringCurrent lifecycle phase
observedGenerationintegerLast reconciled generation
lastAppliedRevisionstringGit revision currently applied
conditions[]ConditionStandard Kubernetes condition array

status.phase Values

ValueMeaning
PendingWaiting for service units or GitOps sources to be ready
DeployingWorkloads are being rolled out
ReadyAll service units are deployed and healthy
FailedOne or more service units failed to deploy

Example

apiVersion: environments.blanketops.dev/v1alpha1
kind: Deployment
metadata:
name: for-kaniko-app
namespace: dev
spec:
contract:
serviceUnits:
- for-kaniko-app-api
runtime: kubernetes.io/container-runtime
strategy: Rolling
imageAutomation: false
reconciliationStrategy: kustomize
manifestsRepo:
url: git@github.com:example-org/for-kaniko-app-deployment.git
cloneSecret: git-ssh-credentials
strategy: kustomization
path: ./bases/kustomization.yaml

Invariants

  • All referenced ServiceUnits must exist.
  • runtime must be supported by the controller.
  • manifestsRepo.url must be reachable.
  • path must resolve to valid manifests.
  • imageAutomation must not override ServiceUnit contract constraints.
  • Deployment does not modify Build resources.