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 ¶
func (e *ControlPlaneStateExporter) Export(ctx context.Context) error
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 (*FileSystemPersister) PersistResources ¶
func (p *FileSystemPersister) PersistResources(_ context.Context, groupResource string, resources []unstructured.Unstructured) error
type MetadataExporter ¶
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
type ResourceExporter ¶
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 NewUnstructuredExporter ¶
func NewUnstructuredExporter(f ResourceFetcher, p ResourcePersister) *UnstructuredExporter
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 ¶
func (e *UnstructuredFetcher) FetchResources(ctx context.Context, gvr schema.GroupVersionResource) ([]unstructured.Unstructured, error)
Click to show internal directories.
Click to hide internal directories.