resolve

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package resolve implements resolution for the Deployment CR.

The Deployment CR stores its spec as a raw JSON contract (spec.contract). ResolveDeployment decodes this into a fully typed ResolvedDeployment — the authoritative runtime representation consumed by all downstream domain and application logic.

Resolution is strict: required fields that are missing or malformed return errors immediately. All failures surface as errors — resolution never panics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReconciliationStrategy

type ReconciliationStrategy string

ReconciliationStrategy selects how a Deployment's manifests are applied (imperative apply, Kustomize, or Helm).

const (
	ReconciliationImperative ReconciliationStrategy = "Imperative"
	ReconciliationKustomize  ReconciliationStrategy = "Kustomize"
	ReconciliationHelm       ReconciliationStrategy = "Helm"
)

type ResolvedDeployment

type ResolvedDeployment struct {
	Deployment *environmentv1alpha1.Deployment
	Spec       *ResolvedDeploymentSpec
}

ResolvedDeployment pairs the original Kubernetes Deployment object with its fully decoded and validated spec.

func ResolveDeployment

func ResolveDeployment(depl *environmentv1alpha1.Deployment) (*ResolvedDeployment, error)

ResolveDeployment decodes and validates the raw JSON contract from the Deployment CR spec into a ResolvedDeployment. Returns an error if the CR is nil, the contract is absent, or any required field is missing or malformed.

type ResolvedDeploymentSpec

type ResolvedDeploymentSpec struct {
	ServiceUnits           []string
	Runtime                Runtime
	Strategy               Strategy
	GitOwner               string
	ImageAutomation        bool
	ManifestsRepo          *ResolvedManifestsRepo
	ReconciliationStrategy ReconciliationStrategy
}

ResolvedDeploymentSpec is the decoded and validated Deployment spec.

type ResolvedManifestsRepo

type ResolvedManifestsRepo struct {
	URL         string
	Ref         string
	Path        string
	Strategy    string
	CloneSecret string
}

ResolvedManifestsRepo is the resolved GitOps manifests repository.

type Runtime

type Runtime string

Runtime identifies which execution platform a ServiceUnit deploys to.

const (
	RuntimeKubernetes Runtime = "kubernetes.io/container-runtime"
	RuntimeKnative    Runtime = "knative.dev/service-runtime"
	RuntimeWasm       Runtime = "blanketops.dev/wasm-runtime"
	RuntimeECS        Runtime = "blanketops.dev/aws-ecs"
	RuntimeAzure      Runtime = "blanketops.dev/azure-container"
)

type Strategy

type Strategy string

Strategy selects the rollout strategy used when deploying a ServiceUnit.

const (
	StrategyRolling   Strategy = "Rolling"
	StrategyBlueGreen Strategy = "BlueGreen"
	StrategyCanary    Strategy = "Canary"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL