openshift

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareOpenShiftVersion added in v1.4.3

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

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

func GetPlatformName(cfg *rest.Config) (string, error)

GetPlatformName is a helper method to return the platform name from GetPlatformInfo results Accepts <nil> or instantiated 'cfg' rest config parameter.

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

Jump to

Keyboard shortcuts

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