serviceunit

package
v0.8.8 Latest Latest
Warning

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

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

Documentation

Overview

Package serviceunit owns ServiceUnitIntent and its constructor, ResolveServiceUnitIntent — a ServiceUnit resolves its own deployment intent (image, port, size, routes, workload) here rather than Deployment reaching into it, the same "resolve yourself" principle already applied to ServiceUnit's own resolution and domain layers elsewhere in the repo.

RouteIntent (route.go) and WorkloadIntent (workload.go) are populated as part of this resolution and carried on ServiceUnitIntent for whatever consumes it next — pkg/apis/deployment's api/strategy/render layers, chiefly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrBuildNotReady

func ErrBuildNotReady(name string) error

ErrBuildNotReady indicates the named ServiceUnit's image-providing Build has not yet produced a usable image.

func ErrInvalidServiceUnit

func ErrInvalidServiceUnit(name, reason string) error

ErrInvalidServiceUnit indicates a semantic error in a resolved ServiceUnit. This means the resolver violated an invariant or the contract is invalid.

Types

type RouteIntent

type RouteIntent struct {
	Host       string
	Path       string
	TLSEnabled bool
}

RouteIntent is a ServiceUnit's resolved routing configuration, carried on ServiceUnitIntent.

type ServiceUnitIntent

type ServiceUnitIntent struct {
	Name  string
	Image string
	// ImagePullSecret names the registry credential the image is pulled
	// with, in the workload's namespace. Empty for a public image.
	ImagePullSecret string
	Port            int32
	Size            int32
	Routes          []RouteIntent
	// Filled after execution
	Workload WorkloadIntent
}

ServiceUnitIntent is a ServiceUnit's fully resolved deployment intent (image, port, size, routes), plus its Workload once resolution runs.

func ResolveServiceUnitIntent

func ResolveServiceUnitIntent(
	su *serviceunitResolution.ResolvedServiceUnit,
) (*ServiceUnitIntent, error)

ResolveServiceUnitIntent builds a ServiceUnitIntent from a fully resolved ServiceUnit — the ServiceUnit resolves its own deployment intent rather than Deployment reaching into it.

type WorkloadIntent

type WorkloadIntent struct {
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
}

WorkloadIntent points to the concrete runtime object created (Deployment, Knative Service, ECS Service, etc)

Jump to

Keyboard shortcuts

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