Documentation
¶
Index ¶
- Variables
- func GetKubeVersionForSupportedVersion(supportedVersion semver.Version) (*semver.Version, error)
- func GetMinSupportedVersion(hc *hyperv1.HostedCluster) semver.Version
- func GetRevision() string
- func IsValidReleaseVersion(...) error
- func LookupDefaultOCPVersion(ctx context.Context, releaseStream string, client crclient.Client) (ocpVersion, error)
- func LookupLatestSupportedRelease(ctx context.Context, hc *hyperv1.HostedCluster) (string, error)
- func String() string
- func Supported() []string
- type SupportedVersions
Constants ¶
This section is empty.
Variables ¶
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 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:
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.
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
LookupLatestSupportedRelease picks the latest multi-arch image supported by this Hypershift Operator
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.