Documentation ¶
Index ¶
- Constants
- func AddToManager(mgr manager.Manager) error
- func AddToManagerWithOptions(mgr manager.Manager, conf ControllerConfig) error
- func CheckHealth(obj client.Object) (bool, error)
- func CheckProgressing(obj client.Object) (bool, string)
- func FetchAdditionalFailureMessage(ctx context.Context, c client.Client, obj client.Object) (string, error)
- func HealthStatusChanged(log logr.Logger) predicate.Predicate
- type ControllerConfig
- type ControllerOptions
Constants ¶
const ControllerName = "health"
ControllerName is the name of the health controller.
Variables ¶
This section is empty.
Functions ¶
func AddToManager ¶
AddToManager adds the controller to a Manager using the default config.
func AddToManagerWithOptions ¶
func AddToManagerWithOptions(mgr manager.Manager, conf ControllerConfig) error
AddToManagerWithOptions adds the controller to a Manager with the given config.
func CheckHealth ¶
CheckHealth checks whether the given object is healthy. It returns a bool indicating whether the object was actually checked and an error if any health check failed.
func CheckProgressing ¶ added in v1.47.0
CheckProgressing checks whether the given object is progressing. It returns a bool indicating whether the object is progressing, a reason for it if so and an error if the check failed.
Types ¶
type ControllerConfig ¶
type ControllerConfig struct { MaxConcurrentWorkers int SyncPeriod time.Duration ClassFilter managerpredicate.ClassFilter TargetCluster cluster.Cluster TargetCacheDisabled bool ClusterID string }
ControllerConfig is the completed configuration for the controller.
type ControllerOptions ¶
type ControllerOptions struct {
// contains filtered or unexported fields
}
ControllerOptions are options for adding the controller to a Manager.
func (*ControllerOptions) AddFlags ¶
func (o *ControllerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags adds the needed command line flags to the given FlagSet.
func (*ControllerOptions) Complete ¶
func (o *ControllerOptions) Complete() error
Complete completes the given command line flags and set the defaultControllerConfig accordingly.
func (*ControllerOptions) Completed ¶
func (o *ControllerOptions) Completed() *ControllerConfig
Completed returns the completed ControllerConfig.