Documentation
¶
Index ¶
- func CompareOpenShiftVersions(cfg *rest.Config, version string) (int, error)
- func CompareVersions(ver1 string, ver2 string) (int, error)
- func GetConsoleYAMLSample(res resource.KubernetesResource) (*consolev1.ConsoleYAMLSample, error)
- func GetPlatformInfo(cfg *rest.Config) (platform.PlatformInfo, error)
- func IsOpenShift(cfg *rest.Config) (bool, error)
- func LookupOpenShiftSemVer(cfg *rest.Config) (platform.OpenShiftVersion, error)
- func LookupOpenShiftVersion(cfg *rest.Config) (platform.OpenShiftVersion, error)
- func LookupOpenShiftVersion3(cfg *rest.Config) (platform.OpenShiftVersion, error)
- func LookupOpenShiftVersion4(cfg *rest.Config) (platform.OpenShiftVersion, error)
- func MapKnownVersion(info platform.PlatformInfo) platform.OpenShiftVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
Supported version format : Major.Minor.Patch e.g.: 2.3.4 return:
-1 : if ver1 < ver2 0 : if ver1 == ver2 1 : if ver1 > ver2
The int value returned should be discarded if err is not nil
func GetConsoleYAMLSample ¶
func GetConsoleYAMLSample(res resource.KubernetesResource) (*consolev1.ConsoleYAMLSample, error)
func GetPlatformInfo ¶
func GetPlatformInfo(cfg *rest.Config) (platform.PlatformInfo, error)
GetPlatformInfo examines the Kubernetes-based environment and determines the running platform, version, & OS. Accepts <nil> or instantiated 'cfg' rest config parameter.
Result: PlatformInfo{ Name: OpenShift, K8SVersion: 1.13+, OS: linux/amd64 }
func IsOpenShift ¶
IsOpenShift is a helper method to simplify boolean OCP checks against GetPlatformInfo results Accepts <nil> or instantiated 'cfg' rest config parameter.
func LookupOpenShiftSemVer ¶
func LookupOpenShiftSemVer(cfg *rest.Config) (platform.OpenShiftVersion, error)
func LookupOpenShiftVersion ¶
func LookupOpenShiftVersion(cfg *rest.Config) (platform.OpenShiftVersion, error)
LookupOpenShiftVersion fetches OpenShift version info from API endpoints *** NOTE: OCP 4.1+ requires elevated user permissions, see PlatformVersioner for details Accepts <nil> or instantiated 'cfg' rest config parameter.
Result: OpenShiftVersion{ Version: 4.1.2 }
func LookupOpenShiftVersion3 ¶
func LookupOpenShiftVersion3(cfg *rest.Config) (platform.OpenShiftVersion, error)
func LookupOpenShiftVersion4 ¶
func LookupOpenShiftVersion4(cfg *rest.Config) (platform.OpenShiftVersion, error)
func MapKnownVersion ¶
func MapKnownVersion(info platform.PlatformInfo) platform.OpenShiftVersion
MapKnownVersion maps from K8S version of PlatformInfo to equivalent OpenShift version
Result: OpenShiftVersion{ Version: 4.1.2 }
Types ¶
This section is empty.