Documentation ¶
Overview ¶
+groupName=stash.appscode.com
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- func StatefulSetPodName(appName, podOrdinal string) (string, error)
- type BackupType
- type FileGroup
- type LocalTypedReference
- func (workload *LocalTypedReference) Canonicalize() error
- func (in *LocalTypedReference) DeepCopy() *LocalTypedReference
- func (in *LocalTypedReference) DeepCopyInto(out *LocalTypedReference)
- func (workload LocalTypedReference) GetRepositoryCRDName(podName, nodeName string) string
- func (workload LocalTypedReference) HostnamePrefix(podName, nodeName string) (hostname, prefix string, err error)
- type Recovery
- type RecoveryList
- type RecoveryPhase
- type RecoverySpec
- type RecoveryStatus
- type Repository
- type RepositoryList
- type RepositorySpec
- type RepositoryStatus
- type Restic
- type ResticList
- type ResticSpec
- type RestoreStats
- type RetentionPolicy
- type RetentionStrategy
Constants ¶
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" )
const ( ResourceKindRecovery = "Recovery" ResourceSingularRecovery = "recovery" ResourcePluralRecovery = "recoveries" )
const ( ResourceKindRepository = "Repository" ResourcePluralRepository = "repositories" ResourceSingularRepository = "repository" )
const ( ResourceKindRestic = "Restic" ResourceSingularRestic = "restic" ResourcePluralRestic = "restics" )
Variables ¶
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 )
var SchemeGroupVersion = schema.GroupVersion{Group: stash.GroupName, Version: "v1alpha1"}
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func StatefulSetPodName ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileGroup.
func (*FileGroup) DeepCopyInto ¶
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"` }
+kubebuilder:object:root=true +kubebuilder:resource:path=recoveries,singular=recovery,shortName=rec,categories={storage,appscode,all} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Repository-NS",type="string",JSONPath=".spec.repository.namespace" +kubebuilder:printcolumn:name="Repository-Name",type="string",JSONPath=".spec.repository.name" +kubebuilder:printcolumn:name="Snapshot",type="string",JSONPath=".spec.snapshot" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (Recovery) CustomResourceDefinition ¶
func (c Recovery) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Recovery) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Recovery.
func (*Recovery) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Recovery) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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"` }
+kubebuilder:object:root=true +kubebuilder:resource:path=repositories,singular=repository,shortName=repo,categories={stash,appscode} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Integrity",type="boolean",JSONPath=".status.integrity" +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".status.size" +kubebuilder:printcolumn:name="Snapshot-Count",type="integer",JSONPath=".status.snapshotCount" +kubebuilder:printcolumn:name="Last-Successful-Backup",type="date",format="date-time",JSONPath=".status.lastBackupTime" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
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"` // SnapshotsRemovedOnLastCleanup shows number of old snapshots cleaned up according to retention policy on last backup session SnapshotsRemovedOnLastCleanup int `json:"snapshotsRemovedOnLastCleanup,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"` }
+kubebuilder:object:root=true +kubebuilder:resource:path=restics,singular=restic,shortName=rst,categories={stash,appscode,all} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Selector",type="string",JSONPath=".spec.selector" +kubebuilder:printcolumn:name="Schedule",type="string",JSONPath=".spec.schedule" +kubebuilder:printcolumn:name="Backup-Type",type="string",JSONPath=".spec.type",priority=10 +kubebuilder:printcolumn:name="Paused",type="boolean",JSONPath=".spec.paused" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (Restic) CustomResourceDefinition ¶
func (c Restic) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*Restic) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restic.
func (*Restic) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Restic) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Restic) GetSpecHash ¶
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/stashed/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"` 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"` 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" )