clusterversion

package
v0.0.0-...-a56079f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpgradeWithImage          = "UpgradeWithImage"
	UpgradeWithChannelVersion = "UpgradeWithChannelVersion"
)

Variables

View Source
var (
	// OSD_CV_NAME is the name of cluster version singleton
	OSD_CV_NAME = "version"
)

Functions

func GetCurrentVersion

func GetCurrentVersion(clusterVersion *configv1.ClusterVersion) (string, error)

GetCurrentVersion strings a version as a string and error

func GetCurrentVersionMinusOne

func GetCurrentVersionMinusOne(clusterVersion *configv1.ClusterVersion) (string, error)

GetCurrentVersionMinusOne strings a latest version -1 as a string and error

func GetHistory

func GetHistory(clusterVersion *configv1.ClusterVersion, version string) *configv1.UpdateHistory

GetHistory returns a configv1.UpdateHistory from a ClusterVersion

func GetPrecedingVersion

func GetPrecedingVersion(clusterVersion *configv1.ClusterVersion, uc *upgradev1alpha1.UpgradeConfig) string

GetPrecedingVersion returns the version the upgradeConfig is upgrading from

Types

type ClusterVersion

type ClusterVersion interface {
	GetClusterVersion() (*configv1.ClusterVersion, error)
	HasUpgradeCommenced(*upgradev1alpha1.UpgradeConfig) (bool, error)
	EnsureDesiredConfig(uc *upgradev1alpha1.UpgradeConfig) (bool, error)
	HasUpgradeCompleted(*configv1.ClusterVersion, *upgradev1alpha1.UpgradeConfig) bool
	HasDegradedOperators() (*HasDegradedOperatorsResult, error)
}

func NewCVClient

func NewCVClient(c client.Client) ClusterVersion

NewCVClient returns a ClusterVersion interface

type ClusterVersionBuilder

type ClusterVersionBuilder interface {
	New(client.Client) ClusterVersion
}

func NewBuilder

func NewBuilder() ClusterVersionBuilder

NewBuilder returns a CluserVersionBuilder type

type HasDegradedOperatorsResult

type HasDegradedOperatorsResult struct {
	Degraded []string
}

HasDegradedOperatorsResult holds fields that describe a degraded operator

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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