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, seedClient client.Client, namespace string, config *papi.Config, workerNodeConditions map[string][]string, scaler dwdScaler.Scaler, shootClientCreator shoot.ClientCreator, logger logr.Logger) *Prober
NewProber creates a new Prober
func (*Prober) AreWorkerNodeConditionsStale ¶ added in v1.3.0
AreWorkerNodeConditionsStale checks if the worker node conditions are up-to-date
func (*Prober) GetConfig ¶ added in v1.2.0
GetConfig returns the probe config for the prober. Currently, this is only used for testing purposes.
func (*Prober) IsInBackOff ¶ added in v1.3.0
IsInBackOff checks if the prober is in backoff. Currently, this is only used for testing purposes.
Click to show internal directories.
Click to hide internal directories.