version

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This is the minimum vertica version that the operator currently supports.
	// If the vertica image that we deploy is older than this then the operator
	// aborts the reconiliation process.
	MinimumVersion = "v11.0.1"
	// The version that added read-only state
	NodesHaveReadOnlyStateVersion = "v11.0.2"
	// The minimum version that allows for online upgrade.
	OnlineUpgradeVersion = "v11.1.0"
	// The version that added the --force option to reip to handle up nodes
	ReIPAllowedWithUpNodesVersion = "v11.1.0"
	// The version of the server that doesn't support cgroup v2
	CGroupV2UnsupportedVersion = "v12.0.0"
	// The minimum version that can start Vertica's http server
	HTTPServerMinVersion = "v12.0.1"
	// The minimum version that we can use the option with create DB to skip the
	// package install.
	CreateDBSkipPackageInstallVersion = "v12.0.1"
)

Variables

View Source
var UpgradePaths = map[Components]Info{
	{11, 0, 0}: {"v11.1.x", Components{11, 1, 0}},
	{11, 0, 1}: {"v11.1.x", Components{11, 1, 0}},
	{11, 0, 2}: {"v11.1.x", Components{11, 1, 0}},
	{11, 1, 0}: {"v12.0.x", Components{12, 0, 0}},
	{11, 1, 1}: {"v12.0.x", Components{12, 0, 0}},
}

UpgradePaths has all of the vertica releases supported by the operator. For each release, the next release that must be upgrade too. Use this map to know if a new version is the next supported version by Vertica.

As a general rule of thumb, this map needs to be updated each time a new Vertica version introduces a new major or minor version (e.g. 11.1.x -> 12.0.x). You don't need to update it for patch releases because we only enforce the upgrade path for major/minor versions.

Functions

func IsUpgradePathSupported added in v1.3.0

func IsUpgradePathSupported(vdb *vapi.VerticaDB, newAnnotations map[string]string) (ok bool, failureReason string)

IsUpgradePathSupported returns true if the version annotations is a valid version transition from the version in the Vdb.

func ParseVersionOutput added in v1.3.0

func ParseVersionOutput(op string) map[string]string

ParseVersionOutput will parse the raw output from the --version call and build an annotation map.

Types

type Components added in v1.3.0

type Components struct {
	VdbMajor, VdbMinor, VdbPatch int
}

type Info

type Info struct {
	// The version that was extracted from a Vdb
	VdbVer string
	Components
}

func MakeInfoFromStr added in v1.3.0

func MakeInfoFromStr(ver string) (*Info, bool)

MakeInfoFromStr will construct an Info struct by parsing the version string

func MakeInfoFromVdb added in v1.3.0

func MakeInfoFromVdb(vdb *vapi.VerticaDB) (*Info, bool)

MakeInfoFromVdb will construct an Info struct by extracting the version from the given vdb. This returns false if it was unable to get the version from the vdb.

func (*Info) IsEqual added in v1.3.0

func (i *Info) IsEqual(other *Info) bool

IsEqual compares two versions to see if they are equal

func (*Info) IsEqualExceptPatch added in v1.4.0

func (i *Info) IsEqualExceptPatch(other *Info) bool

IsEqualExceptPatch compares two versions major/minor versions to see if they are equal

func (*Info) IsEqualOrNewer

func (i *Info) IsEqualOrNewer(inVer string) bool

IsEqualOrNewer returns true if the version in the Vdb is is equal or newer than the given version

func (*Info) IsOlder added in v1.7.0

func (i *Info) IsOlder(inVer string) bool

IsOlder returns true if the version in info is older than the given version

func (*Info) IsSupported

func (i *Info) IsSupported() bool

IsSupported returns true if the version in the vdb is a supported version by the operator.

func (*Info) IsUnsupported

func (i *Info) IsUnsupported() bool

IsUnsupported returns true if the version in the vdb is unsupported by the operator.

func (*Info) IsValidUpgradePath added in v1.3.0

func (i *Info) IsValidUpgradePath(targetVer string) (ok bool, failureReason string)

IsValidUpgradePath will return true if the current version is allowed to upgrade to targetVer. This will return false if the path isn't compatible.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