Documentation ¶
Index ¶
- Constants
- Variables
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager) error
- func (r *Reconciler) EnqueueWithJitterDelay(ctx context.Context, log logr.Logger) handler.EventHandler
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) ReconcileContainerdConfig(ctx context.Context, log logr.Logger, criConfig *extensionsv1alpha1.CRIConfig) error
- func (r *Reconciler) ReconcileContainerdRegistries(ctx context.Context, log logr.Logger, containerdChanges containerd) (func() error, error)
- func (r *Reconciler) SecretPredicate() predicate.Predicate
Constants ¶
const ControllerName = "operatingsystemconfig"
ControllerName is the name of this controller.
Variables ¶
var Exec = func(ctx context.Context, command string, arg ...string) ([]byte, error) { return exec.CommandContext(ctx, command, arg...).Output() }
Exec is the execution function to invoke outside binaries. Exposed for testing.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct { Client client.Client Config config.OperatingSystemConfigControllerConfig Recorder record.EventRecorder DBus dbus.DBus FS afero.Afero Extractor registry.Extractor CancelContext context.CancelFunc HostName string NodeName string }
Reconciler decodes the OperatingSystemConfig resources from secrets and applies the systemd units and files to the node.
func (*Reconciler) AddToManager ¶
AddToManager adds Reconciler to the given manager.
func (*Reconciler) EnqueueWithJitterDelay ¶
func (r *Reconciler) EnqueueWithJitterDelay(ctx context.Context, log logr.Logger) handler.EventHandler
EnqueueWithJitterDelay returns handler.Funcs which enqueues the object with a random jitter duration for 'update' events. 'Create' events are enqueued immediately.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile decodes the OperatingSystemConfig resources from secrets and applies the systemd units and files to the node.
func (*Reconciler) ReconcileContainerdConfig ¶ added in v1.100.0
func (r *Reconciler) ReconcileContainerdConfig(ctx context.Context, log logr.Logger, criConfig *extensionsv1alpha1.CRIConfig) error
ReconcileContainerdConfig sets required values of the given containerd configuration.
func (*Reconciler) ReconcileContainerdRegistries ¶ added in v1.100.0
func (r *Reconciler) ReconcileContainerdRegistries(ctx context.Context, log logr.Logger, containerdChanges containerd) (func() error, error)
ReconcileContainerdRegistries configures desired registries for containerd and cleans up abandoned ones. Registries without readiness probes are added synchronously and related errors are returned immediately. Registries with configured readiness probes are added asynchronously and must be waited for by invoking the returned function.
func (*Reconciler) SecretPredicate ¶
func (r *Reconciler) SecretPredicate() predicate.Predicate
SecretPredicate returns the predicate for Secret events.