openshift

package
v0.0.0-...-9eefff9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*resources.Resources
	// contains filtered or unexported fields
}

func New

func New(logger logr.Logger) (*Client, error)

func NewFromKubeconfig

func NewFromKubeconfig(filename string, logger logr.Logger) (*Client, error)

func NewFromRestConfig

func NewFromRestConfig(cfg *rest.Config, logger logr.Logger) (*Client, error)

func (*Client) GetJobLogs

func (c *Client) GetJobLogs(ctx context.Context, name, namespace string) (string, error)

GetJobLogs fetches the logs of a job's first container

func (*Client) GetPodLogs

func (c *Client) GetPodLogs(ctx context.Context, name, namespace string) (string, error)

GetPodLogs fetches the logs of a pod's default container

func (*Client) HCPClusterHealthy

func (c *Client) HCPClusterHealthy(ctx context.Context, computeNodes int, timeout time.Duration) error

HCPClusterHealthy waits for the cluster to be in a health "ready" state by confirming nodes are available

func (*Client) Impersonate

func (c *Client) Impersonate(user string, groups ...string) (*Client, error)

Impersonate returns a copy of the client with a new ImpersonationConfig established on the underlying client, acting as the provided user

backplaneUser, _ := oc.Impersonate("test-user@redhat.com", "dedicated-admins")

func (*Client) OSDClusterHealthy

func (c *Client) OSDClusterHealthy(ctx context.Context, jobName, reportDir string, timeout time.Duration) error

OSDClusterHealthy waits for the cluster to be in a healthy "ready" state by confirming the osd-ready-job finishes successfully

func (*Client) UpgradeOperator

func (c *Client) UpgradeOperator(ctx context.Context, name, namespace string) error

func (*Client) WatchJob

func (c *Client) WatchJob(ctx context.Context, namespace string, name string) error

WatchJob function streams job events and returns nil on success. If the watched job fails, is disconnected, the watch produces an error, the watch channel closes, or the context is cancelled at timeout, it will return an error containing event in question.

Jump to

Keyboard shortcuts

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