v1alpha1

package
v0.0.0-...-6f6c25d Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

+groupName=stash.appscode.com

Index

Constants

View Source
const (
	ResticKey                = "restic.appscode.com"
	LastAppliedConfiguration = ResticKey + "/last-applied-configuration"
	VersionTag               = ResticKey + "/tag"
	// ResourceVersion will be used to trigger restarts for ReplicaSet and RC pods
	ResourceHash = ResticKey + "/resource-hash"
)
View Source
const (
	ResourceKindRepository     = "Repository"
	ResourcePluralRepository   = "repositories"
	ResourceSingularRepository = "repository"
)
View Source
const (
	ResourceKindRestic       = "Restic"
	ResourceSingularRestic   = "restic"
	ResourcePluralRestic     = "restics"
	ResourceKindRecovery     = "Recovery"
	ResourceSingularRecovery = "recovery"
	ResourcePluralRecovery   = "recoveries"
)
View Source
const (
	KindDeployment            = "Deployment"
	KindReplicaSet            = "ReplicaSet"
	KindReplicationController = "ReplicationController"
	KindStatefulSet           = "StatefulSet"
	KindDaemonSet             = "DaemonSet"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: stash.GroupName, Version: "v1alpha1"}

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func StatefulSetPodName

func StatefulSetPodName(appName, podOrdinal string) (string, error)

Types

type BackupType

type BackupType string
const (
	BackupOnline  BackupType = "online"  // default, injects sidecar
	BackupOffline BackupType = "offline" // injects init container
)

type FileGroup

type FileGroup struct {
	// Source of the backup volumeName:path
	Path string `json:"path,omitempty"`
	// Tags of a snapshots
	Tags []string `json:"tags,omitempty"`
	// retention policy of snapshots
	RetentionPolicyName string `json:"retentionPolicyName,omitempty"`
}

func (*FileGroup) DeepCopy

func (in *FileGroup) DeepCopy() *FileGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileGroup.

func (*FileGroup) DeepCopyInto

func (in *FileGroup) DeepCopyInto(out *FileGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalTypedReference

type LocalTypedReference struct {
	// Kind of the referent.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	Kind string `json:"kind,omitempty"`
	// Name of the referent.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	// +optional
	Name string `json:"name,omitempty"`
	// API version of the referent.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

LocalTypedReference contains enough information to let you inspect or modify the referred object.

func (*LocalTypedReference) Canonicalize

func (workload *LocalTypedReference) Canonicalize() error

func (*LocalTypedReference) DeepCopy

func (in *LocalTypedReference) DeepCopy() *LocalTypedReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalTypedReference.

func (*LocalTypedReference) DeepCopyInto

func (in *LocalTypedReference) DeepCopyInto(out *LocalTypedReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (LocalTypedReference) GetRepositoryCRDName

func (workload LocalTypedReference) GetRepositoryCRDName(podName, nodeName string) string

func (LocalTypedReference) HostnamePrefix

func (workload LocalTypedReference) HostnamePrefix(podName, nodeName string) (hostname, prefix string, err error)

type Recovery

type Recovery struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RecoverySpec   `json:"spec,omitempty"`
	Status            RecoveryStatus `json:"status,omitempty"`
}

func (Recovery) CustomResourceDefinition

func (c Recovery) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Recovery) DeepCopy

func (in *Recovery) DeepCopy() *Recovery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Recovery.

func (*Recovery) DeepCopyInto

func (in *Recovery) DeepCopyInto(out *Recovery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Recovery) DeepCopyObject

func (in *Recovery) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Recovery) IsValid

func (r Recovery) IsValid() error

type RecoveryList

type RecoveryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Recovery `json:"items,omitempty"`
}

func (*RecoveryList) DeepCopy

func (in *RecoveryList) DeepCopy() *RecoveryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryList.

func (*RecoveryList) DeepCopyInto

func (in *RecoveryList) DeepCopyInto(out *RecoveryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RecoveryList) DeepCopyObject

