Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultProbeInterval is the default duration representing the interval for a probe. DefaultProbeInterval = 10 * time.Second // DefaultProbeInitialDelay is the default duration representing an initial delay to start a probe. DefaultProbeInitialDelay = 30 * time.Second // DefaultScaleInitialDelay is the default duration representing an initial delay to start to scale up a kubernetes resource. DefaultScaleInitialDelay = 0 * time.Second // DefaultProbeTimeout is the default duration representing total timeout for a probe to complete. DefaultProbeTimeout = 30 * time.Second // DefaultBackoffJitterFactor is the default jitter value with which successive probe runs are scheduled. DefaultBackoffJitterFactor = 0.2 // DefaultScaleUpdateTimeout is the default duration representing a timeout for the scale operation to complete. DefaultScaleUpdateTimeout = 30 * time.Second // DefaultNodeLeaseFailureFraction is used to determine the maximum number of node leases that can be expired for a node lease probe to succeed. // Eg:- 1. numberOfOwnedLeases = 10, numberOfExpiredLeases = 6. // numberOfExpiredLeases/numberOfOwnedLeases = 0.6, which is >= DefaultNodeLeaseFailureFraction and so the lease probe will fail. // 2. numberOfOwnedLeases = 10, numberOfExpiredLeases = 5. // numberOfExpiredLeases/numberOfOwnedLeases = 0.5, which is < DefaultNodeLeaseFailureFraction and so the lease probe will succeed. DefaultNodeLeaseFailureFraction = 0.60 // DefaultKCMNodeMonitorGraceDuration is set to the default value of nodeMonitorGracePeriod in KCM. // See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/#:~:text=%2D%2Dnode%2Dmonitor%2Dgrace%2Dperiod%20duration // Note: Make sure to keep this value in sync with default value of nodeMonitorGracePeriod in KCM. DefaultKCMNodeMonitorGraceDuration = 40 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig reads the prober configuration from a file, unmarshalls it, fills in the default values and validates the unmarshalled configuration If all validations pass it will return papi.Config else it will return an error.
Types ¶
type Manager ¶
type Manager interface { // Register registers the given prober with the manager. It should return false if prober is already registered. Register(prober Prober) bool // Unregister closes the prober and removes it from the manager. It should return false if prober is not registered with the manager. Unregister(key string) bool // GetProber uses the given key to get a registered prober from the manager. It returns false if prober is not found. GetProber(key string) (Prober, bool) // GetAllProbers returns a slice of all the probers registered with the manager. GetAllProbers() []Prober }
Manager is the convenience interface to manage lifecycle of probers.
type Prober ¶
type Prober struct {
// contains filtered or unexported fields
}
Prober represents a probe to the Kube ApiServer of a shoot
func NewProber ¶
func NewProber(parentCtx context.Context, namespace string, config *papi.Config, scaler dwdScaler.Scaler, shootClientCreator ShootClientCreator, logger logr.Logger) *Prober
NewProber creates a new Prober
type ShootClientCreator ¶
type ShootClientCreator interface { // CreateClient creates a new clientSet to connect to the Kube ApiServer running in the passed-in shoot control namespace. CreateClient(ctx context.Context, logger logr.Logger, namespace string, secretName string, connectionTimeout time.Duration) (kubernetes.Interface, error) }
ShootClientCreator provides a facade to create kubernetes client targeting a shoot.
func NewShootClientCreator ¶
func NewShootClientCreator(client client.Client) ShootClientCreator
NewShootClientCreator creates an instance of ShootClientCreator.
Click to show internal directories.
Click to hide internal directories.