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.