Documentation
¶
Index ¶
Constants ¶
const DefaultCRName = "nhc-worker-default"
DefaultCRName is the name of default NHC resource the controller creates in case there are no others already.
const DefaultPoisonPillTemplateName = "poison-pill-default-template"
DefaultPoisonPillTemplateName is the name of the poison-pill template the default NHC uses.
Variables ¶
This section is empty.
Functions ¶
func NewNodeHealthcheckController ¶ added in v0.1.0
NewNodeHealthcheckController setups the Node Health Check controller with the controller manager and ensures at least one NHC resource exists. If there is no NHC resource it will create one with the name in #DefaultCRName that works with poison-pill template by the name in #DefaultPoisonPillTemplateName on the same namespace this controller is deployed.
Types ¶
type NodeHealthCheckReconciler ¶
type NodeHealthCheckReconciler struct { client.Client DynamicClient dynamic.Interface Log logr.Logger Scheme *runtime.Scheme // contains filtered or unexported fields }
NodeHealthCheckReconciler reconciles a NodeHealthCheck object
func (*NodeHealthCheckReconciler) Reconcile ¶
func (r *NodeHealthCheckReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the NodeHealthCheck object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/reconcile
func (*NodeHealthCheckReconciler) SetupWithManager ¶
func (r *NodeHealthCheckReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.