Documentation
¶
Overview ¶
Package migrations provides concrete migration implementations for use with the migration.Migrator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OriginMetadataMigration ¶
type OriginMetadataMigration struct {
client.Client
Origin *origin.Origin
Type client.Object
ListOptions []client.ListOption
}
OriginMetadataMigration migrates objects from an old origin metadata layout (where the source name was stored as a label) to the current layout (where it is stored as an annotation). Objects that have already been migrated are skipped. The migration lists all objects of the given Type that still carry the old-style name label and patches each one to move the name value into an annotation.
func (*OriginMetadataMigration) Migrate ¶
func (m *OriginMetadataMigration) Migrate(ctx context.Context) error
Migrate lists all objects that still have the old-style origin name label and patches each one to move the name into an annotation. It retries on conflict and ignores objects that have been deleted between listing and patching.