supportedversion

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LatestSupportedVersion      = semver.MustParse("4.22.0")
	MinSupportedVersion         = semver.MustParse("4.14.0")
	IBMCloudMinSupportedVersion = semver.MustParse("4.14.0")
)

LatestSupportedVersion is the latest minor OCP version supported by the HyperShift operator. NOTE: The .0 (z release) should be ignored. It's only here to support semver parsing.

Functions

func GetKubeVersionForSupportedVersion added in v0.1.58

func GetKubeVersionForSupportedVersion(supportedVersion semver.Version) (*semver.Version, error)

func GetMinSupportedVersion added in v0.1.11

func GetMinSupportedVersion(hc *hyperv1.HostedCluster) semver.Version

Get the minimum OCP version for HostedClusters, not the management cluster where HO runs.

func GetRevision added in v0.1.64

func GetRevision() string

GetRevision returns the overall codebase version. It's for detecting what code a binary was built from.

func IsValidReleaseVersion

func IsValidReleaseVersion(version, currentVersion, maxSupportedVersion, minSupportedVersion *semver.Version, networkType hyperv1.NetworkType, platformType hyperv1.PlatformType) error

func LookupDefaultOCPVersion added in v0.1.64

func LookupDefaultOCPVersion(ctx context.Context, releaseStream string, client crclient.Client) (ocpVersion, error)

LookupDefaultOCPVersion retrieves the default OCP version from release streams. It supports two modes of operation:

  1. When releaseStream is empty: Uses the default release stream (4-stable-multi) and looks up supported OCP versions from the HyperShift operator's ConfigMap to find the latest supported version that is not a release candidate.

  2. When releaseStream is provided: Uses the specified release stream. Multi-arch streams (ending in "-multi") use the multi-arch endpoint, while single-arch streams use the amd64 endpoint. In both cases, the function validates the version against the supported-versions ConfigMap and filters out release candidates.

This ensures compatibility with the currently installed HyperShift operator version and prevents the use of unsupported release candidate versions.

func LookupLatestSupportedRelease added in v0.1.10

func LookupLatestSupportedRelease(ctx context.Context, hc *hyperv1.HostedCluster) (string, error)

LookupLatestSupportedRelease picks the latest multi-arch image supported by this Hypershift Operator

func String added in v0.1.64

func String() string

func Supported

func Supported() []string

func ValidateVersionSkew added in v0.1.71

func ValidateVersionSkew(hostedClusterVersion, nodePoolVersion *semver.Version) error

ValidateVersionSkew validates the version skew between HostedCluster and NodePool versions. Returns nil if the version skew is supported, otherwise returns a descriptive error. All 4.y versions support n-3 version skew (e.g., 4.18 HostedCluster supports NodePools running 4.17, 4.16, and 4.15).

Types

type SupportedVersions added in v0.1.64

type SupportedVersions struct {
	Versions []string `json:"versions"`
}

func GetSupportedOCPVersions added in v0.1.64

func GetSupportedOCPVersions(ctx context.Context, namespace string, client crclient.Client, supportedVersions *corev1.ConfigMap) (SupportedVersions, string, error)

GetSupportedOCPVersions retrieves the supported OCP versions from the server. It fetches the ConfigMap containing the supported versions and the server version from the specified namespace and unmarshals the versions into a SupportedVersions struct. If the ConfigMap or the required keys are not found, it returns an error. The function returns the supported versions, the server version, and any error encountered during the process.

Jump to

Keyboard shortcuts

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