storageversion

package
v0.24.9-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCommonEncodingVersion added in v0.21.0

func SetCommonEncodingVersion(sv *v1alpha1.StorageVersion)

SetCommonEncodingVersion updates the CommonEncodingVersion and the AllEncodingVersionsEqual condition based on the StorageVersions.

Types

type Client

Client has the methods required to update the storage version.

type Manager

type Manager interface {
	// AddResourceInfo records resources whose StorageVersions need updates
	AddResourceInfo(resources ...*ResourceInfo)
	// UpdateStorageVersions tries to update the StorageVersions of the recorded resources
	UpdateStorageVersions(kubeAPIServerClientConfig *rest.Config, apiserverID string)
	// PendingUpdate returns true if the StorageVersion of the given resource is still pending update.
	PendingUpdate(gr schema.GroupResource) bool
	// LastUpdateError returns the last error hit when updating the storage version of the given resource.
	LastUpdateError(gr schema.GroupResource) error
	// Completed returns true if updating StorageVersions of all recorded resources has completed.
	Completed() bool
}

Manager records the resources whose StorageVersions need updates, and provides a method to update those StorageVersions.

func NewDefaultManager

func NewDefaultManager() Manager

NewDefaultManager creates a new defaultManager.

type ResourceInfo

type ResourceInfo struct {
	GroupResource schema.GroupResource

	EncodingVersion string
	// Used to calculate decodable versions. Can only be used after all
	// equivalent versions are registered by InstallREST.
	EquivalentResourceMapper runtime.EquivalentResourceRegistry

	// DirectlyDecodableVersions is a list of versions that the converter for REST storage knows how to convert.  This
	// contains items like apiextensions.k8s.io/v1beta1 even if we don't serve that version.
	DirectlyDecodableVersions []schema.GroupVersion
}

ResourceInfo contains the information to register the resource to the storage version API.

Jump to

Keyboard shortcuts

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