func (in *RecoveryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RecoveryPhase

type RecoveryPhase string
const (
	RecoveryPending   RecoveryPhase = "Pending"
	RecoveryRunning   RecoveryPhase = "Running"
	RecoverySucceeded RecoveryPhase = "Succeeded"
	RecoveryFailed    RecoveryPhase = "Failed"
	RecoveryUnknown   RecoveryPhase = "Unknown"
)

type RecoverySpec

type RecoverySpec struct {
	Repository core.ObjectReference `json:"repository"`
	// Snapshot to recover. Default is latest snapshot.
	// +optional
	Snapshot         string                      `json:"snapshot,omitempty"`
	Paths            []string                    `json:"paths,omitempty"`
	RecoveredVolumes []store.LocalSpec           `json:"recoveredVolumes,omitempty"`
	ImagePullSecrets []core.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

func (*RecoverySpec) DeepCopy

func (in *RecoverySpec) DeepCopy() *RecoverySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoverySpec.

func (*RecoverySpec) DeepCopyInto

func (in *RecoverySpec) DeepCopyInto(out *RecoverySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RecoveryStatus

type RecoveryStatus struct {
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration *types.IntHash `json:"observedGeneration,omitempty"`
	Phase              RecoveryPhase  `json:"phase,omitempty"`
	Stats              []RestoreStats `json:"stats,omitempty"`
}

func (*RecoveryStatus) DeepCopy

func (in *RecoveryStatus) DeepCopy() *RecoveryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoveryStatus.

func (*RecoveryStatus) DeepCopyInto

func (in *RecoveryStatus) DeepCopyInto(out *RecoveryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Repository

type Repository struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RepositorySpec   `json:"spec,omitempty"`
	Status            RepositoryStatus `json:"status,omitempty"`
}

func (Repository) CustomResourceDefinition

func (c Repository) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Repository) DeepCopy

func (in *Repository) DeepCopy() *Repository

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.

func (*Repository) DeepCopyInto

func (in *Repository) DeepCopyInto(out *Repository)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Repository) DeepCopyObject

func (in *Repository) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Repository) IsValid

func (r Repository) IsValid() error

type RepositoryList

type RepositoryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Repository `json:"items,omitempty"`
}

func (*RepositoryList) DeepCopy

func (in *RepositoryList) DeepCopy() *RepositoryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryList.

func (*RepositoryList) DeepCopyInto

func (in *RepositoryList) DeepCopyInto(out *RepositoryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RepositoryList) DeepCopyObject

func (in *RepositoryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RepositorySpec

type RepositorySpec struct {
	// Backend specify the storage where backed up snapshot will be stored
	Backend store.Backend `json:"backend,omitempty"`
	// If true, delete respective restic repository
	// +optional
	WipeOut bool `json:"wipeOut,omitempty"`
}

func (*RepositorySpec) DeepCopy

func (in *RepositorySpec) DeepCopy() *RepositorySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec.

func (*RepositorySpec) DeepCopyInto

func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RepositoryStatus

type RepositoryStatus struct {
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration *types.IntHash `json:"observedGeneration,omitempty"`
	// FirstBackupTime indicates the timestamp when the first backup was taken
	FirstBackupTime *metav1.Time `json:"firstBackupTime,omitempty"`
	// LastBackupTime indicates the timestamp when the latest backup was taken
	LastBackupTime *metav1.Time `json:"lastBackupTime,omitempty"`
	// Integrity shows result of repository integrity check after last backup
	Integrity *bool `json:"integrity,omitempty"`
	// Size show size of repository after last backup
	Size string `json:"size,omitempty"`
	// SnapshotCount shows number of snapshots stored in the repository
	SnapshotCount int `json:"snapshotCount,omitempty"`
	// SnapshotRemovedOnLastCleanup shows number of old snapshots cleaned up according to retention policy on last backup session
	SnapshotRemovedOnLastCleanup int `json:"snapshotRemovedOnLastCleanup,omitempty"`

	// Deprecated
	LastSuccessfulBackupTime *metav1.Time `json:"lastSuccessfulBackupTime,omitempty"`
	// Deprecated
	LastBackupDuration string `json:"lastBackupDuration,omitempty"`
	// Deprecated
	BackupCount int64 `json:"backupCount,omitempty"`
}

func (*RepositoryStatus) DeepCopy

func (in *RepositoryStatus) DeepCopy() *RepositoryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryStatus.

func (*RepositoryStatus) DeepCopyInto

func (in *RepositoryStatus) DeepCopyInto(out *RepositoryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Restic

type Restic struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ResticSpec `json:"spec,omitempty"`
}

func (Restic) CustomResourceDefinition

func (c Restic) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Restic) DeepCopy

