dump

package
v0.1.86 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArchive

func CreateArchive(ctx context.Context, opts *DumpOptions) error

func DumpCluster

func DumpCluster(ctx context.Context, opts *DumpOptions) error

func DumpClusterWithRetry

func DumpClusterWithRetry(ctx context.Context, opts *DumpOptions) error

DumpClusterWithRetry retries DumpCluster on a fixed 5-second interval until it succeeds or the context is canceled. Every error is treated as retryable — the caller controls the deadline via the context.

func DumpGuestCluster

func DumpGuestCluster(ctx context.Context, log logr.Logger, kubeconfig string, destDir string) error

DumpGuestCluster dumps resources from a hosted cluster using its apiserver indicated by the provided kubeconfig. This function assumes that pods aren't able to be scheduled and so can only gather information directly accessible through the api server.

func NewDumpCommand

func NewDumpCommand(dumpCallback DumpCallback) *cobra.Command

Types

type DumpCallback

type DumpCallback func(ctx context.Context, opts *DumpOptions) error

type DumpGuestClusterPolicy

type DumpGuestClusterPolicy string

DumpGuestClusterPolicy controls guest-cluster dump behavior. Policies which can be parsed as a bool are not supported.

const (
	DirectKubeApiServiceAccess DumpGuestClusterPolicy = "direct-kube-api-service-access"
	FailOnError                DumpGuestClusterPolicy = "fail-on-error"
)

type DumpOptions

type DumpOptions struct {
	Namespace   string
	Name        string
	ArtifactDir string
	ArchiveDump bool
	// LogCheckers is a list of functions that will
	// get run over all raw logs if set.
	LogCheckers []LogChecker
	// AgentNamespace is the namespace where Agents
	// are located, when using the agent platform.
	AgentNamespace string

	IsDumpingGuestCluster    bool
	DumpGuestClusterPolicies map[DumpGuestClusterPolicy]struct{}

	ImpersonateAs string

	Log logr.Logger
}

type LogChecker

type LogChecker func(filename string, content []byte)

type OCAdmInspect

type OCAdmInspect struct {
	// contains filtered or unexported fields
}

func (*OCAdmInspect) Run

func (i *OCAdmInspect) Run(ctx context.Context, cmdArgs ...string)

func (*OCAdmInspect) WithNamespace

func (i *OCAdmInspect) WithNamespace(namespace string) *OCAdmInspect

type OCAdmNodeLogs

type OCAdmNodeLogs struct {
	// contains filtered or unexported fields
}

func (*OCAdmNodeLogs) Run

func (i *OCAdmNodeLogs) Run(ctx context.Context, cmdArgs ...string)

Jump to

Keyboard shortcuts

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