migration

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

This package contains helper functions that can be reused by all migrations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachInstance added in v0.17.0

func ForEachInstance(client *kube.Client, ns string, f func(ov *kudoapi.Instance) error) error

ForEachInstance calls the given function for all instances in the given namespace

func ForEachNamespace added in v0.17.0

func ForEachNamespace(client *kube.Client, f func(ns string) error) error

ForEachNamespace calls the given function for all namespaces in the cluster

func ForEachOperatorVersion added in v0.17.0

func ForEachOperatorVersion(client *kube.Client, ns string, f func(ov *kudoapi.OperatorVersion) error) error

ForEachOperatorVersion calls the given function for all operatorversions in the given namespace

Types

type Migrater

type Migrater interface {
	// CanMigrate checks if there are any conditions that would prevent this migration to run
	// This function should only return an error if it is sure that the migration can not be executed
	CanMigrate() error

	// Migrate executes the migration. The call must be idempotent and ignore already migrated resources
	// It can be called multiple times on the same cluster and encounter migrated and unmigrated resources.
	Migrate() error
}

Migrater is the base interface for migrations.

Jump to

Keyboard shortcuts

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