Documentation ¶
Overview ¶
+k8s:openapi-gen=true +kubebuilder:object:generate=true
Index ¶
Constants ¶
const ( KubeStashKey = "kubestash.com" KubeStashApp = "kubestash.com/app" KubeStashCleanupFinalizer = "kubestash.com/cleanup" KubeDBGroupName = "kubedb.com" ElasticsearchGroupName = "elasticsearch.kubedb.com" )
const ( KindStatefulSet = "StatefulSet" KindDaemonSet = "DaemonSet" KindDeployment = "Deployment" KindClusterRole = "ClusterRole" KindRole = "Role" KindPersistentVolumeClaim = "PersistentVolumeClaim" KindReplicaSet = "ReplicaSet" KindReplicationController = "ReplicationController" KindJob = "Job" KindVolumeSnapshot = "VolumeSnapshot" KindNamespace = "Namespace" KindEmpty = "" )
const ( PrefixTrigger = "trigger" PrefixInit = "init" PrefixUpload = "upload" PrefixCleanup = "cleanup" PrefixRetentionPolicy = "retentionpolicy" PrefixPopulate = "populate" PrefixPrime = "prime" )
const ( KubeStashBackupComponent = "kubestash-backup" KubeStashRestoreComponent = "kubestash-restore" KubeStashInitializerComponent = "kubestash-initializer" KubeStashUploaderComponent = "kubestash-uploader" KubeStashCleanerComponent = "kubestash-cleaner" KubeStashHookComponent = "kubestash-hook" KubeStashPopulatorComponent = "kubestash-populator" )
const ( KubeStashInvokerName = "kubestash.com/invoker-name" KubeStashInvokerNamespace = "kubestash.com/invoker-namespace" KubeStashInvokerKind = "kubestash.com/invoker-kind" KubeStashSessionName = "kubestash.com/session-name" )
Keys for offshoot labels
const ( KubeStashRepoName = "kubestash.com/repo-name" KubeStashAppRefKind = "kubestash.com/app-ref-kind" KubeStashAppRefNamespace = "kubestash.com/app-ref-namespace" KubeStashAppRefName = "kubestash.com/app-ref-name" )
Keys for snapshots labels
const ( KeyTargetKind = "target_kind" KeyTargetName = "target_name" KeyTargetNamespace = "target_namespace" KeyReason = "reason" KeyName = "name" )
Keys for structure logging
const ( VariablesKey = "variables.kubestash.com" BackupBlueprintKey = "blueprint.kubestash.com" KeyBlueprintName = BackupBlueprintKey + "/name" KeyBlueprintNamespace = BackupBlueprintKey + "/namespace" KeyBlueprintSessions = BackupBlueprintKey + "/session-names" )
Keys for BackupBlueprint
const ( KubeStashBackupJobClusterRole = "kubestash-backup-job" KubeStashRestoreJobClusterRole = "kubestash-restore-job" KubeStashCronJobClusterRole = "kubestash-cron-job" KubeStashBackendJobClusterRole = "kubestash-backend-job" KubeStashStorageInitializerClusterRole = "kubestash-storage-initializer-job" KubeStashPopulatorJobClusterRole = "kubestash-populator-job" KubeStashRetentionPolicyJobClusterRole = "kubestash-retention-policy-job" )
RBAC related
const ( RequeueTimeInterval = 10 * time.Second Requeue = true DoNotRequeue = false )
Reconciliation related
const ( KubeStashNetVolAccessor = "kubestash-netvol-accessor" TempDirVolumeName = "kubestash-tmp-volume" TempDirMountPath = "/kubestash-tmp" OperatorContainer = "operator" KubeStashContainer = "kubestash" )
Local Network Volume Accessor related
const ( PopulatorKey = "populator.kubestash.com" KeyPopulatedFrom = PopulatorKey + "/populated-from" KeyAppName = PopulatorKey + "/app-name" KubeStashPopulatorContainer = "kubestash-populator" )
Volume populator related constants
const ( ComponentPod = "pod" ComponentDump = "dump" ComponentWal = "wal" ComponentManifest = "manifest" ComponentVolumeSnapshot = "volumesnapshot" ComponentDashboard = "dashboard" )
const ( EnvComponentName = "COMPONENT_NAME" KeyPodOrdinal = "POD_ORDINAL" KeyPVCName = "PVC_NAME" KeyDBVersion = "DB_VERSION" KeyInterimVolume = "INTERIM_VOLUME" InterimVolumeName = "kubestash-interim-volume" OwnerKey = ".metadata.controller" SnapshotVersionV1 = "v1" DirRepository = "repository" )
const ( ImageRegistry = "imageRegistry" ImageRepo = "imageRepo" ImageTag = "imageTag" InvokerKind = "invokerKind" InvokerName = "invokerName" Snapshot = "snapshot" Namespace = "namespace" BackupSession = "backupSession" RestoreSession = "restoreSession" // EnableCache is false when TmpDir.DisableCaching is true in backupConfig/restoreSession // default is true EnableCache = "enableCache" InterimDataDir = "interimDataDir" LicenseApiService = "licenseApiService" )
Variables ¶
This section is empty.
Functions ¶
func GetRuntimeClient ¶ added in v0.3.0
func SetRuntimeClient ¶ added in v0.3.0
Types ¶
type AllowedNamespaces ¶
type AllowedNamespaces struct { // From indicates how to select the namespaces that are allowed to use this resource. // Possible values are: // * All: All namespaces can use this resource. // * Selector: Namespaces that matches the selector can use this resource. // * Same: Only current namespace can use the resource. // // +optional // +kubebuilder:default=Same From *FromNamespaces `json:"from,omitempty"` // Selector must be specified when From is set to "Selector". In that case, // only the selected namespaces are allowed to use this resource. // This field is ignored for other values of "From". // // +optional Selector *metav1.LabelSelector `json:"selector,omitempty"` }
AllowedNamespaces indicate which namespaces the resource should be selected from. +k8s:openapi-gen=true
func (*AllowedNamespaces) DeepCopy ¶
func (in *AllowedNamespaces) DeepCopy() *AllowedNamespaces
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedNamespaces.
func (*AllowedNamespaces) DeepCopyInto ¶
func (in *AllowedNamespaces) DeepCopyInto(out *AllowedNamespaces)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Driver ¶
type Driver string
Driver specifies the name of underlying tool that is being used to upload the backed up data. +kubebuilder:validation:Enum=Restic;WalG;VolumeSnapshotter
type FromNamespaces ¶
type FromNamespaces string
FromNamespaces specifies namespace from which namespaces are allowed to use the resource. +kubebuilder:validation:Enum=All;Selector;Same
const ( // NamespacesFromAll specifies that all namespaces can use the resource. NamespacesFromAll FromNamespaces = "All" // NamespacesFromSelector specifies that only the namespace that matches the selector can use the resource. NamespacesFromSelector FromNamespaces = "Selector" // NamespacesFromSame specifies that only the current namespace can use the resource. NamespacesFromSame FromNamespaces = "Same" )
type ParameterDefinition ¶
type ParameterDefinition struct { // Name specifies the name of the parameter Name string `json:"name,omitempty"` // Usage specifies the usage of this parameter Usage string `json:"usage,omitempty"` // Required specify whether this parameter is required or not // +optional Required bool `json:"required,omitempty"` // Default specifies a default value for the parameter // +optional Default string `json:"default,omitempty"` }
ParameterDefinition defines the parameter names, their usage, their requirements etc. +k8s:openapi-gen=true
func (*ParameterDefinition) DeepCopy ¶
func (in *ParameterDefinition) DeepCopy() *ParameterDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterDefinition.
func (*ParameterDefinition) DeepCopyInto ¶
func (in *ParameterDefinition) DeepCopyInto(out *ParameterDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UsagePolicy ¶
type UsagePolicy struct { // AllowedNamespaces specifies which namespaces are allowed to use the resource // +optional AllowedNamespaces AllowedNamespaces `json:"allowedNamespaces,omitempty"` }
UsagePolicy specifies a policy that restrict the usage of a resource across namespaces. +k8s:openapi-gen=true
func (*UsagePolicy) DeepCopy ¶
func (in *UsagePolicy) DeepCopy() *UsagePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UsagePolicy.
func (*UsagePolicy) DeepCopyInto ¶
func (in *UsagePolicy) DeepCopyInto(out *UsagePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeSource ¶
type VolumeSource struct { ofst.VolumeSource `json:",inline"` // VolumeClaimTemplate specifies a template for volume to use by the backup/restore executor // +optional VolumeClaimTemplate *ofst.PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty"` }
VolumeSource specifies the source of volume to mount in the backup/restore executor +k8s:openapi-gen=true
func (*VolumeSource) DeepCopy ¶
func (in *VolumeSource) DeepCopy() *VolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.
func (*VolumeSource) DeepCopyInto ¶
func (in *VolumeSource) DeepCopyInto(out *VolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
addons
|
|
v1alpha1
+groupName=addons.kubestash.com
|
+groupName=addons.kubestash.com |
config
|
|
v1alpha1
Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=config.kubestash.com +k8s:openapi-gen=true
|
Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=config.kubestash.com +k8s:openapi-gen=true |
core
|
|
v1alpha1
+groupName=core.kubestash.com
|
+groupName=core.kubestash.com |
storage
|
|
v1alpha1
+groupName=storage.kubestash.com
|
+groupName=storage.kubestash.com |