Documentation
¶
Overview ¶
Package datastoremigration provides utilities for checking DatastoreMigration CR state from the operator's controllers.
Index ¶
- Constants
- Variables
- func Exists(c client.Client) bool
- func GetPhase(c client.Client) string
- func ServedGroupVersion(disco discovery.DiscoveryInterface) (schema.GroupVersion, bool, error)
- func ServedVersion() schema.GroupVersion
- func WaitForServedVersion(ctx context.Context, disco discovery.DiscoveryInterface)
- func WatchObject() client.Object
Constants ¶
const ( GroupName = "migration.projectcalico.org" Kind = "DatastoreMigration" ListKind = "DatastoreMigrationList" Resource = "datastoremigrations" )
const ( PhasePending = "Pending" PhaseMigrating = "Migrating" PhaseWaitingForConflictResolution = "WaitingForConflictResolution" PhaseConverged = "Converged" PhaseComplete = "Complete" PhaseFailed = "Failed" )
Phase constants for DatastoreMigration status.
Variables ¶
var ( // GroupVersionV1 is the GA group/version, the storage version from Calico v3.33. GroupVersionV1 = schema.GroupVersion{Group: GroupName, Version: "v1"} // GroupVersionV1beta1 is the pre-GA group/version, deprecated but still served in v3.33. // TODO: remove in v3.34. GroupVersionV1beta1 = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} )
Functions ¶
func GetPhase ¶
GetPhase returns the phase of the first DatastoreMigration CR, or empty string if none exists or the CRD is not installed.
func ServedGroupVersion ¶
func ServedGroupVersion(disco discovery.DiscoveryInterface) (schema.GroupVersion, bool, error)
ServedGroupVersion returns the served group/version, preferring v1. The bool is false when the CRD isn't installed; a failed lookup errors.
func ServedVersion ¶
func ServedVersion() schema.GroupVersion
ServedVersion returns the group/version the operator reads DatastoreMigration at. It is v1 until WaitForServedVersion finds out what the cluster serves.
func WaitForServedVersion ¶
func WaitForServedVersion(ctx context.Context, disco discovery.DiscoveryInterface)
WaitForServedVersion records the served version once the CRD appears. The user installs it at migration time, so expect a wait.
func WatchObject ¶
WatchObject returns an empty DatastoreMigration at the served version, for controllers registering a watch.
Types ¶
This section is empty.