in_pod

package
v3.10.0-0.69.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InPodDiagnosticRecommendedName = "inpod-poddiagnostic"

	// Standard locations for the secrets mounted in pods
	StandardMasterCaPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
	StandardTokenPath    = "/var/run/secrets/kubernetes.io/serviceaccount/token"
	StandardMasterUrl    = "https://kubernetes.default.svc.cluster.local"
)
View Source
const (
	PodCheckAuthName = "PodCheckAuth"
)
View Source
const (
	PodCheckDnsName = "PodCheckDns"
)

Variables

This section is empty.

Functions

func NewCommandPodDiagnostics

func NewCommandPodDiagnostics(name string, out io.Writer) *cobra.Command

NewCommandPodDiagnostics is the command for running pod diagnostics.

Types

type PodCheckAuth

type PodCheckAuth struct {
}

PodCheckAuth is a Diagnostic to check that a pod can authenticate as expected

func (PodCheckAuth) CanRun

func (d PodCheckAuth) CanRun() (bool, error)

CanRun is part of the Diagnostic interface; it determines if the conditions are right to run this diagnostic.

func (PodCheckAuth) Check

Check is part of the Diagnostic interface; it runs the actual diagnostic logic

func (PodCheckAuth) Description

func (d PodCheckAuth) Description() string

Description is part of the Diagnostic interface and provides a user-focused description of what the diagnostic does.

func (PodCheckAuth) Name

func (d PodCheckAuth) Name() string

Name is part of the Diagnostic interface and just returns name.

func (PodCheckAuth) Requirements

func (d PodCheckAuth) Requirements() (client bool, host bool)

type PodCheckDns

type PodCheckDns struct {
}

PodCheckDns is a Diagnostic to check that DNS within a pod works as expected

func (PodCheckDns) CanRun

func (d PodCheckDns) CanRun() (bool, error)

CanRun is part of the Diagnostic interface; it determines if the conditions are right to run this diagnostic.

func (PodCheckDns) Check

Check is part of the Diagnostic interface; it runs the actual diagnostic logic

func (PodCheckDns) Description

func (d PodCheckDns) Description() string

Description is part of the Diagnostic interface and just returns the diagnostic description.

func (PodCheckDns) Name

func (d PodCheckDns) Name() string

Name is part of the Diagnostic interface and just returns name.

func (PodCheckDns) Requirements

func (d PodCheckDns) Requirements() (client bool, host bool)

type PodDiagnosticsOptions

type PodDiagnosticsOptions struct {
	// list of diagnostic names to limit what is run
	RequestedDiagnostics []string
	// LogOptions determine globally what the user wants to see and how.
	LogOptions *log.LoggerOptions
	// contains filtered or unexported fields
}

PodDiagnosticsOptions holds values received from environment variables for the command to operate.

func (*PodDiagnosticsOptions) Complete

func (o *PodDiagnosticsOptions) Complete(c *cobra.Command, args []string) error

Complete fills in PodDiagnosticsOptions needed if the command is actually invoked.

func (*PodDiagnosticsOptions) Logger

func (o *PodDiagnosticsOptions) Logger() *log.Logger

returns the logger built according to options (must be Complete()ed)

func (PodDiagnosticsOptions) RunDiagnostics

func (o PodDiagnosticsOptions) RunDiagnostics() error

RunDiagnostics builds diagnostics based on the options and executes them, returning fatal error(s) only.

Jump to

Keyboard shortcuts

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