Documentation ¶
Index ¶
- func CompareOpenShiftVersion(cfg *rest.Config, version string) (int, error)
- func GetConsoleYAMLSample(res client.Object) (*consolev1.ConsoleYAMLSample, error)
- func GetPlatformInfo(cfg *rest.Config) (platform.PlatformInfo, error)
- func GetPlatformName(cfg *rest.Config) (string, error)
- func IsOpenShift(cfg *rest.Config) (bool, error)
- func LookupOpenShiftVersion(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 CompareOpenShiftVersion ¶ added in v1.4.3
Supported platform: OpenShift cfg : OpenShift platform config, use runtime config if nil is passed in. version: Supported version format : Major.Minor
e.g.: 4.3
func GetConsoleYAMLSample ¶ added in v1.4.3
func GetConsoleYAMLSample(res client.Object) (*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 GetPlatformName ¶ added in v1.4.7
GetPlatformName is a helper method to return the platform name from GetPlatformInfo results Accepts <nil> or instantiated 'cfg' rest config parameter.
func IsOpenShift ¶
IsOpenShift is a helper method to simplify boolean OCP checks against GetPlatformInfo results Accepts <nil> or instantiated 'cfg' rest config parameter.
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 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.