migrations

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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.

type OriginTypeMigration

type OriginTypeMigration struct {
	Origin *origin.Origin
	Type   client.Object
}

OriginTypeMigration pairs an Origin with a Kubernetes object type that should be migrated.

Jump to

Keyboard shortcuts

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