oc

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sResource

type K8sResource struct {
	Items []struct {
		Metadata struct {
			Name string `json:"name"`
		} `json:"metadata"`
		Status struct {
			Conditions []struct {
				LastTransitionTime time.Time `json:"lastTransitionTime"`
				Reason             string    `json:"reason"`
				Status             string    `json:"status"`
				Type               string    `json:"type"`
			} `json:"conditions"`
		} `json:"status,omitempty"`
	} `json:"items"`
}

type OcConfig

type OcConfig struct {
	Context string
	Cluster string
	// contains filtered or unexported fields
}

func NewOcConfig

func NewOcConfig(runner OcRunner, context string, clusterName string) OcConfig

func UseOCWithConfig

func UseOCWithConfig(machineName string) OcConfig

UseOcWithConfig return the oc binary along with valid kubeconfig

func (OcConfig) ApproveNodeCSR

func (oc OcConfig) ApproveNodeCSR() error

ApproveNodeCSR approves the certificate for the node.

func (OcConfig) RunOcCommand

func (oc OcConfig) RunOcCommand(args ...string) (string, string, error)

func (OcConfig) RunOcCommandPrivate

func (oc OcConfig) RunOcCommandPrivate(args ...string) (string, string, error)

func (OcConfig) WaitForOpenshiftResource

func (oc OcConfig) WaitForOpenshiftResource(resource string) error

type OcLocalRunner

type OcLocalRunner struct {
	OcBinaryPath   string
	KubeconfigPath string
}

func (OcLocalRunner) GetKubeconfigPath

func (oc OcLocalRunner) GetKubeconfigPath() string

func (OcLocalRunner) Run

func (oc OcLocalRunner) Run(args ...string) (string, string, error)

func (OcLocalRunner) RunPrivate

func (oc OcLocalRunner) RunPrivate(args ...string) (string, string, error)

type OcRunner

type OcRunner interface {
	Run(args ...string) (string, string, error)
	RunPrivate(args ...string) (string, string, error)
	GetKubeconfigPath() string
}

Jump to

Keyboard shortcuts

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