exporter

package
v0.0.0-...-a26b91f Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 31 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPlaneStateExporter

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

ControlPlaneStateExporter exports the state of a Crossplane control plane.

func NewControlPlaneStateExporter

func NewControlPlaneStateExporter(crdClient apiextensionsclientset.Interface, dynamicClient dynamic.Interface, discoveryClient discovery.DiscoveryInterface, appsClient appsv1.AppsV1Interface, mapper meta.RESTMapper, opts Options) *ControlPlaneStateExporter

NewControlPlaneStateExporter returns a new ControlPlaneStateExporter.

func (*ControlPlaneStateExporter) Export

Export exports the state of the control plane.

func (*ControlPlaneStateExporter) IncludedExtraResource

func (e *ControlPlaneStateExporter) IncludedExtraResource(gr string) bool

type FileSystemPersister

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

func NewFileSystemPersister

func NewFileSystemPersister(fs afero.Afero, root string, m *v1alpha1.TypeMeta) *FileSystemPersister

func (*FileSystemPersister) PersistResources

func (p *FileSystemPersister) PersistResources(_ context.Context, groupResource string, resources []unstructured.Unstructured) error

type MetadataExporter

type MetadataExporter interface {
	ExportMetadata(ctx context.Context) error
}

type Options

type Options struct {
	// OutputArchive is the path to the archive file to be created.
	OutputArchive string // default: xp-state.tar.gz

	// Namespaces to include in the export. If not specified, all namespaces are included.
	IncludeNamespaces []string // default: none
	// Namespaces to exclude from the export.
	ExcludeNamespaces []string // default: except kube-system, kube-public, kube-node-lease, local-path-storage

	// Extra resource types to include in the export.
	IncludeExtraResources []string // default: namespaces, configmaps, secrets ( + all Crossplane resources)
	// Resource types to exclude from the export.
	ExcludeResources []string // default: none

	// PauseBeforeExport pauses all managed resources before starting the export process.
	PauseBeforeExport bool // default: false
}

Options for the exporter.

type PersistentMetadataExporter

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

func NewPersistentMetadataExporter

func NewPersistentMetadataExporter(apps appsv1.AppsV1Interface, fs afero.Afero, root string) *PersistentMetadataExporter

func (*PersistentMetadataExporter) ExportMetadata

func (e *PersistentMetadataExporter) ExportMetadata(ctx context.Context, opts Options, native map[string]int, custom map[string]int) error

type ResourceExporter

type ResourceExporter interface {
	ExportResources(ctx context.Context, gvr schema.GroupVersionResource) (count int, err error)
}

type ResourceFetcher

type ResourceFetcher interface {
	FetchResources(ctx context.Context, gvr schema.GroupVersionResource) ([]unstructured.Unstructured, error)
}

type ResourcePersister

type ResourcePersister interface {
	PersistResources(ctx context.Context, groupResource string, resources []unstructured.Unstructured) error
}

type UnstructuredExporter

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

func (*UnstructuredExporter) ExportResources

func (e *UnstructuredExporter) ExportResources(ctx context.Context, gvr schema.GroupVersionResource) (int, error)

type UnstructuredFetcher

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

func NewUnstructuredFetcher

func NewUnstructuredFetcher(kube dynamic.Interface, opts Options) *UnstructuredFetcher

func (*UnstructuredFetcher) FetchResources

Jump to

Keyboard shortcuts

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