{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controllers\n\n## Constants\n\n```go\nconst (\n\tReasonCrashLoopBackOff     = \"CrashLoopBackOff\"\n\tReasonOOMKilled            = \"OOMKilled\"\n\tReasonImagePullBackOff     = \"ImagePullBackOff\"\n\tReasonErrImagePull         = \"ErrImagePull\"\n\tReasonCreateContainerError = \"CreateContainerError\"\n\tReasonPortNotListening     = \"PortNotListening\"\n)\n```\nTermination reasons written by the kubelet, plus ReasonPortNotListening which the cluster agent writes when a declared port is proven closed. Neither exports these strings.\n\n```go\nconst (\n\tReasonTLSReady           = \"TLSReady\"\n\tReasonCertificateIssuing = \"CertificateIssuing\"\n)\n```\nTLSConfigured 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).\n\n```go\nconst (\n\tFailureTypeCrashLoop            = \"crash_loop\"\n\tFailureTypeOutOfMemory          = \"out_of_memory\"\n\tFailureTypeImagePullFailed      = \"image_pull_failed\"\n\tFailureTypeCreateContainerError = \"create_container_error\"\n\tFailureTypeExitError            = \"exit_error\"\n\tFailureTypePortNotListening     = \"port_not_listening\"\n)\n```\nContainer-detail failure types exposed by the API.\n\n## Functions\n\n```go\nfunc ClusterImageRegistryIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]\n```\n\n```go\nfunc DBObjectIDPresentPredicate[T client.Object](label string) predicate.TypedFuncs[T]\n```\n\n```go\nfunc MapBuildFailureDetail(d *corev1alpha1.LastFailureDetail) *models.BuildFailureDetail\n```\n\n```go\nfunc MapFailureType(reason string) string\n```\n\n```go\nfunc MapLastFailureDetails(resourceName, releaseID string, details []corev1alpha1.LastFailureDetail) *models.StackResourceFailure\n```\nMapLastFailureDetails 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).\n\n```go\nfunc ResolveEventRelease(ctx context.Context, resolver ReleaseResolver, log logger.Logger, stackID, releaseID string) *models.StackRelease\n```\nResolveEventRelease picks the release a CR's state belongs to:\n\n  - 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.\n  - 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.\n  - Superseded (a newer sequence exists): nil. That state describes an old rollout.\n  - No annotation (pre-annotation CR): fall back to the active release.\n\n```go\nfunc StackIDLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]\n```\n\n```go\nfunc VolumeIdLabelPresentPredicate[T client.Object]() predicate.TypedFuncs[T]\n```\n\n## Types\n\n```go\ntype ReleaseResolver interface {\n\tInternalGet(ctx context.Context, releaseID string) (*models.StackRelease, *errors.ServiceError)\n\tInternalGetActiveByStackID(ctx context.Context, stackID string) (*models.StackRelease, *errors.ServiceError)\n\tInternalGetLatestByStackID(ctx context.Context, stackID string) (*models.StackRelease, *errors.ServiceError)\n}\n```\n\n","path":"github.com/Stackdome/stackdome/pkg/controllers","name":"controllers","synopsis":"","isRedistributable":true}
