Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateStorageVersion ¶
func MigrateStorageVersion(ctx context.Context, logger *zap.SugaredLogger, migrator *Migrator, crdGroups []string)
performs crd storage version upgrade lists all the resources and, keeps only one storage version on the crd continues the execution, even though exception happens
Types ¶
type Migrator ¶ added in v0.68.1
type Migrator struct {
// contains filtered or unexported fields
}
Migrator will read custom resource definitions and upgrade the associated resources to the latest storage version
func NewMigrator ¶ added in v0.68.1
func NewMigrator(d dynamic.Interface, a apixclient.Interface, logger *zap.SugaredLogger) *Migrator
NewMigrator will return a new Migrator
func (*Migrator) Migrate ¶ added in v0.68.1
Migrate takes a group resource (ie. resource.some.group.dev) and updates instances of the resource to the latest storage version
This is done by listing all the resources and performing an empty patch which triggers a migration on the K8s API server
Finally the migrator will update the CRD's status and drop older storage versions
Click to show internal directories.
Click to hide internal directories.