mutation

package
v1.9.0-p01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToManager

func AddToManager(ctx *pkgctx.ControllerManagerContext, mgr ctrlmgr.Manager) error

AddToManager adds the webhook to the provided manager.

func NewMutator

func NewMutator(client ctrlclient.Client) builder.Mutator

NewMutator returns the package's Mutator.

func ProcessPowerState

func ProcessPowerState(
	ctx *pkgctx.WebhookRequestContext,
	newVMG, oldVMG *vmopv1.VirtualMachineGroup) (bool, error)

ProcessPowerState updates the last updated power state time annotation to the current UTC time in RFC3339Nano format for the following cases: 1. The group is created with a non-empty spec.powerState value. 2. The spec.powerState is updated. 3. The spec.nextForcePowerStateSyncTime is set to "now". It also removes the apply power state change time annotation if the group is being updated directly (not inherited from a parent).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL