deployplan

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveBuildTag

func ArchiveBuildTag(explicitRevision string, digest []byte) (string, error)

ArchiveBuildTag returns the build tag for a deploy from a local source archive. An explicit revision is validated and returned unchanged. If no explicit revision is provided, a deterministic tag is derived from the archive digest.

func BlueGreenPruneGracePeriod

func BlueGreenPruneGracePeriod(services map[string]config.ServiceConfig, keepRevisions map[string]string) (time.Duration, []string, error)

BlueGreenPruneGracePeriod returns the maximum blue-green prune grace and affected service names.

func DefaultDeployImageRefs

func DefaultDeployImageRefs(cfg *config.Config, envName string, services map[string]config.ServiceConfig, buildTag string) map[string]string

DefaultDeployImageRefs returns image references to use for a deploy operation.

func DefaultImageRefs

func DefaultImageRefs(cfg *config.Config, envName string, services map[string]config.ServiceConfig) map[string]string

DefaultImageRefs returns the default runtime image reference for each service.

func DeployedProxyActiveRevisions

func DeployedProxyActiveRevisions(servicesToDeploy map[string]config.ServiceConfig, activeRevisions map[string]string) map[string]string

DeployedProxyActiveRevisions returns deployed active proxy revisions eligible for pruning.

func EffectiveDeployStrategy

func EffectiveDeployStrategy(service *config.ServiceConfig) string

EffectiveDeployStrategy returns the configured deploy strategy, defaulting to recreate.

func FilterActualStateForServices

func FilterActualStateForServices(actualState map[string]*reconcile.ActualService, services map[string]config.ServiceConfig) map[string]*reconcile.ActualService

FilterActualStateForServices returns actual state scoped to the provided services.

func HasBuildServices

func HasBuildServices(services map[string]config.ServiceConfig) bool

HasBuildServices reports whether any service is build-backed.

func ImageBuildTag

func ImageBuildTag(explicitRevision string, imageRef string) (string, error)

ImageBuildTag returns the build tag for a deploy from an existing image. An explicit revision is validated and returned unchanged. If no explicit revision is provided, a deterministic tag is derived from the trimmed image ref.

func ImageRef

func ImageRef(cfg *config.Config, envName string, serviceName string, service config.ServiceConfig, buildTag string) string

ImageRef returns the image reference for a single service during deploy planning.

func IsManualBlueGreenService

func IsManualBlueGreenService(service config.ServiceConfig) bool

IsManualBlueGreenService reports whether a service uses manual blue-green promotion.

func ManualPromotionPendingServices

func ManualPromotionPendingServices(servicesToDeploy map[string]config.ServiceConfig, actualState map[string]*reconcile.ActualService) []string

ManualPromotionPendingServices returns warm manual-promotion services awaiting promotion.

func MergeRuntimeImageRefs

func MergeRuntimeImageRefs(
	cfg *config.Config,
	envName string,
	services map[string]config.ServiceConfig,
	deployedImageRefs map[string]string,
	actualState map[string]*reconcile.ActualService,
) map[string]string

MergeRuntimeImageRefs combines default, deployed, and actual runtime image references.

func PersistentServicesSkippedByForce

func PersistentServicesSkippedByForce(services map[string]config.ServiceConfig, selected map[string]config.ServiceConfig, force bool, explicitServiceTarget bool) []string

PersistentServicesSkippedByForce returns persistent services omitted by a broad forced deploy.

func ProxyActiveRevisions

func ProxyActiveRevisions(
	cfg *config.Config,
	envName string,
	services map[string]config.ServiceConfig,
	servicesToDeploy map[string]config.ServiceConfig,
	imageRefs map[string]string,
	actualState map[string]*reconcile.ActualService,
) map[string]string

ProxyActiveRevisions returns active proxy revisions for rolling and blue-green services.

func ServiceRevisionID

func ServiceRevisionID(project string, environment string, serviceName string, imageRef string, service config.ServiceConfig) string

ServiceRevisionID returns the stable revision identity for a service deployment.

func ServicesToDeployForPlan

func ServicesToDeployForPlan(plan *reconcile.ReconciliationPlan, services map[string]config.ServiceConfig, force bool, explicitServiceTarget bool) map[string]config.ServiceConfig

ServicesToDeployForPlan returns the services selected for deploy by a reconciliation plan.

func ShouldWarmManualPromotionService

func ShouldWarmManualPromotionService(serviceName string, service config.ServiceConfig, actualState map[string]*reconcile.ActualService) bool

ShouldWarmManualPromotionService reports whether deploy should warm without promotion.

func SourceBuildTag

func SourceBuildTag(explicitRevision string, now time.Time) (string, error)

SourceBuildTag returns the build tag for a source deploy. An explicit revision is validated and returned unchanged. If no explicit revision is provided, a deterministic UTC timestamp tag is generated.

func ValidateBuildTag

func ValidateBuildTag(tag string) error

ValidateBuildTag validates a Docker image tag used for build outputs. It follows Docker tag constraints: non-empty, at most 128 characters, first character [A-Za-z0-9_], and remaining characters [A-Za-z0-9_.-].

Types

This section is empty.

Jump to

Keyboard shortcuts

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