apis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

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

Index

Constants

View Source
const (
	RequeueTimeInterval = 10 * time.Second

	KubeStashCleanupFinalizer = "kubestash.com/cleanup"
	KubeStashKey              = "kubestash.com"
	KubeDBGroupName           = "kubedb.com"
)
View Source
const (
	KeyTargetKind      = "target_kind"
	KeyTargetName      = "target_name"
	KeyTargetNamespace = "target_namespace"
	KeyReason          = "reason"
	KeyName            = "name"
)

=================== Keys for structure logging =====================

View Source
const (
	KindStatefulSet = "StatefulSet"
	KindDaemonSet   = "DaemonSet"
	KindClusterRole = "ClusterRole"
)
View Source
const (
	Requeue      = true
	DoNotRequeue = false
)
View Source
const (
	ImageRegistry = "imageRegistry"
	ImageRepo     = "imageRepo"
	ImageTag      = "imageTag"

	InvokerKind = "invokerKind"
	InvokerName = "invokerName"

	RestoreNamespace  = "restoreNamespace"
	RestoreTargetKind = "targetKind"

	MongoYaml   = "mongoYaml"
	MongoDBName = "mongoDBName"

	PostgresYaml = "pgYaml"
	PostgresName = "pgName"

	AuthSecretYaml = "authSecretYaml"
	AuthSecretName = "authSecretName"

	ConfigSecretYaml = "configSecretYaml"
	ConfigSecretName = "configSecretName"

	SnapshotName = "snapshotName"

	Namespace      = "namespace"
	BackupSession  = "backupSession"
	RestoreSession = "restoreSession"

	TargetName      = "targetName"
	TargetKind      = "targetKind"
	TargetNamespace = "targetNamespace"
	TargetMountPath = "targetMountPath"
	TargetPaths     = "targetPaths"

	// default true
	// false when TmpDir.DisableCaching is true in backupConfig/restoreSession
	EnableCache    = "enableCache"
	InterimDataDir = "interimDataDir"

	KubeStashVolumePrefix = "/kubestash-volumes"
	DefaultMountPath      = KubeStashVolumePrefix + "/data"
	InterimDataDirPath    = KubeStashVolumePrefix + "/interim-data"
	TmpDirMountPath       = KubeStashVolumePrefix + "/tmp"

	LicenseApiService = "licenseApiService"
)
View Source
const (
	OwnerKey = ".metadata.controller"
)

Variables

This section is empty.

Functions

This section is empty.

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