Documentation ¶
Index ¶
- Constants
- Variables
- type SelfNodeRemediationConfigReconciler
- type SelfNodeRemediationReconciler
- func (r *SelfNodeRemediationReconciler) GetLastSeenSnrNamespace() string
- func (r *SelfNodeRemediationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (returnResult ctrl.Result, returnErr error)
- func (r *SelfNodeRemediationReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *SelfNodeRemediationReconciler) WasLastSeenSnrMachine() bool
- type UnreconcilableError
Constants ¶
View Source
const (
SNRFinalizer = "self-node-remediation.medik8s.io/snr-finalizer"
)
Variables ¶
View Source
var ( NodeUnschedulableTaint = &v1.Taint{ Key: "node.kubernetes.io/unschedulable", Effect: v1.TaintEffectNoSchedule, } NodeNoExecuteTaint = &v1.Taint{ Key: "medik8s.io/remediation", Value: "self-node-remediation", Effect: v1.TaintEffectNoExecute, } OutOfServiceTaint = &v1.Taint{ Key: "node.kubernetes.io/out-of-service", Value: "nodeshutdown", Effect: v1.TaintEffectNoExecute, } )
Functions ¶
This section is empty.
Types ¶
type SelfNodeRemediationConfigReconciler ¶
type SelfNodeRemediationConfigReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme InstallFileFolder string DefaultPpcCreator func(c client.Client) error Namespace string }
SelfNodeRemediationConfigReconciler reconciles a SelfNodeRemediationConfig object
func (*SelfNodeRemediationConfigReconciler) SetupWithManager ¶
func (r *SelfNodeRemediationConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SelfNodeRemediationReconciler ¶
type SelfNodeRemediationReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder Rebooter reboot.Rebooter MyNodeName string //we need to restore the node only after the cluster realized it can reschecudle the affected workloads //as of writing this lines, kubernetes will check for pods with non-existent node once in 20s, and allows //40s of grace period for the node to reappear before it deletes the pods. //see here: https://github.com/kubernetes/kubernetes/blob/7a0638da76cb9843def65708b661d2c6aa58ed5a/pkg/controller/podgc/gc_controller.go#L43-L47 RestoreNodeAfter time.Duration // contains filtered or unexported fields }
SelfNodeRemediationReconciler reconciles a SelfNodeRemediation object
func (*SelfNodeRemediationReconciler) GetLastSeenSnrNamespace ¶
func (r *SelfNodeRemediationReconciler) GetLastSeenSnrNamespace() string
GetLastSeenSnrNamespace returns the namespace of the last reconciled SNR
func (*SelfNodeRemediationReconciler) SetupWithManager ¶
func (r *SelfNodeRemediationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*SelfNodeRemediationReconciler) WasLastSeenSnrMachine ¶
func (r *SelfNodeRemediationReconciler) WasLastSeenSnrMachine() bool
WasLastSeenSnrMachine returns the a boolean indicating if the last reconcile SNR was pointing an unhealthy machine or a node
type UnreconcilableError ¶
type UnreconcilableError struct {
// contains filtered or unexported fields
}
func (*UnreconcilableError) Error ¶
func (e *UnreconcilableError) Error() string
Click to show internal directories.
Click to hide internal directories.