platformutils

package module
v0.0.0-...-71640c6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

README

platformutils

GoDoc Go

Go library of utility functions for working with the platform details of OpenShift clusters

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

type InfrastructureClient struct {
	Client  client.Client
	Context context.Context
}

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.

Jump to

Keyboard shortcuts

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