snapshot

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package snapshot is the snapshot of cluster

Index

Constants

This section is empty.

Variables

View Source
var Resources = []string{
	"namespace",
	"node",
	"serviceaccount",
	"configmap",
	"secret",
	"limitrange",
	"runtimeclass.node.k8s.io",
	"priorityclass.scheduling.k8s.io",
	"clusterrolebindings.rbac.authorization.k8s.io",
	"clusterroles.rbac.authorization.k8s.io",
	"rolebindings.rbac.authorization.k8s.io",
	"roles.rbac.authorization.k8s.io",
	"daemonset.apps",
	"deployment.apps",
	"replicaset.apps",
	"statefulset.apps",
	"cronjob.batch",
	"job.batch",
	"persistentvolumeclaim",
	"persistentvolume",
	"pod",
	"service",
	"endpoints",
}

Resources is the resources of cluster want to save or restore The resource string format adheres to a GVR template. - a single string like "node" will be parsed as {resource: node} - a two-section string like "daemonset.apps" will be parsed as {resource: dasemonset, group: apps} - a three-section (or 3+) string like "foo.v1alpha1.example.com" will be parsed as {resource: foo, version: v1alpha1, group: example.com} list all resources can use: kubectl api-resources -o name

Functions

func Load

func Load(ctx context.Context, kubeconfigPath string, r io.Reader, filters []string) error

Load loads the resources to cluster from the reader

func Save

func Save(ctx context.Context, kubeconfigPath string, w io.Writer, resources []string, impersonateConfig rest.ImpersonationConfig) error

Save saves the snapshot of cluster

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