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 ¶
ErrBuildNotReady indicates the named ServiceUnit's image-providing Build has not yet produced a usable image.
func ErrInvalidServiceUnit ¶
ErrInvalidServiceUnit indicates a semantic error in a resolved ServiceUnit. This means the resolver violated an invariant or the contract is invalid.
Types ¶
type RouteIntent ¶
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.