agent

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForBootstrapComplete

func WaitForBootstrapComplete(cluster *Cluster) error

WaitForBootstrapComplete Wait for the bootstrap process to complete on cluster installations triggered by the agent installer.

func WaitForInstallComplete

func WaitForInstallComplete(cluster *Cluster) error

WaitForInstallComplete Waits for the cluster installation triggered by the agent installer to be complete.

Types

type Cluster

type Cluster struct {
	Ctx context.Context
	API *clientSet
	// contains filtered or unexported fields
}

Cluster is a struct designed to help interact with the cluster that is currently being installed by agent installer.

func NewCluster

func NewCluster(ctx context.Context, assetDir string) (*Cluster, error)

NewCluster initializes a Cluster object

func (*Cluster) CanSSHToNodeZero

func (czero *Cluster) CanSSHToNodeZero() bool

CanSSHToNodeZero Checks if ssh to NodeZero succeeds.

func (*Cluster) GetClusterRestAPIMetadata

func (czero *Cluster) GetClusterRestAPIMetadata() (*models.Cluster, error)

GetClusterRestAPIMetadata Retrieve the current cluster metadata from the Agent Rest API

func (*Cluster) HasErrored

func (czero *Cluster) HasErrored(status string) (bool, string)

HasErrored Determine if the cluster installation has errored using the models from the Agent Rest API.

func (*Cluster) IsBootstrapComplete

func (czero *Cluster) IsBootstrapComplete() (bool, bool, error)

IsBootstrapComplete (is-bootstrap-complete, exit-on-error, returned-error) IsBootstrapComplete Determine if the cluster has completed the bootstrap process.

func (*Cluster) IsClusterStuckInReady

func (czero *Cluster) IsClusterStuckInReady() (bool, error)

IsClusterStuckInReady Determine if the cluster has stopped transitioning out of the Ready state

func (*Cluster) IsInstallComplete

func (czero *Cluster) IsInstallComplete() (bool, error)

IsInstallComplete Determine if the cluster has completed installation.

func (*Cluster) IsInstalling

func (czero *Cluster) IsInstalling(status string) (bool, string)

IsInstalling Determine if the cluster is still installing using the models from the Agent Rest API.

func (*Cluster) PrintInfraEnvRestAPIEventList

func (czero *Cluster) PrintInfraEnvRestAPIEventList()

PrintInfraEnvRestAPIEventList Prints the whole event list for debugging

func (*Cluster) PrintInstallStatus

func (czero *Cluster) PrintInstallStatus(cluster *models.Cluster) error

PrintInstallStatus Print a human friendly message using the models from the Agent Rest API.

func (*Cluster) PrintInstallationComplete

func (czero *Cluster) PrintInstallationComplete() error

PrintInstallationComplete Prints the installation complete information

type ClusterKubeAPIClient

type ClusterKubeAPIClient struct {
	Client *kubernetes.Clientset
	// contains filtered or unexported fields
}

ClusterKubeAPIClient is a kube client to interact with the cluster that agent installer is installing.

func NewClusterKubeAPIClient

func NewClusterKubeAPIClient(ctx context.Context, assetDir string) (*ClusterKubeAPIClient, error)

NewClusterKubeAPIClient Create a new kube client to interact with the cluster under install.

func (*ClusterKubeAPIClient) DoesKubeConfigExist

func (kube *ClusterKubeAPIClient) DoesKubeConfigExist() (bool, error)

DoesKubeConfigExist Determine if the kubeconfig for the cluster can be used without errors.

func (*ClusterKubeAPIClient) IsBootstrapConfigMapComplete

func (kube *ClusterKubeAPIClient) IsBootstrapConfigMapComplete() (bool, error)

IsBootstrapConfigMapComplete Detemine if the cluster's bootstrap configmap has the status complete.

func (*ClusterKubeAPIClient) IsKubeAPILive

func (kube *ClusterKubeAPIClient) IsKubeAPILive() (bool, error)

IsKubeAPILive Determine if the cluster under install has initailized the kubenertes API.

type ClusterOpenShiftAPIClient

type ClusterOpenShiftAPIClient struct {
	ConfigClient *configclient.Clientset
	RouteClient  *routeclient.Clientset
	// contains filtered or unexported fields
}

ClusterOpenShiftAPIClient Kube client using the OpenShift clientset instead of the Kubernetes clientset

func NewClusterOpenShiftAPIClient

func NewClusterOpenShiftAPIClient(ctx context.Context, assetDir string) (*ClusterOpenShiftAPIClient, error)

NewClusterOpenShiftAPIClient Create a kube client with OCP understanding

func (*ClusterOpenShiftAPIClient) AreClusterOperatorsInitialized

func (ocp *ClusterOpenShiftAPIClient) AreClusterOperatorsInitialized() (bool, error)

AreClusterOperatorsInitialized Waits for all Openshift cluster operators to initialize

func (*ClusterOpenShiftAPIClient) IsConsoleRouteAvailable

func (ocp *ClusterOpenShiftAPIClient) IsConsoleRouteAvailable() (bool, error)

IsConsoleRouteAvailable Check if the OCP console route is created

func (*ClusterOpenShiftAPIClient) IsConsoleRouteURLAvailable

func (ocp *ClusterOpenShiftAPIClient) IsConsoleRouteURLAvailable() (bool, string, error)

IsConsoleRouteURLAvailable Check if the console route URL is available

func (*ClusterOpenShiftAPIClient) LogClusterOperatorConditions

func (ocp *ClusterOpenShiftAPIClient) LogClusterOperatorConditions() error

LogClusterOperatorConditions Log OCP cluster operator conditions

type NodeZeroRestClient

type NodeZeroRestClient struct {
	Client *client.AssistedInstall

	NodeZeroIP string
	NodeSSHKey []string
	// contains filtered or unexported fields
}

NodeZeroRestClient is a struct to interact with the Agent Rest API that is on node zero.

func NewNodeZeroRestClient

func NewNodeZeroRestClient(ctx context.Context, assetDir string) (*NodeZeroRestClient, error)

NewNodeZeroRestClient Initialize a new rest client to interact with the Agent Rest API on node zero.

func (*NodeZeroRestClient) GetInfraEnvEvents

func (rest *NodeZeroRestClient) GetInfraEnvEvents(infraEnvID *strfmt.UUID) (models.EventList, error)

GetInfraEnvEvents Return the event list for the provided infraEnvID from the Agent Rest API

func (*NodeZeroRestClient) GetRestAPIServiceBaseURL

func (rest *NodeZeroRestClient) GetRestAPIServiceBaseURL() *url.URL

GetRestAPIServiceBaseURL Return the url of the Agent Rest API on node zero

func (*NodeZeroRestClient) IsRestAPILive

func (rest *NodeZeroRestClient) IsRestAPILive() (bool, error)

IsRestAPILive Determine if the Agent Rest API on node zero has initialized

Jump to

Keyboard shortcuts

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