Documentation ¶
Index ¶
Constants ¶
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" )
const (
PodCheckAuthName = "PodCheckAuth"
)
const (
PodCheckDnsName = "PodCheckDns"
)
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (d PodCheckAuth) Check() types.DiagnosticResult
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 ¶
func (d PodCheckDns) Check() types.DiagnosticResult
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.