supportedversion

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LatestSupportedVersion = semver.MustParse("4.20.0")
	MinSupportedVersion    = 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

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 multi-arch release streams. It supports two modes of operation:

  1. When releaseStream is empty: Uses the default release stream and looks up supported OCP versions from the HyperShift operator's ConfigMap to find the latest supported version that is not a release candidate. This ensures compatibility with the current HyperShift operator version.

  2. When releaseStream is provided: Uses the specified release stream to retrieve the OCP version directly from the multi-arch release API.

The function defaults to multi-arch release streams for broader architecture support.

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

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