migration

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package migration holds one-shot storage migrations run at apiserver startup.

tunnelv1alpha2 translates legacy core.apoxy.dev/v1alpha2 Tunnel/TunnelAgent objects into the vpc.apoxy.dev/v1alpha1 group (VPCNetwork/VPCService). The legacy kinds are removed from the scheme in the same change, so their stored objects can no longer be read through the typed client; the migration reads them straight from the kine backend using frozen private struct copies, then writes the replacements through the apiserver and tombstones the old keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, etcd endpoint.ETCDConfig, restCfg *rest.Config) error

Migrate connects to the kine backend and the local apiserver, then runs the one-shot legacy-Tunnel migration. It is a no-op once no legacy objects remain, so it is safe to run on every startup.

func Run

func Run(ctx context.Context, kv kvStore, vpc vpcclient.VpcV1alpha1Interface) error

Run performs the migration against the given kine KV client (legacy reads + tombstones) and vpc client (replacement writes). Each legacy key is deleted only after its replacement is durably created, so a completed migration leaves an empty legacy prefix and a re-run is a no-op; a partial failure re-migrates only the remainder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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