util

package
v3.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetworkDiagNamespacePrefix       = "network-diag-ns"
	NetworkDiagGlobalNamespacePrefix = "network-diag-global-ns"
	NetworkDiagPodNamePrefix         = "network-diag-pod"
	NetworkDiagSCCNamePrefix         = "network-diag-privileged"
	NetworkDiagSecretName            = "network-diag-secret"

	NetworkDiagTestPodNamePrefix      = "network-diag-test-pod"
	NetworkDiagTestServiceNamePrefix  = "network-diag-test-service"
	NetworkDiagContainerMountPath     = "/host"
	NetworkDiagDefaultLogDir          = "/tmp/openshift/"
	NetworkDiagNodeLogDirPrefix       = "/nodes"
	NetworkDiagMasterLogDirPrefix     = "/master"
	NetworkDiagPodLogDirPrefix        = "/pods"
	NetworkDiagDefaultTestPodProtocol = string(kapi.ProtocolTCP)
	NetworkDiagDefaultTestPodPort     = 8080
)

Variables

This section is empty.

Functions

func Execute

func Execute(factory *osclientcmd.Factory, command []string, pod *kapi.Pod, in io.Reader, out, errOut io.Writer) error

Execute() will run a command in a pod and streams the out/err

func ExpectedConnectionStatus

func ExpectedConnectionStatus(ns1, ns2 string, vnidMap map[string]uint32) bool

Determine expected connection status for the given pods true indicates success and false means failure

func GetGlobalAndNonGlobalPods

func GetGlobalAndNonGlobalPods(pods []kapi.Pod, vnidMap map[string]uint32) ([]kapi.Pod, []kapi.Pod)

func GetLocalAndNonLocalDiagnosticPods

func GetLocalAndNonLocalDiagnosticPods(kubeClient kclientset.Interface) ([]kapi.Pod, []kapi.Pod, error)

Get local/non-local pods in network diagnostic namespaces

func GetLocalNode

func GetLocalNode(kubeClient kclientset.Interface) (string, string, error)

func GetNetworkDiagDefaultPodImage

func GetNetworkDiagDefaultPodImage() string

func GetNetworkDiagDefaultTestPodImage

func GetNetworkDiagDefaultTestPodImage() string

func GetNodes

func GetNodes(kubeClient kclientset.Interface) ([]kapi.Node, error)

func GetOpenShiftNetworkPlugin

func GetOpenShiftNetworkPlugin(clusterNetworkClient networktypedclient.ClusterNetworksGetter) (string, bool, error)

func GetSchedulableNodes

func GetSchedulableNodes(kubeClient kclientset.Interface) ([]kapi.Node, error)

func PrintPod

func PrintPod(pod *kapi.Pod) string

Types

type ContainerID

type ContainerID struct {
	// The type of the container runtime. e.g. 'docker', 'rkt'.
	Type string
	// The identification of the container, this is comsumable by
	// the underlying container runtime. (Note that the container
	// runtime interface still takes the whole struct as input).
	ID string
}

ContainerID is a type that identifies a container.

func ParseContainerID

func ParseContainerID(containerID string) ContainerID

Convenience method for creating a ContainerID from an ID string.

func (*ContainerID) IsEmpty

func (c *ContainerID) IsEmpty() bool

func (*ContainerID) ParseString

func (c *ContainerID) ParseString(data string) error

func (*ContainerID) String

func (c *ContainerID) String() string

type LogInterface

type LogInterface struct {
	Result types.DiagnosticResult
	Logdir string
}

func (*LogInterface) LogMaster

func (l *LogInterface) LogMaster()

func (*LogInterface) LogNode

func (l *LogInterface) LogNode(kubeClient kclientset.Interface)

func (*LogInterface) LogServices

func (l *LogInterface) LogServices()

func (*LogInterface) LogSystem

func (l *LogInterface) LogSystem()

func (*LogInterface) Run

func (l *LogInterface) Run(cmd, outfile string)

Jump to

Keyboard shortcuts

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