Documentation
¶
Index ¶
- Constants
- func ClusterImageRegistryIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
- func DBObjectIDPresentPredicate[T client.Object](label string) predicate.TypedFuncs[T]
- func MapBuildFailureDetail(d *corev1alpha1.LastFailureDetail) *models.BuildFailureDetail
- func MapFailureType(reason string) string
- func MapLastFailureDetails(resourceName, releaseID string, details []corev1alpha1.LastFailureDetail) *models.StackResourceFailure
- func ResolveEventRelease(ctx context.Context, resolver ReleaseResolver, log logger.Logger, ...) *models.StackRelease
- func StackIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
- func VolumeIdLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
- type ReleaseResolver
Constants ¶
const ( ReasonCrashLoopBackOff = "CrashLoopBackOff" ReasonOOMKilled = "OOMKilled" ReasonImagePullBackOff = "ImagePullBackOff" ReasonErrImagePull = "ErrImagePull" ReasonCreateContainerError = "CreateContainerError" ReasonPortNotListening = "PortNotListening" )
Termination reasons written by the kubelet, plus ReasonPortNotListening which the cluster agent writes when a declared port is proven closed. Neither exports these strings.
const ( ReasonTLSReady = "TLSReady" ReasonCertificateIssuing = "CertificateIssuing" )
TLSConfigured condition reasons written by the cluster agent's certificate stage; the agent does not export them. Any other False reason is a terminal issuance failure (the site serves plain HTTP).
const ( FailureTypeCrashLoop = "crash_loop" FailureTypeOutOfMemory = "out_of_memory" FailureTypeImagePullFailed = "image_pull_failed" FailureTypeCreateContainerError = "create_container_error" FailureTypeExitError = "exit_error" FailureTypePortNotListening = "port_not_listening" )
Container-detail failure types exposed by the API.
Variables ¶
This section is empty.
Functions ¶
func ClusterImageRegistryIDLabelPresentPredicate ¶
func ClusterImageRegistryIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
func DBObjectIDPresentPredicate ¶
func DBObjectIDPresentPredicate[T client.Object](label string) predicate.TypedFuncs[T]
func MapBuildFailureDetail ¶
func MapBuildFailureDetail(d *corev1alpha1.LastFailureDetail) *models.BuildFailureDetail
func MapFailureType ¶
func MapLastFailureDetails ¶
func MapLastFailureDetails(resourceName, releaseID string, details []corev1alpha1.LastFailureDetail) *models.StackResourceFailure
MapLastFailureDetails maps the CR's failure details onto the server-side failure. Details stamped for a different release are dropped: the CR outlives releases, so a detail captured under a previous rollout is stale. An empty ReleaseID on either side keeps the detail (pre-annotation CR, or an agent that predates the stamp).
func ResolveEventRelease ¶
func ResolveEventRelease(ctx context.Context, resolver ReleaseResolver, log logger.Logger, stackID, releaseID string) *models.StackRelease
ResolveEventRelease picks the release a CR's state belongs to:
- The CR's release-id annotation is authoritative — the apply step stamps it on every deploy, and the agent copies it onto the resources it creates.
- Record on that release while it is active, or terminal but still the latest: a cert can finish issuing, or a build report land, after the release is done.
- Superseded (a newer sequence exists): nil. That state describes an old rollout.
- No annotation (pre-annotation CR): fall back to the active release.
func StackIDLabelPresentPredicate ¶
func StackIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
func VolumeIdLabelPresentPredicate ¶
func VolumeIdLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]
Types ¶
type ReleaseResolver ¶
type ReleaseResolver interface {
InternalGet(ctx context.Context, releaseID string) (*models.StackRelease, *errors.ServiceError)
InternalGetActiveByStackID(ctx context.Context, stackID string) (*models.StackRelease, *errors.ServiceError)
InternalGetLatestByStackID(ctx context.Context, stackID string) (*models.StackRelease, *errors.ServiceError)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package imagebuild is a generated GoMock package.
|
Package imagebuild is a generated GoMock package. |
|
Package stackresource is a generated GoMock package.
|
Package stackresource is a generated GoMock package. |