migrations

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package migrations contains idempotent data migrations that run at operator startup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunnable

func NewRunnable(c client.Client) manager.Runnable

NewRunnable returns a manager.Runnable that executes all migrations once after leader election. Register it with mgr.Add().

Types

type Migration

type Migration struct {
	Name string
	Fn   func(ctx context.Context, c client.Client) error
}

Migration is a named, idempotent data migration that runs at operator startup. Each migration reads its own configuration (e.g. namespace) from environment variables so RunAll doesn't need resource-specific parameters.

Jump to

Keyboard shortcuts

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