Documentation
¶
Overview ¶
Package controller lets a wrapper binary embed the worker-deployment controller and run it with custom Temporal client configuration.
Index ¶
- type CachedClient
- type Controller
- type CreateClientFunc
- type CustomizeClientOptionsFunc
- type Option
- func WithCreateClient(fn CreateClientFunc) Option
- func WithDefaultClient(customize ...CustomizeClientOptionsFunc) Option
- func WithDisableClusterConnections(disable bool) Option
- func WithDisableDeprecatedTWD(disable bool) Option
- func WithDisableRecoverPanic(disable bool) Option
- func WithLogger(l log.Logger) Option
- func WithMaxDeploymentVersionsIneligibleForDeletion(n int32) Option
- func WithWRTHPAMatchLabelsStripTemporalPrefix(strip bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedClient ¶
type CachedClient = clientpool.CachedClient
CachedClient is a Temporal SDK client paired with a validity check. IsValid is called on every cache hit. A false result triggers eviction and re-dial.
type Controller ¶
type Controller = internalcontroller.WorkerDeploymentReconciler
Controller reconciles WorkerDeployment resources.
func New ¶
func New(mgr ctrl.Manager, opts ...Option) (*Controller, error)
New returns a Controller wired with the given manager, or an error if the options are misconfigured (e.g. both WithCreateClient and WithDefaultClient). The manager supplies the Kubernetes client, scheme, and event recorder; the Temporal client pool is built internally from the manager's client.
type CreateClientFunc ¶
type CreateClientFunc = clientpool.CreateClientFunc
CreateClientFunc creates a Temporal SDK client for a connection spec: secret parsing, options, dialing, and health check. The pool caches the returned CachedClient.
type CustomizeClientOptionsFunc ¶
CustomizeClientOptionsFunc mutates SDK client options before dialing. It only applies to the default client-creation path (WithDefaultClient).
type Option ¶
type Option func(*config)
Option configures a controller built by New.
func WithCreateClient ¶
func WithCreateClient(fn CreateClientFunc) Option
WithCreateClient overrides the default client-creation path. The function owns the full construction: secret parsing, options, dialing, and health check.
func WithDefaultClient ¶
func WithDefaultClient(customize ...CustomizeClientOptionsFunc) Option
WithDefaultClient uses the built-in client-creation path (parse Secret, build options, dial, health-check). Accepts optional CustomizeClientOptions to mutate SDK options before dialing.
func WithDisableClusterConnections ¶
WithDisableClusterConnections drops ClusterConnection support. Set when the manager is namespace-scoped (a namespaced Role cannot list the cluster-scoped ClusterConnection CRD).
func WithDisableDeprecatedTWD ¶
WithDisableDeprecatedTWD disables watching the deprecated TemporalWorkerDeployment CRD. Set when the CRD is not installed.
func WithDisableRecoverPanic ¶
WithDisableRecoverPanic disables panic recovery in the reconciler.
func WithLogger ¶
WithLogger sets the logger used by the internally-built client pool.
func WithMaxDeploymentVersionsIneligibleForDeletion ¶
WithMaxDeploymentVersionsIneligibleForDeletion sets the cap on how many worker deployment versions may be ineligible for deletion before the controller stops deploying new versions. When unset, the built-in default is used.
func WithWRTHPAMatchLabelsStripTemporalPrefix ¶
WithWRTHPAMatchLabelsStripTemporalPrefix sets whether to strip the "temporal_" prefix from auto-injected WorkerResourceTemplate HPA external metric matchLabels.