Documentation ¶
Overview ¶
Package platformutils is a Go library of utility functions for working with the PlatformStatus of OpenShift clusters
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPlatformSupported ¶
func IsPlatformSupported(platform configv1.PlatformType, supportedPlatforms []configv1.PlatformType) bool
IsPlatformSupported checks if specified platform is in a slice of supported platforms
Types ¶
type InfrastructureClient ¶
InfrastructureClient is a kubernetes client that is capable of retrieving the items necessary to determine the infrastrcture and platform status
func NewClient ¶
func NewClient(ctx context.Context) (*InfrastructureClient, error)
NewClient provides a new InfrastructureClient
func (*InfrastructureClient) GetInfrastructureStatus ¶
func (c *InfrastructureClient) GetInfrastructureStatus() (*configv1.InfrastructureStatus, error)
GetInfrastructureStatus fetches the InfrastructureStatus for the cluster. It uses GetPlatformStatus to return a well-formed PlatformStatus, even if the CR is missing this data.
func (*InfrastructureClient) GetPlatformStatus ¶
func (c *InfrastructureClient) GetPlatformStatus(infraStatus *configv1.InfrastructureStatus) (*configv1.PlatformStatus, error)
GetPlatformStatus provides a backwards-compatible way to look up the PlatformStatus configuration for a cluster, if provided with an InfrastructureStatus. OCP clusters that were originally installed prior to version 4.2 on AWS expose the region config only through the install-config. Non-AWS clusters and all installed on 4.2 or later expose this information via the infrastructure custom resource.