Documentation
¶
Index ¶
- func CreateArchive(ctx context.Context, opts *DumpOptions) error
- func DumpCluster(ctx context.Context, opts *DumpOptions) error
- func DumpClusterWithRetry(ctx context.Context, opts *DumpOptions) error
- func DumpGuestCluster(ctx context.Context, log logr.Logger, kubeconfig string, destDir string) error
- func NewDumpCommand(dumpCallback DumpCallback) *cobra.Command
- type DumpCallback
- type DumpGuestClusterPolicy
- type DumpOptions
- type LogChecker
- type OCAdmInspect
- type OCAdmNodeLogs
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 OCAdmInspect ¶
type OCAdmInspect struct {
// contains filtered or unexported fields
}
func (*OCAdmInspect) WithNamespace ¶
func (i *OCAdmInspect) WithNamespace(namespace string) *OCAdmInspect
type OCAdmNodeLogs ¶
type OCAdmNodeLogs struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.