snapshot

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SnapshotReleaseKey stores info about the vCluster helm release
	SnapshotReleaseKey = "/vcluster/snapshot/release"
)

Variables

View Source
var (

	// bump revision to make sure we invalidate caches. See https://github.com/kubernetes/kubernetes/issues/118501 for more details
	BumpRevision = int64(1000)
)

Functions

func AddFlags added in v0.26.0

func AddFlags(flags *pflag.FlagSet, options *Options)

func CreateStore

func CreateStore(ctx context.Context, options *Options) (types.Storage, error)

func Parse

func Parse(snapshotURL string, snapshotOptions *Options) error

func Validate

func Validate(options *Options, isList bool) error

func ValidateConfigAndOptions added in v0.28.0

func ValidateConfigAndOptions(vConfig *config.VirtualClusterConfig, options *Options, isRestore, isList bool) error

Types

type Client added in v0.28.0

type Client struct {
	Options Options
}

func (*Client) Delete added in v0.28.0

func (c *Client) Delete(ctx context.Context) error

func (*Client) List added in v0.28.0

func (c *Client) List(ctx context.Context) ([]types.Snapshot, error)

func (*Client) Run added in v0.28.0

func (c *Client) Run(ctx context.Context) error

type HelmRelease

type HelmRelease struct {
	ReleaseName      string `json:"releaseName"`
	ReleaseNamespace string `json:"releaseNamespace"`

	ChartName    string `json:"chartName"`
	ChartVersion string `json:"chartVersion"`

	Values []byte `json:"values"`
}

type Options

type Options struct {
	Type string `json:"type,omitempty"`

	S3        s3.Options        `json:"s3"`
	Container container.Options `json:"container"`
	OCI       oci.Options       `json:"oci"`

	Release *HelmRelease `json:"release,omitempty"`
}

func ParseOptionsFromEnv added in v0.28.0

func ParseOptionsFromEnv() (*Options, error)

type RestoreClient added in v0.28.0

type RestoreClient struct {
	Snapshot Options

	NewVCluster bool
}

func (*RestoreClient) Run added in v0.28.0

func (o *RestoreClient) Run(ctx context.Context) (retErr error)

type VClusterConfig

type VClusterConfig struct {
	ChartVersion string `json:"chartVersion"`
	Values       string `json:"values"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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