Documentation ¶
Index ¶
- Constants
- func IsProblematicWebhook(failurePolicy *admissionregistrationv1.FailurePolicyType, ...) bool
- func NewConditionOrError(clock clock.Clock, oldCondition gardencorev1beta1.Condition, ...) gardencorev1beta1.Condition
- func PardonConditions(clock clock.Clock, conditions []gardencorev1beta1.Condition, ...) []gardencorev1beta1.Condition
- type Constraint
- func (c *Constraint) Check(ctx context.Context, constraints []gardencorev1beta1.Condition) []gardencorev1beta1.Condition
- func (c *Constraint) CheckForProblematicWebhooks(ctx context.Context) (gardencorev1beta1.ConditionStatus, string, string, ...)
- func (c *Constraint) CheckIfCACertificateValiditiesAcceptable(ctx context.Context) (gardencorev1beta1.ConditionStatus, string, string, ...)
- type ExtensionCondition
- type GarbageCollection
- type GardenHealth
- type Health
- type HealthChecker
- func (b *HealthChecker) CheckClusterNodes(ctx context.Context, shootClient client.Client, seedNamespace string, ...) (*gardencorev1beta1.Condition, error)
- func (b *HealthChecker) CheckExtensionCondition(condition gardencorev1beta1.Condition, ...) *gardencorev1beta1.Condition
- func (b *HealthChecker) CheckLoggingControlPlane(ctx context.Context, namespace string, isTestingShoot bool, ...) (*gardencorev1beta1.Condition, error)
- func (b *HealthChecker) CheckManagedResource(condition gardencorev1beta1.Condition, mr *resourcesv1alpha1.ManagedResource) *gardencorev1beta1.Condition
- func (b *HealthChecker) CheckMonitoringControlPlane(ctx context.Context, shoot *gardencorev1beta1.Shoot, namespace string, ...) (*gardencorev1beta1.Condition, error)
- func (b *HealthChecker) CheckShootControlPlane(ctx context.Context, shoot *gardencorev1beta1.Shoot, namespace string, ...) (*gardencorev1beta1.Condition, error)
- func (b *HealthChecker) FailedCondition(condition gardencorev1beta1.Condition, reason, message string, ...) gardencorev1beta1.Condition
- type SeedHealth
- type ShootClientInit
- type WebhookRemediation
Constants ¶
const ( // WebhookMaximumTimeoutSecondsNotProblematic is the maximum timeout in seconds a webhooks on critical resources can // have in order to not be considered as a problematic webhook by the constraints checks. Any webhook on critical // resources with a larger timeout is considered to be problematic. WebhookMaximumTimeoutSecondsNotProblematic = 15 // WebhookMaximumTimeoutSecondsNotProblematicForLeases is the maximum timeout in seconds a webhooks on lease resources in // kube-system namespace can have in order to not be considered as a problematic webhook by the constraints checks. // Any webhook on lease resources in kube-system namespace with a larger timeout can break leader election of essential // control plane controllers. WebhookMaximumTimeoutSecondsNotProblematicForLeases = 3 )
const GardenerDeletionGracePeriod = 5 * time.Minute
GardenerDeletionGracePeriod is the default grace period for Gardener's force deletion methods.
Variables ¶
This section is empty.
Functions ¶
func IsProblematicWebhook ¶
func IsProblematicWebhook( failurePolicy *admissionregistrationv1.FailurePolicyType, objSelector *metav1.LabelSelector, nsSelector *metav1.LabelSelector, rules []admissionregistrationv1.RuleWithOperations, timeoutSeconds *int32, ) bool
IsProblematicWebhook checks if a single webhook of the Shoot Cluster is problematic. Problematic webhooks are webhooks with rules for CREATE/UPDATE/* pods or nodes and failurePolicy=Fail/nil. If the Shoot contains such a webhook, we can never wake up this shoot cluster again as new nodes cannot get created/ready, or our system component pods cannot get created/ready (because the webhook's backing pod is not yet running).
func NewConditionOrError ¶
func NewConditionOrError(clock clock.Clock, oldCondition gardencorev1beta1.Condition, newCondition *gardencorev1beta1.Condition, err error) gardencorev1beta1.Condition
NewConditionOrError returns the given new condition or returns an unknown error condition if an error occurred or `newCondition` is nil.
func PardonConditions ¶
func PardonConditions(clock clock.Clock, conditions []gardencorev1beta1.Condition, lastOp *gardencorev1beta1.LastOperation, lastErrors []gardencorev1beta1.LastError) []gardencorev1beta1.Condition
PardonConditions pardons the given condition if the Shoot is either in create (except successful create) or delete state.
Types ¶
type Constraint ¶
type Constraint struct {
// contains filtered or unexported fields
}
Constraint contains required information for shoot constraint checks.
func NewConstraint ¶
func NewConstraint(clock clock.Clock, op *operation.Operation, shootClientInit ShootClientInit) *Constraint
NewConstraint returns a new constraint instance.
func (*Constraint) Check ¶
func (c *Constraint) Check( ctx context.Context, constraints []gardencorev1beta1.Condition, ) []gardencorev1beta1.Condition
Check checks all given constraints.
func (*Constraint) CheckForProblematicWebhooks ¶
func (c *Constraint) CheckForProblematicWebhooks(ctx context.Context) (gardencorev1beta1.ConditionStatus, string, string, []gardencorev1beta1.ErrorCode, error)
CheckForProblematicWebhooks checks the Shoot for problematic webhooks which could prevent shoot worker nodes from joining the cluster.
func (*Constraint) CheckIfCACertificateValiditiesAcceptable ¶ added in v1.50.0
func (c *Constraint) CheckIfCACertificateValiditiesAcceptable(ctx context.Context) (gardencorev1beta1.ConditionStatus, string, string, []gardencorev1beta1.ErrorCode, error)
CheckIfCACertificateValiditiesAcceptable checks whether there are CA certificates which are expiring in less than a year.
type ExtensionCondition ¶
type ExtensionCondition struct { Condition gardencorev1beta1.Condition ExtensionType string ExtensionName string ExtensionNamespace string LastHeartbeatTime *metav1.MicroTime }
ExtensionCondition contains information about the extension type, name, namespace and the respective condition object.
type GarbageCollection ¶
type GarbageCollection struct {
// contains filtered or unexported fields
}
GarbageCollection contains required information for shoot and seed garbage collection.
func NewGarbageCollection ¶
func NewGarbageCollection(op *operation.Operation, shootClientInit ShootClientInit) *GarbageCollection
NewGarbageCollection creates a new garbage collection instance.
func (*GarbageCollection) Collect ¶
func (g *GarbageCollection) Collect(ctx context.Context)
Collect cleans the Seed and the Shoot cluster from no longer required objects. It receives a botanist object <botanist> which stores the Shoot object.
type GardenHealth ¶ added in v1.76.0
type GardenHealth struct {
// contains filtered or unexported fields
}
GardenHealth contains information needed to execute health checks for garden.
func NewHealthForGarden ¶ added in v1.76.0
func NewHealthForGarden(garden *operatorv1alpha1.Garden, runtimeClient client.Client, gardenClientSet kubernetes.Interface, clock clock.Clock, gardenNamespace string) *GardenHealth
NewHealthForGarden creates a new Health instance with the given parameters.
func (*GardenHealth) CheckGarden ¶ added in v1.76.0
func (h *GardenHealth) CheckGarden( ctx context.Context, conditions []gardencorev1beta1.Condition, thresholdMappings map[gardencorev1beta1.ConditionType]time.Duration, lastOperation *gardencorev1beta1.LastOperation, ) []gardencorev1beta1.Condition
CheckGarden conducts the health checks on all the given conditions.
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
Health contains information needed to execute shoot health checks.
func (*Health) Check ¶
func (h *Health) Check( ctx context.Context, thresholdMappings map[gardencorev1beta1.ConditionType]time.Duration, healthCheckOutdatedThreshold *metav1.Duration, conditions []gardencorev1beta1.Condition, ) []gardencorev1beta1.Condition
Check conducts the health checks on all the given conditions.
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker contains the condition thresholds.
func NewHealthChecker ¶
func NewHealthChecker( reader client.Reader, clock clock.Clock, conditionThresholds map[gardencorev1beta1.ConditionType]time.Duration, healthCheckOutdatedThreshold *metav1.Duration, managedResourceProgressingThreshold *metav1.Duration, lastOperation *gardencorev1beta1.LastOperation, kubernetesVersion *semver.Version, gardenerVersion *semver.Version, ) *HealthChecker
NewHealthChecker creates a new health checker.
func (*HealthChecker) CheckClusterNodes ¶
func (b *HealthChecker) CheckClusterNodes( ctx context.Context, shootClient client.Client, seedNamespace string, workers []gardencorev1beta1.Worker, condition gardencorev1beta1.Condition, ) ( *gardencorev1beta1.Condition, error, )
CheckClusterNodes checks whether cluster nodes in the given listers are healthy and within the desired range. Additional checks are executed in the provider extension
func (*HealthChecker) CheckExtensionCondition ¶
func (b *HealthChecker) CheckExtensionCondition(condition gardencorev1beta1.Condition, extensionsConditions []ExtensionCondition) *gardencorev1beta1.Condition
CheckExtensionCondition checks whether the conditions provided by extensions are healthy.
func (*HealthChecker) CheckLoggingControlPlane ¶
func (b *HealthChecker) CheckLoggingControlPlane( ctx context.Context, namespace string, isTestingShoot bool, eventLoggingEnabled bool, valiEnabled bool, condition gardencorev1beta1.Condition, ) ( *gardencorev1beta1.Condition, error, )
CheckLoggingControlPlane checks whether the logging components in the given listers are complete and healthy.
func (*HealthChecker) CheckManagedResource ¶
func (b *HealthChecker) CheckManagedResource(condition gardencorev1beta1.Condition, mr *resourcesv1alpha1.ManagedResource) *gardencorev1beta1.Condition
CheckManagedResource checks the conditions of the given managed resource and reflects the state in the returned condition.
func (*HealthChecker) CheckMonitoringControlPlane ¶
func (b *HealthChecker) CheckMonitoringControlPlane( ctx context.Context, shoot *gardencorev1beta1.Shoot, namespace string, shootMonitoringEnabled bool, wantsAlertmanager bool, condition gardencorev1beta1.Condition, ) ( *gardencorev1beta1.Condition, error, )
CheckMonitoringControlPlane checks whether the monitoring in the given listers are complete and healthy.
func (*HealthChecker) CheckShootControlPlane ¶ added in v1.76.0
func (b *HealthChecker) CheckShootControlPlane( ctx context.Context, shoot *gardencorev1beta1.Shoot, namespace string, condition gardencorev1beta1.Condition, ) ( *gardencorev1beta1.Condition, error, )
CheckShootControlPlane checks whether the shoot control plane components in the given listers are complete and healthy.
func (*HealthChecker) FailedCondition ¶
func (b *HealthChecker) FailedCondition(condition gardencorev1beta1.Condition, reason, message string, codes ...gardencorev1beta1.ErrorCode) gardencorev1beta1.Condition
FailedCondition returns a progressing or false condition depending on the progressing threshold.
type SeedHealth ¶ added in v1.47.0
type SeedHealth struct {
// contains filtered or unexported fields
}
SeedHealth contains information needed to execute health checks for seed.
func NewHealthForSeed ¶ added in v1.47.0
func NewHealthForSeed(seed *gardencorev1beta1.Seed, seedClient client.Client, clock clock.Clock, namespace *string, seedIsGarden bool, loggingEnabled bool) *SeedHealth
NewHealthForSeed creates a new Health instance with the given parameters.
func (*SeedHealth) CheckSeed ¶ added in v1.47.0
func (h *SeedHealth) CheckSeed( ctx context.Context, conditions []gardencorev1beta1.Condition, thresholdMappings map[gardencorev1beta1.ConditionType]time.Duration, lastOperation *gardencorev1beta1.LastOperation, ) []gardencorev1beta1.Condition
CheckSeed conducts the health checks on all the given conditions.
type ShootClientInit ¶
type ShootClientInit func() (kubernetes.Interface, bool, error)
ShootClientInit is a function that initializes a kubernetes client for a Shoot.
type WebhookRemediation ¶ added in v1.50.0
type WebhookRemediation struct {
// contains filtered or unexported fields
}
WebhookRemediation contains required information for shoot webhook remediation.
func NewWebhookRemediation ¶ added in v1.50.0
func NewWebhookRemediation(op *operation.Operation, shootClientInit ShootClientInit) *WebhookRemediation
NewWebhookRemediation creates a new instance for webhook remediation.