Help us shape the future of Go! Take the 2026 Go Developer Survey

timeouts

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

pkg/controller/timeouts

Shared timeout constants used across controller subpackages.

Overview

Centralising these prevents the same magic numbers from drifting apart across components. Components that need an unusual timeout should still pick a value appropriate to the operation, but everything that's "the standard Kubernetes API timeout" or "the standard ticker poll interval" reads from here so a tuning change is one edit.

Constants

Name Value Use for
KubernetesAPITimeout 10 * time.Second Standard k8s API calls (status updates, resource cleanup)
KubernetesAPILongTimeout 30 * time.Second Longer k8s API operations (publishing config, reconciling pod status)
HTTPServerTimeout 10 * time.Second Read/write timeout for HTTP servers (webhook admission server)
InformerResyncPeriod 30 * time.Second Resync interval for shared informers
TickerPollInterval 5 * time.Second Periodic polling (metrics collection, deployment timeout checks)

These are deliberately Go constants rather than CRD fields — they're tuning knobs that should travel with the code, not with the deployment.

License

Apache-2.0 — see root LICENSE.

Documentation

Overview

Package timeouts provides shared timeout constants used across controller sub-packages.

Index

Constants

View Source
const (
	// KubernetesAPITimeout is the standard timeout for Kubernetes API calls
	// such as status updates and resource cleanup operations.
	KubernetesAPITimeout = 10 * time.Second

	// KubernetesAPILongTimeout is the timeout for longer Kubernetes API operations
	// such as publishing configurations or reconciling pod status.
	KubernetesAPILongTimeout = 30 * time.Second

	// HTTPServerTimeout is the read/write timeout for HTTP servers
	// such as the webhook admission server.
	HTTPServerTimeout = 10 * time.Second

	// InformerResyncPeriod is the resync interval for Kubernetes shared informers.
	InformerResyncPeriod = 30 * time.Second

	// TickerPollInterval is the interval for periodic polling operations
	// such as metrics collection and deployment timeout checks.
	TickerPollInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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