openshift

package
v0.0.0-...-5f1e80b Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareOpenShiftVersions

func CompareOpenShiftVersions(cfg *rest.Config, version string) (int, error)

func CompareVersions

func CompareVersions(ver1 string, ver2 string) (int, error)

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 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

func IsOpenShift(cfg *rest.Config) (bool, error)

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.

Jump to

Keyboard shortcuts

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