Documentation
¶
Index ¶
- Variables
- func Detect()
- func DevicesDefaultToFastForThisPlatform() (bool, error)
- func GetPlatformType() (configv1.PlatformType, error)
- func IsPlatformOpenShift() (bool, error)
- func IsPlatformROSAHCP() (bool, error)
- func PlatformsShouldSkipObjectStore() (bool, error)
- func SetFakePlatformInstanceForTesting(isOpenShift bool, platformType configv1.PlatformType)
- func SkipObjectStore(p configv1.PlatformType) bool
- func UnsetFakePlatformInstanceForTesting()
Constants ¶
This section is empty.
Variables ¶
var ( ErrorPlatformNotDetected = errors.New("platform not detected") // SkipObjectStorePlatforms is a list of all PlatformTypes where CephObjectStores will not be deployed. SkipObjectStorePlatforms = []configv1.PlatformType{ configv1.AWSPlatformType, configv1.GCPPlatformType, configv1.AzurePlatformType, configv1.IBMCloudPlatformType, } )
Functions ¶
func DevicesDefaultToFastForThisPlatform ¶
DevicesDefaultToFastForThisPlatform determines whether we should TuneFastDeviceClass for this platform. It returns false if we shouldn't TuneFastDeviceClass or if platform is not yet detected.
func GetPlatformType ¶
func GetPlatformType() (configv1.PlatformType, error)
GetPlatformType is used to get the PlatformType of the running cluster. It returns a PlatformType only when running on OpenShift clusters. If it is not running on OpenShift or platform is not yet detected, it return empty PlatformType.
func IsPlatformOpenShift ¶
IsPlatformOpenShift returns true if platform is detected to be OpenShift. It returns false in all other cases, including when platform is not yet detected.
func IsPlatformROSAHCP ¶
func PlatformsShouldSkipObjectStore ¶
PlatformsShouldSkipObjectStore determines whether an object store should be created for the platform. It returns false if ObjectStore should not be skipped or if platform is not yet detected.
func SetFakePlatformInstanceForTesting ¶
func SetFakePlatformInstanceForTesting(isOpenShift bool, platformType configv1.PlatformType)
SetFakePlatformInstanceForTesting can be used to fake a Platform while testing. It should only be used for testing. This is not thread-safe.
func SkipObjectStore ¶
func SkipObjectStore(p configv1.PlatformType) bool
func UnsetFakePlatformInstanceForTesting ¶
func UnsetFakePlatformInstanceForTesting()
UnsetFakePlatformInstanceForTesting can be used to unset the fake Platform while testing. It should only be used for testing. This is not thread-safe.
Types ¶
This section is empty.