Documentation
¶
Index ¶
- Constants
- Variables
- func IsUpgradePathSupported(vdb *vapi.VerticaDB, newAnnotations map[string]string) (ok bool, failureReason string)
- func ParseVersionOutput(op string) map[string]string
- type Components
- type Info
- func (i *Info) IsEqual(other *Info) bool
- func (i *Info) IsEqualExceptPatch(other *Info) bool
- func (i *Info) IsEqualOrNewer(inVer string) bool
- func (i *Info) IsOlder(inVer string) bool
- func (i *Info) IsSupported() bool
- func (i *Info) IsUnsupported() bool
- func (i *Info) IsValidUpgradePath(targetVer string) (ok bool, failureReason string)
Constants ¶
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 ¶
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
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
MakeInfoFromStr will construct an Info struct by parsing the version string
func MakeInfoFromVdb ¶ added in v1.3.0
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) IsEqualExceptPatch ¶ added in v1.4.0
IsEqualExceptPatch compares two versions major/minor versions to see if they are equal
func (*Info) IsEqualOrNewer ¶
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
IsOlder returns true if the version in info is older than the given version
func (*Info) IsSupported ¶
IsSupported returns true if the version in the vdb is a supported version by the operator.
func (*Info) IsUnsupported ¶
IsUnsupported returns true if the version in the vdb is unsupported by the operator.