Documentation ¶
Index ¶
- func WaitForBootstrapComplete(cluster *Cluster) error
- func WaitForInstallComplete(cluster *Cluster) error
- type Cluster
- func (czero *Cluster) GetClusterRestAPIMetadata() (*models.Cluster, error)
- func (czero *Cluster) HasErrored(status string) (bool, string)
- func (czero *Cluster) IsBootstrapComplete() (bool, bool, error)
- func (czero *Cluster) IsClusterStuckInReady() (bool, error)
- func (czero *Cluster) IsInstallComplete() (bool, error)
- func (czero *Cluster) IsInstalling(status string) (bool, string)
- func (czero *Cluster) PrintInfraEnvRestAPIEventList()
- func (czero *Cluster) PrintInstallStatus(cluster *models.Cluster) error
- func (czero *Cluster) PrintInstallationComplete() error
- type ClusterKubeAPIClient
- type ClusterOpenShiftAPIClient
- func (ocp *ClusterOpenShiftAPIClient) AreClusterOperatorsInitialized() (bool, error)
- func (ocp *ClusterOpenShiftAPIClient) IsConsoleRouteAvailable() (bool, error)
- func (ocp *ClusterOpenShiftAPIClient) IsConsoleRouteURLAvailable() (bool, string, error)
- func (ocp *ClusterOpenShiftAPIClient) LogClusterOperatorConditions() error
- type NodeZeroRestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForBootstrapComplete ¶
WaitForBootstrapComplete Wait for the bootstrap process to complete on cluster installations triggered by the agent installer.
func WaitForInstallComplete ¶
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 ¶
NewCluster initializes a Cluster object
func (*Cluster) GetClusterRestAPIMetadata ¶
GetClusterRestAPIMetadata Retrieve the current cluster metadata from the Agent Rest API
func (*Cluster) HasErrored ¶
HasErrored Determine if the cluster installation has errored using the models from the Agent Rest API.
func (*Cluster) IsBootstrapComplete ¶
IsBootstrapComplete (is-bootstrap-complete, exit-on-error, returned-error) IsBootstrapComplete Determine if the cluster has completed the bootstrap process.
func (*Cluster) IsClusterStuckInReady ¶
IsClusterStuckInReady Determine if the cluster has stopped transitioning out of the Ready state
func (*Cluster) IsInstallComplete ¶
IsInstallComplete Determine if the cluster has completed installation.
func (*Cluster) IsInstalling ¶
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 ¶
PrintInstallStatus Print a human friendly message using the models from the Agent Rest API.
func (*Cluster) PrintInstallationComplete ¶
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 // 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