Documentation
¶
Index ¶
- Constants
- func Add(mgr manager.Manager, args AddArgs) error
- func DefaultPredicates(ctx context.Context, mgr manager.Manager, ignoreOperationAnnotation bool) []predicate.Predicate
- func FilesToDiskScript(ctx context.Context, reader client.Reader, namespace string, ...) (string, error)
- func NewReconciler(mgr manager.Manager, actuator Actuator) reconcile.Reconciler
- func SecretObjectMetaForConfig(config *extensionsv1alpha1.OperatingSystemConfig) metav1.ObjectMeta
- func UnitsToDiskScript(units []extensionsv1alpha1.Unit) string
- func WrapProvisionOSCIntoOneshotScript(script string) string
- type Actuator
- type AddArgs
Constants ¶
const ( // FinalizerName is the name of the finalizer written by this controller. FinalizerName = "extensions.gardener.cloud/operatingsystemconfigs" // ControllerName is the name of the operating system configuration controller. ControllerName = "operatingsystemconfig" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds an operatingsystemconfig controller to the given manager using the given AddArgs.
func DefaultPredicates ¶
func DefaultPredicates(ctx context.Context, mgr manager.Manager, ignoreOperationAnnotation bool) []predicate.Predicate
DefaultPredicates returns the default predicates for an operatingsystemconfig reconciler.
func FilesToDiskScript ¶ added in v1.82.0
func FilesToDiskScript(ctx context.Context, reader client.Reader, namespace string, files []extensionsv1alpha1.File) (string, error)
FilesToDiskScript is a utility function which generates a bash script for writing the provided files to the disk.
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, actuator Actuator) reconcile.Reconciler
NewReconciler creates a new reconcile.Reconciler that reconciles OperatingSystemConfig resources of Gardener's `extensions.gardener.cloud` API group.
func SecretObjectMetaForConfig ¶
func SecretObjectMetaForConfig(config *extensionsv1alpha1.OperatingSystemConfig) metav1.ObjectMeta
SecretObjectMetaForConfig returns the object meta structure that can be used inside the secret that shall contain the generated OSC output.
func UnitsToDiskScript ¶ added in v1.82.0
func UnitsToDiskScript(units []extensionsv1alpha1.Unit) string
UnitsToDiskScript is a utility function which generates a bash script for writing the provided units and their drop-ins to the disk.
func WrapProvisionOSCIntoOneshotScript ¶ added in v1.110.5
WrapProvisionOSCIntoOneshotScript wraps the given script into an oneshot script which exits early when it is called again after finishing successfully.
Types ¶
type Actuator ¶
type Actuator interface {
// Reconcile the operating system config.
Reconcile(context.Context, logr.Logger, *extensionsv1alpha1.OperatingSystemConfig) ([]byte, []extensionsv1alpha1.Unit, []extensionsv1alpha1.File, *extensionsv1alpha1.InPlaceUpdatesStatus, error)
// Delete the operating system config.
Delete(context.Context, logr.Logger, *extensionsv1alpha1.OperatingSystemConfig) error
// ForceDelete forcefully deletes the operating system config.
ForceDelete(context.Context, logr.Logger, *extensionsv1alpha1.OperatingSystemConfig) error
// Restore the operating system config.
Restore(context.Context, logr.Logger, *extensionsv1alpha1.OperatingSystemConfig) ([]byte, []extensionsv1alpha1.Unit, []extensionsv1alpha1.File, *extensionsv1alpha1.InPlaceUpdatesStatus, error)
// Migrate the operating system config.
Migrate(context.Context, logr.Logger, *extensionsv1alpha1.OperatingSystemConfig) error
}
Actuator acts upon OperatingSystemConfig resources.
type AddArgs ¶
type AddArgs struct {
// Actuator is an OperatingSystemConfig actuator.
Actuator Actuator
// ControllerOptions are the controller options used for creating a controller.
// The options.Reconciler is always overridden with a reconciler created from the
// given actuator.
ControllerOptions controller.Options
// Predicates are the predicates to use.
// If unset, GenerationChangedPredicate will be used.
Predicates []predicate.Predicate
// Types are the similar types which can be combined with a logic or,
// of the resource considered for reconciliation.
Types []string
// ExtensionClass defines the extension class this extension is responsible for.
ExtensionClass extensionsv1alpha1.ExtensionClass
}
AddArgs are arguments for adding an OperatingSystemConfig controller to a manager.