openshift

package
v1.6.0-prerelease.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FigureStdout added in v1.5.1

func FigureStdout(stdout string, columns map[string][]interface{}) (result []map[string]interface{}, err error)

will return [map["NAME":"ip-10-0-130-210.us-east-2.compute.internal","STATUS":"Ready","ROLES":"worker"...]]

func GenerateOCLoginCMD

func GenerateOCLoginCMD(server string, username string, password string, clusterid string, additioanlFlags ...string) string

func OcLogin

func OcLogin(ocLoginAtter OcAttributes) (string, error)

func RestartMUOPods added in v1.5.1

func RestartMUOPods(connection *client.Connection, clusterID string) error

func RetryCMDRun

func RetryCMDRun(cmd string, timeout time.Duration) (string, error)

func WaitClusterUpgradeFinished added in v1.5.1

func WaitClusterUpgradeFinished(connection *client.Connection, clusterID string) error

func WaitForOperatorsToBeReady added in v1.5.1

func WaitForOperatorsToBeReady(connection *client.Connection, clusterID string, timeout int) error

func WaitForUpgradePolicyToState added in v1.5.1

func WaitForUpgradePolicyToState(connection *client.Connection, clusterID string, policyID string, state string, timeout int) error

WaitForUpgradePolicyToState will time out after <timeout> minutes Be careful for state completed. Make sure the automatic policy is in status of other status rather than pending

Types

type Console added in v1.5.0

type Console struct {
	ClusterName string
	ClusterID   string
	KubePath    string
	Private     bool
}

Console is openshift webconsole struct

func NewConsole added in v1.5.0

func NewConsole(clusterID string, connection *client.Connection) (console *Console, err error)

NewConsole need clusterID and connection passed. Will return the console with login=true

func (*Console) Config added in v1.5.0

func (c *Console) Config(kubeConfig string) (*Console, error)

Config will return the console which had been configured

func (*Console) GetClusterVersion added in v1.5.1

func (c *Console) GetClusterVersion() (version string, err error)

GetClusterVersion will return the Cluster version

func (*Console) GetPods added in v1.5.1

func (c *Console) GetPods(namespace ...string) ([]*Pod, error)

GetPods function will return list of *Pod with informations If namespace passed as parameter, will return the pod list of the specified namespace

func (*Console) IsConfiged added in v1.5.0

func (c *Console) IsConfiged() bool

IsConfiged will return whether the config file of the console is existed

type OcAttributes

type OcAttributes struct {
	Server          string
	Username        string
	Password        string
	ClusterID       string
	AdditioanlFlags []string
	Timeout         time.Duration
}

type Pod added in v1.5.1

type Pod struct {
	Name      string `json:"name,omitempty"`
	IP        string `json:"ip,omitempty"`
	Status    string `json:"status,omitempty"`
	StartTime string `json:"startTime,omitempty"`
	HostIP    string `json:"hostIP,omitempty"`
}

Pod struct is struct that contains info

Jump to

Keyboard shortcuts

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