upgrade

package
v2.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package upgrade provides functions of upgrade ODH from v1 to v2 and vaiours v2 versions. It contains both the logic to upgrade the ODH components and the logic to cleanup the deprecated resources.

Index

Constants

View Source
const (
	// DeleteConfigMapLabel is the label for configMap used to trigger operator uninstall
	// TODO: Label should be updated if addon name changes.
	DeleteConfigMapLabel = "api.openshift.com/addon-managed-odh-delete"
)

Variables

This section is empty.

Functions

func CleanupExistingResource added in v2.8.0

func CleanupExistingResource(ctx context.Context,
	cli client.Client,
	platform cluster.Platform,
	dscApplicationsNamespace, dscMonitoringNamespace string,
	oldReleaseVersion cluster.Release,
) error

TODO: remove function once we have a generic solution across all components.

func CreateDefaultDSC

func CreateDefaultDSC(ctx context.Context, cli client.Client) error

CreateDefaultDSC creates a default instance of DSC. Note: When the platform is not Managed, and a DSC instance already exists, the function doesn't re-create/update the resource.

func CreateDefaultDSCI added in v2.7.0

func CreateDefaultDSCI(ctx context.Context, cli client.Client, _ cluster.Platform, appNamespace, monNamespace string) error

CreateDefaultDSCI creates a default instance of DSCI If there exists default-dsci instance already, it will not update DSCISpec on it. Note: DSCI CR modifcations are not supported, as it is the initial prereq setting for the components.

func GetDeployedRelease added in v2.18.0

func GetDeployedRelease(ctx context.Context, cli client.Client) (cluster.Release, error)

func HasDeleteConfigMap

func HasDeleteConfigMap(ctx context.Context, c client.Client) bool

HasDeleteConfigMap returns true if delete configMap is added to the operator namespace by managed-tenants repo. It returns false in all other cases.

func OperatorUninstall

func OperatorUninstall(ctx context.Context, cli client.Client) error

OperatorUninstall deletes all the externally generated resources. This includes DSCI, namespace created by operator (but not workbench or MR's), subscription and CSV.

func RemoveLabel added in v2.10.1

func RemoveLabel(ctx context.Context, cli client.Client, objectName string, labelKey string) error

Types

type ResourceSpec added in v2.11.0

type ResourceSpec struct {
	Gvk       schema.GroupVersionKind
	Namespace string
	// path to the field, like "metadata", "name"
	Path []string
	// set of values for the field to match object, any one matches
	Values []string
}

Jump to

Keyboard shortcuts

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