apis

package
v0.2.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

+k8s:openapi-gen=true +kubebuilder:object:generate=true

Index

Constants

View Source
const (
	RequeueTimeInterval = 10 * time.Second
	OwnerKey            = ".metadata.controller"

	KubeStashKey              = "kubestash.com"
	KubeStashApp              = "kubestash.com/app"
	KubeStashCleanupFinalizer = "kubestash.com/cleanup"
	KubeDBGroupName           = "kubedb.com"
)
View Source
const (
	KindStatefulSet           = "StatefulSet"
	KindDaemonSet             = "DaemonSet"
	KindDeployment            = "Deployment"
	KindClusterRole           = "ClusterRole"
	KindRole                  = "Role"
	KindPersistentVolumeClaim = "PersistentVolumeClaim"
)
View Source
const (
	PrefixTrigger         = "trigger"
	PrefixInit            = "init"
	PrefixUpload          = "upload"
	PrefixCleanup         = "cleanup"
	PrefixRetentionPolicy = "retentionpolicy"
)
View Source
const (
	KubeStashBackupComponent      = "kubestash-backup"
	KubeStashRestoreComponent     = "kubestash-restore"
	KubeStashInitializerComponent = "kubestash-initializer"
	KubeStashUploaderComponent    = "kubestash-uploader"
	KubeStashCleanerComponent     = "kubestash-cleaner"
	KubeStashHookComponent        = "kubestash-hook"
)
View Source
const (
	KubeStashInvokerName      = "kubestash.com/invoker-name"
	KubeStashInvokerNamespace = "kubestash.com/invoker-namespace"
	KubeStashInvokerKind      = "kubestash.com/invoker-kind"
)

Keys for offshoot labels

View Source
const (
	KeyTargetKind      = "target_kind"
	KeyTargetName      = "target_name"
	KeyTargetNamespace = "target_namespace"
	KeyReason          = "reason"
	KeyName            = "name"
)

Keys for structure logging

View Source
const (
	VariablesKey       = "variables.kubestash.com"
	BackupBlueprintKey = "blueprint.kubestash.com"

	KeyBlueprintName      = BackupBlueprintKey + "/name"
	KeyBlueprintNamespace = BackupBlueprintKey + "/namespace"
	KeyBlueprintSessions  = BackupBlueprintKey + "/sessions"
)

Keys for BackupBlueprint

View Source
const (
	KubeStashBackupJobClusterRole       = "kubestash-backup-job"
	KubeStashRestoreJobClusterRole      = "kubestash-restore-job"
	KubeStashCronJobClusterRole         = "kubestash-cron-job"
	KubeStashBackendJobClusterRole      = "kubestash-backend-job"
	KubeStashBackendAccessorClusterRole = "kubestash-backend-accessor"
)

RBAC related

View Source
const (
	Requeue      = true
	DoNotRequeue = false
)

Reconciliation related

View Source
const (
	EnvDBVersion     = "DB_VERSION"
	EnvComponentName = "COMPONENT_NAME"

	ComponentPod        = "pod"
	ComponentDeployment = "deployment"
	ComponentPVC        = "pvc"

	DirRepository = "repository"
)

Addon related

View Source
const (
	KeyPodOrdinal = "POD_ORDINAL"
	PVCName       = "PVC_NAME"
)

PersistentVolumeClaim related

View Source
const (
	KubeStashNetVolAccessor = "kubestash-netvol-accessor"
	TempDirVolumeName       = "kubestash-temp-dir"
	TempDirMountPath        = "/tmp"
	OperatorContainer       = "operator"
)

Local Network Volume Accessor related

View Source
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 ResolveWithInputs added in v0.2.0

func ResolveWithInputs(obj interface{}, inputs map[string]string) error

func UpsertLabels added in v0.2.0

func UpsertLabels(oldLabels, newLabels map[string]string) map[string]string

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

const (
	DriverRestic            Driver = "Restic"
	DriverWalG              Driver = "WalG"
	DriverVolumeSnapshotter Driver = "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.

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

Jump to

Keyboard shortcuts

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