controller

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonPlanGenerationFailed    = "PlanGenerationFailed"
	ReasonPlanExecutionFailed     = "PlanExecutionFailed"
	ReasonDeploymentCreateFailed  = "DeploymentCreateFailed"
	ReasonDeploymentDeleteFailed  = "DeploymentDeleteFailed"
	ReasonDeploymentScaleFailed   = "DeploymentScaleFailed"
	ReasonDeploymentUpdateFailed  = "DeploymentUpdateFailed"
	ReasonTestWorkflowStartFailed = "TestWorkflowStartFailed"
	ReasonVersionPromotionFailed  = "VersionPromotionFailed"
	ReasonMetadataUpdateFailed    = "MetadataUpdateFailed"
)

Event reason constants for TemporalWorkerDeployment.

These strings appear in Kubernetes Event objects (kubectl get events) and are internal to the controller's implementation. They are not part of the CRD status API and may change between releases. Do not write alerting or automation that depends on these strings.

View Source
const (
	ControllerMaxDeploymentVersionsIneligibleForDeletionEnvKey = "CONTROLLER_MAX_DEPLOYMENT_VERSIONS_INELIGIBLE_FOR_DELETION"
)

Variables

View Source
var Version = "unknown"

Version is set by goreleaser via ldflags at build time

Functions

func GetControllerMaxDeploymentVersionsIneligibleForDeletion added in v1.0.0

func GetControllerMaxDeploymentVersionsIneligibleForDeletion() int32

Types

type TemporalWorkerDeploymentReconciler

type TemporalWorkerDeploymentReconciler struct {
	client.Client
	Scheme             *runtime.Scheme
	TemporalClientPool *clientpool.ClientPool
	Recorder           record.EventRecorder

	// Disables panic recovery if true
	DisableRecoverPanic bool

	// When a Worker Deployment has the maximum number of versions (100 per Worker Deployment by default),
	// it will delete the oldest eligible version when a worker with the 101st version arrives.
	// If no versions are eligible for deletion, that worker's poll will fail, which is dangerous.
	// To protect against this, when a Worker Deployment has too many versions ineligible for deletion,
	// the controller will stop deploying new workers in order to give the user the opportunity to adjust
	// their sunset policy to avoid this situation before it actually blocks deployment of a new worker
	// version on the server side.
	//
	// MaxDeploymentVersionsIneligibleForDeletion is currently defaulted to 75, which is safe for the default
	// server value of `matching.maxVersionsInDeployment=100`.
	// Users who reduce `matching.maxVersionsInDeployment` in their dynamicconfig should also reduce this value.
	MaxDeploymentVersionsIneligibleForDeletion int32
}

TemporalWorkerDeploymentReconciler reconciles a TemporalWorkerDeployment object

func (*TemporalWorkerDeploymentReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. The loop runs on a regular interval, or every time one of the watched resources listed above changes.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*TemporalWorkerDeploymentReconciler) SetupWithManager

func (r *TemporalWorkerDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis
k8s.io

Jump to

Keyboard shortcuts

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