func (in *Restic) DeepCopy() *Restic

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restic.

func (*Restic) DeepCopyInto

func (in *Restic) DeepCopyInto(out *Restic)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Restic) DeepCopyObject

func (in *Restic) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Restic) GetSpecHash

func (r Restic) GetSpecHash() string

func (Restic) IsValid

func (r Restic) IsValid() error

type ResticList

type ResticList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Restic `json:"items,omitempty"`
}

func (*ResticList) DeepCopy

func (in *ResticList) DeepCopy() *ResticList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResticList.

func (*ResticList) DeepCopyInto

func (in *ResticList) DeepCopyInto(out *ResticList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResticList) DeepCopyObject

func (in *ResticList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResticSpec

type ResticSpec struct {
	Selector   metav1.LabelSelector `json:"selector,omitempty"`
	FileGroups []FileGroup          `json:"fileGroups,omitempty"`
	Backend    store.Backend        `json:"backend,omitempty"`
	Schedule   string               `json:"schedule,omitempty"`
	// Pod volumes to mount into the sidecar container's filesystem.
	VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`
	// Compute Resources required by the sidecar container.
	Resources         core.ResourceRequirements `json:"resources,omitempty"`
	RetentionPolicies []RetentionPolicy         `json:"retentionPolicies,omitempty"`
	// https://github.com/appscode/stash/issues/225
	Type BackupType `json:"type,omitempty"`
	//Indicates that the Restic is paused from taking backup. Default value is 'false'
	// +optional
	Paused bool `json:"paused,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
	// +optional
	ImagePullSecrets []core.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

func (*ResticSpec) DeepCopy

func (in *ResticSpec) DeepCopy() *ResticSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResticSpec.

func (*ResticSpec) DeepCopyInto

func (in *ResticSpec) DeepCopyInto(out *ResticSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RestoreStats

type RestoreStats struct {
	Path     string        `json:"path,omitempty"`
	Phase    RecoveryPhase `json:"phase,omitempty"`
	Duration string        `json:"duration,omitempty"`
}

func (*RestoreStats) DeepCopy

func (in *RestoreStats) DeepCopy() *RestoreStats

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreStats.

func (*RestoreStats) DeepCopyInto

func (in *RestoreStats) DeepCopyInto(out *RestoreStats)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetentionPolicy

type RetentionPolicy struct {
	Name        string   `json:"name,omitempty"`
	KeepLast    int      `json:"keepLast,omitempty"`
	KeepHourly  int      `json:"keepHourly,omitempty"`
	KeepDaily   int      `json:"keepDaily,omitempty"`
	KeepWeekly  int      `json:"keepWeekly,omitempty"`
	KeepMonthly int      `json:"keepMonthly,omitempty"`
	KeepYearly  int      `json:"keepYearly,omitempty"`
	KeepTags    []string `json:"keepTags,omitempty"`
	Prune       bool     `json:"prune,omitempty"`
	DryRun      bool     `json:"dryRun,omitempty"`
}

func (*RetentionPolicy) DeepCopy

func (in *RetentionPolicy) DeepCopy() *RetentionPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionPolicy.

func (*RetentionPolicy) DeepCopyInto

func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetentionStrategy

type RetentionStrategy string
const (
	KeepLast    RetentionStrategy = "--keep-last"
	KeepHourly  RetentionStrategy = "--keep-hourly"
	KeepDaily   RetentionStrategy = "--keep-daily"
	KeepWeekly  RetentionStrategy = "--keep-weekly"
	KeepMonthly RetentionStrategy = "--keep-monthly"
	KeepYearly  RetentionStrategy = "--keep-yearly"
	KeepTag     RetentionStrategy = "--keep-tag"
)

Jump to

Keyboard shortcuts

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