function

package
v0.113.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 65 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// BackupDataFuncName gives the name of the function
	BackupDataFuncName = "BackupData"
	// BackupDataNamespaceArg provides the namespace
	BackupDataNamespaceArg = "namespace"
	// BackupDataPodArg provides the pod connected to the data volume
	BackupDataPodArg = "pod"
	// BackupDataContainerArg provides the container on which the backup is taken
	BackupDataContainerArg = "container"
	// BackupDataIncludePathArg provides the path of the volume or sub-path for required backup
	BackupDataIncludePathArg = "includePath"
	// BackupDataBackupArtifactPrefixArg provides the path to store artifacts on the object store
	BackupDataBackupArtifactPrefixArg = "backupArtifactPrefix"
	// BackupDataEncryptionKeyArg provides the encryption key to be used for backups
	BackupDataEncryptionKeyArg = "encryptionKey"
	// BackupDataOutputBackupID is the key used for returning backup ID output
	BackupDataOutputBackupID = "backupID"
	// BackupDataOutputBackupTag is the key used for returning backupTag output
	BackupDataOutputBackupTag = "backupTag"
	// BackupDataOutputBackupFileCount is the key used for returning backup file count
	BackupDataOutputBackupFileCount = "fileCount"
	// BackupDataOutputBackupSize is the key used for returning backup size
	BackupDataOutputBackupSize = "size"
	// BackupDataOutputBackupPhysicalSize is the key used for returning physical size taken by the snapshot
	BackupDataOutputBackupPhysicalSize = "phySize"
	// InsecureTLS is the key name which provides an option to a user to disable tls
	InsecureTLS = "insecureTLS"
)
View Source
const (
	// BackupDataAllFuncName gives the name of the function
	BackupDataAllFuncName = "BackupDataAll"
	// BackupDataAllNamespaceArg provides the namespace
	BackupDataAllNamespaceArg = "namespace"
	// BackupDataAllPodsArg provides the pods connected to the data volumes
	BackupDataAllPodsArg = "pods"
	// BackupDataAllContainerArg provides the container on which the backup is taken
	BackupDataAllContainerArg = "container"
	// BackupDataAllIncludePathArg provides the path of the volume or sub-path for required backup
	BackupDataAllIncludePathArg = "includePath"
	// BackupDataAllBackupArtifactPrefixArg provides the path to store artifacts on the object store
	BackupDataAllBackupArtifactPrefixArg = "backupArtifactPrefix"
	// BackupDataAllEncryptionKeyArg provides the encryption key to be used for backups
	BackupDataAllEncryptionKeyArg = "encryptionKey"
	// BackupDataAllOutput is the key name of the output generated by BackupDataAll func
	BackupDataAllOutput = "BackupAllInfo"
)
View Source
const (

	// BackupDataStatsFuncName gives the name of the stats function
	BackupDataStatsFuncName = "BackupDataStats"
	// BackupDataStatsNamespaceArg provides the namespace
	BackupDataStatsNamespaceArg = "namespace"
	// BackupDataStatsBackupArtifactPrefixArg provides the path to store artifacts on the object store
	BackupDataStatsBackupArtifactPrefixArg = "backupArtifactPrefix"
	// BackupDataStatsEncryptionKeyArg provides the encryption key to be used for backups
	BackupDataStatsEncryptionKeyArg = "encryptionKey"
	// BackupDataStatsBackupIdentifierArg provides a unique ID added to the backed up artifacts
	BackupDataStatsBackupIdentifierArg = "backupID"
	// BackupDataStatsMode provides a mode for stats
	BackupDataStatsMode            = "statsMode"
	BackupDataStatsOutputFileCount = "fileCount"
	BackupDataStatsOutputSize      = "size"
	BackupDataStatsOutputMode      = "mode"
)
View Source
const (
	BackupDataUsingKopiaServerFuncName = "BackupDataUsingKopiaServer"
	// BackupDataUsingKopiaServerSnapshotTagsArg is the key used for returning snapshot tags
	BackupDataUsingKopiaServerSnapshotTagsArg = "snapshotTags"
	// KopiaRepositoryServerUserHostname is the key used for returning the hostname of the user
	KopiaRepositoryServerUserHostname = "repositoryServerUserHostname"
)
View Source
const (
	// CheckRepositoryFuncName gives the name of the function
	CheckRepositoryFuncName = "CheckRepository"
	// CheckRepositoryArtifactPrefixArg provides the path to restore backed up data
	CheckRepositoryArtifactPrefixArg = "backupArtifactPrefix"
	// CheckRepositoryEncryptionKeyArg provides the encryption key to be used for deletes
	CheckRepositoryEncryptionKeyArg = "encryptionKey"
	// CheckRepositoryPodOverrideArg contains pod specs to override default pod specs
	CheckRepositoryPodOverrideArg    = "podOverride"
	CheckRepositoryJobPrefix         = "check-repository-"
	CheckRepositoryPasswordIncorrect = "passwordIncorrect"
	CheckRepositoryRepoDoesNotExist  = "repoUnavailable"
)
View Source
const (
	// CopyVolumeDataFuncName gives the function name
	CopyVolumeDataFuncName                     = "CopyVolumeData"
	CopyVolumeDataMountPoint                   = "/mnt/vol_data/%s"
	CopyVolumeDataJobPrefix                    = "copy-vol-data-"
	CopyVolumeDataNamespaceArg                 = "namespace"
	CopyVolumeDataVolumeArg                    = "volume"
	CopyVolumeDataArtifactPrefixArg            = "dataArtifactPrefix"
	CopyVolumeDataOutputBackupID               = "backupID"
	CopyVolumeDataOutputBackupRoot             = "backupRoot"
	CopyVolumeDataOutputBackupArtifactLocation = "backupArtifactLocation"
	CopyVolumeDataEncryptionKeyArg             = "encryptionKey"
	CopyVolumeDataOutputBackupTag              = "backupTag"
	CopyVolumeDataPodOverrideArg               = "podOverride"
	CopyVolumeDataOutputBackupFileCount        = "fileCount"
	CopyVolumeDataOutputBackupSize             = "size"
	CopyVolumeDataOutputPhysicalSize           = "phySize"
)
View Source
const (
	// CreateCSIVolumeSnapshotFuncName gives the name of the function
	CreateCSISnapshotFuncName = "CreateCSISnapshot"
	// CreateCSISnapshotNameArg provides name of the new VolumeSnapshot
	CreateCSISnapshotNameArg = "name"
	// CreateCSISnapshotPVCNameArg gives the name of the captured PVC
	CreateCSISnapshotPVCNameArg = "pvc"
	// CreateCSISnapshotNamespaceArg mentions the namespace of the captured PVC
	CreateCSISnapshotNamespaceArg = "namespace"
	// CreateCSISnapshotSnapshotClassArg specifies the name of the VolumeSnapshotClass
	CreateCSISnapshotSnapshotClassArg = "snapshotClass"
	// CreateCSISnapshotLabelsArg has labels that are to be added to the new VolumeSnapshot
	CreateCSISnapshotLabelsArg = "labels"
	// CreateCSISnapshotRestoreSizeArg gives the storage size required for PV/PVC restoration
	CreateCSISnapshotRestoreSizeArg = "restoreSize"
	// CreateCSISnapshotSnapshotContentNameArg provides the name of dynamically provisioned VolumeSnapshotContent
	CreateCSISnapshotSnapshotContentNameArg = "snapshotContent"
)
View Source
const (
	// CreateCSISnapshotStaticFuncName gives the name of the function
	CreateCSISnapshotStaticFuncName = "CreateCSISnapshotStatic"

	// CreateCSISnapshotStaticNameArg provides name of the new VolumeSnapshot
	CreateCSISnapshotStaticNameArg = "name"

	// CreateCSISnapshotStaticNamespaceArg specifies the namespace of the new VolumeSnapshot
	CreateCSISnapshotStaticNamespaceArg = "namespace"

	// CreateCSISnapshotStaticDriverArg specifies the CSI driver used in the new VolumeSnapshotContent
	CreateCSISnapshotStaticDriverArg = "driver"

	// CreateCSISnapshotStaticSnapshotHandleArg specifies the UID of the backend storage snapshot used in the new VolumeSnapshotContent
	CreateCSISnapshotStaticSnapshotHandleArg = "snapshotHandle"

	// CreateCSISnapshotStaticSnapshotClassArg specifies the name of the VolumeSnapshotClass
	CreateCSISnapshotStaticSnapshotClassArg = "snapshotClass"

	// CreateCSISnapshotStaticOutputRestoreSize gives the storage size required for PV/PVC restoration
	CreateCSISnapshotStaticOutputRestoreSize = "restoreSize"

	// CreateCSISnapshotStaticOutputSnapshotContentName provides the name of dynamically provisioned VolumeSnapshotContent
	CreateCSISnapshotStaticOutputSnapshotContentName = "snapshotContent"
)
View Source
const (
	// CreateRDSSnapshotFuncName gives the name of the function
	CreateRDSSnapshotFuncName = "CreateRDSSnapshot"
	// CreateRDSSnapshotInstanceIDArg provides rds instance ID
	CreateRDSSnapshotInstanceIDArg = "instanceID"
	// CreateRDSSnapshotDBEngine specifies the db engine of rds instance
	CreateRDSSnapshotDBEngine = "dbEngine"
	// CreateRDSSnapshotSnapshotID to set snapshotID in output artifact
	CreateRDSSnapshotSnapshotID = "snapshotID"
	// CreateRDSSnapshotSecurityGroupID to set securityGroupIDs in output artifact
	CreateRDSSnapshotSecurityGroupID = "securityGroupID"
	// Allocated Storage Amount
	CreateRDSSnapshotAllocatedStorage = "allocatedStorage"
	// DB Subnet Group Name
	CreateRDSSnapshotDBSubnetGroup = "dbSubnetGroup"
	// DBEngineAurora has db engine aurora for MySQL 5.6-compatible
	DBEngineAurora RDSDBEngine = "aurora"
	// DBEngineAuroraMySQL has db engine for MySQL 5.7-compatible Aurora
	DBEngineAuroraMySQL RDSDBEngine = "aurora-mysql"
	// DBEngineAuroraPostgreSQL has db engine for aurora postgresql
	DBEngineAuroraPostgreSQL RDSDBEngine = "aurora-postgresql"
)
View Source
const (
	// CreateVolumeFromSnapshotFuncName gives the name of the function
	CreateVolumeFromSnapshotFuncName     = "CreateVolumeFromSnapshot"
	CreateVolumeFromSnapshotNamespaceArg = "namespace"
	CreateVolumeFromSnapshotManifestArg  = "snapshots"
	CreateVolumeFromSnapshotPVCNamesArg  = "pvcNames"
)
View Source
const (
	// CreateVolumeSnapshotFuncName gives the name of the function
	CreateVolumeSnapshotFuncName     = "CreateVolumeSnapshot"
	CreateVolumeSnapshotNamespaceArg = "namespace"
	CreateVolumeSnapshotPVCsArg      = "pvcs"
	CreateVolumeSnapshotSkipWaitArg  = "skipWait"
)
View Source
const (
	// DeleteCSIVolumeSnapshotFuncName gives the name of the function
	DeleteCSISnapshotFuncName = "DeleteCSISnapshot"
	// DeleteCSISnapshotNameArg provides name of the VolumeSnapshot that needs to be deleted
	DeleteCSISnapshotNameArg = "name"
	// DeleteCSISnapshotNamespaceArg mentions the namespace where the VolumeSnapshot resides
	DeleteCSISnapshotNamespaceArg = "namespace"
)
View Source
const (
	// DeleteCSIVolumeSnapshotFuncName gives the name of the function
	DeleteCSISnapshotContentFuncName = "DeleteCSISnapshotContent"

	// DeleteCSISnapshotContentNameArg provides name of the VolumeSnapshotContent that needs to be deleted
	DeleteCSISnapshotContentNameArg = "name"
)
View Source
const (
	// DeleteDataFuncName gives the function name
	DeleteDataFuncName = "DeleteData"
	// DeleteDataNamespaceArg provides the namespace
	DeleteDataNamespaceArg = "namespace"
	// DeleteDataBackupArtifactPrefixArg provides the path to restore backed up data
	DeleteDataBackupArtifactPrefixArg = "backupArtifactPrefix"
	// DeleteDataBackupIdentifierArg provides a unique ID added to the backed up artifacts
	DeleteDataBackupIdentifierArg = "backupID"
	// DeleteDataBackupTagArg provides a unique tag added to the backed up artifacts
	DeleteDataBackupTagArg = "backupTag"
	// DeleteDataEncryptionKeyArg provides the encryption key to be used for deletes
	DeleteDataEncryptionKeyArg = "encryptionKey"
	// DeleteDataReclaimSpace provides a way to specify if space should be reclaimed
	DeleteDataReclaimSpace = "reclaimSpace"
	// DeleteDataPodOverrideArg contains pod specs to override default pod specs
	DeleteDataPodOverrideArg = "podOverride"

	// DeleteDataOutputSpaceFreed is the key for the output reporting the space freed
	DeleteDataOutputSpaceFreed = "spaceFreed"
)
View Source
const (
	// DeleteDataAllFuncName gives the name of the function
	DeleteDataAllFuncName = "DeleteDataAll"
	// DeleteDataAllNamespaceArg provides the namespace
	DeleteDataAllNamespaceArg = "namespace"
	// DeleteDataAllBackupArtifactPrefixArg provides the path to restore backed up data
	DeleteDataAllBackupArtifactPrefixArg = "backupArtifactPrefix"
	// DeleteDataAllEncryptionKeyArg provides the encryption key to be used for deletes
	DeleteDataAllEncryptionKeyArg = "encryptionKey"
	// DeleteDataAllReclaimSpace provides a way to specify if space should be reclaimed
	DeleteDataAllReclaimSpace = "reclaimSpace"
	// DeleteDataAllBackupInfo provides backup info required for delete
	DeleteDataAllBackupInfo = "backupInfo"
	// DeleteDataAllPodOverrideArg contains pod specs to override default pod specs
	DeleteDataAllPodOverrideArg = "podOverride"
)
View Source
const (
	// DeleteRDSSnapshotFuncName gives the name of the function
	DeleteRDSSnapshotFuncName      = "DeleteRDSSnapshot"
	DeleteRDSSnapshotSnapshotIDArg = "snapshotID"
)
View Source
const (
	// DeleteVolumeSnapshotFuncName gives the function name
	DeleteVolumeSnapshotFuncName     = "DeleteVolumeSnapshot"
	DeleteVolumeSnapshotNamespaceArg = "namespace"
	DeleteVolumeSnapshotManifestArg  = "snapshots"
)
View Source
const (
	ExportRDSSnapshotToLocFuncName           = "ExportRDSSnapshotToLocation"
	ExportRDSSnapshotToLocNamespaceArg       = "namespace"
	ExportRDSSnapshotToLocInstanceIDArg      = "instanceID"
	ExportRDSSnapshotToLocSnapshotIDArg      = "snapshotID"
	ExportRDSSnapshotToLocDBUsernameArg      = "username"
	ExportRDSSnapshotToLocDBPasswordArg      = "password"
	ExportRDSSnapshotToLocBackupArtPrefixArg = "backupArtifactPrefix"
	ExportRDSSnapshotToLocDBEngineArg        = "dbEngine"
	ExportRDSSnapshotToLocDatabasesArg       = "databases"
	ExportRDSSnapshotToLocSecGrpIDArg        = "securityGroupID"
	ExportRDSSnapshotToLocBackupID           = "backupID"
	ExportRDSSnapshotToLocDBSubnetGroupArg   = "dbSubnetGroup"
	ExportRDSSnapshotToLocImageArg           = "image"

	PostgrSQLEngine RDSDBEngine = "PostgreSQL"

	BackupAction  RDSAction = "backup"
	RestoreAction RDSAction = "restore"
)
View Source
const (
	// KubeExecFuncName gives the function name
	KubeExecFuncName         = "KubeExec"
	KubeExecNamespaceArg     = "namespace"
	KubeExecPodNameArg       = "pod"
	KubeExecContainerNameArg = "container"
	KubeExecCommandArg       = "command"
)
View Source
const (
	// KubeExecAllFuncName gives the function name
	KubeExecAllFuncName          = "KubeExecAll"
	KubeExecAllNamespaceArg      = "namespace"
	KubeExecAllPodsNameArg       = "pods"
	KubeExecAllContainersNameArg = "containers"
	KubeExecAllCommandArg        = "command"
)
View Source
const (

	// KubeTaskFuncName gives the function name
	KubeTaskFuncName       = "KubeTask"
	KubeTaskNamespaceArg   = "namespace"
	KubeTaskImageArg       = "image"
	KubeTaskCommandArg     = "command"
	KubeTaskPodOverrideArg = "podOverride"
)
View Source
const (
	// KubeOpsFuncName gives the name of the function
	KubeOpsFuncName = "KubeOps"
	// KubeOpsSpecArg provides resource spec yaml
	KubeOpsSpecArg = "spec"
	// KubeOpsNamespaceArg provides resource namespace
	KubeOpsNamespaceArg = "namespace"
	// KubeOpsObjectReference specifies object details for delete operation
	KubeOpsObjectReferenceArg = "objectReference"
	// KubeOpsOperationArg is the kubeops operation needs to be executed
	KubeOpsOperationArg = "operation"
)
View Source
const (
	// LocationDeleteFuncName gives the function name
	LocationDeleteFuncName = "LocationDelete"
	// LocationDeleteArtifactArg provides the path to the artifacts on the object store
	LocationDeleteArtifactArg = "artifact"
)
View Source
const (
	// MultiContainerRunFuncName gives the function name
	MultiContainerRunFuncName             = "MultiContainerRun"
	MultiContainerRunNamespaceArg         = "namespace"
	MultiContainerRunBackgroundImageArg   = "backgroundImage"
	MultiContainerRunBackgroundCommandArg = "backgroundCommand"
	MultiContainerRunOutputImageArg       = "outputImage"
	MultiContainerRunOutputCommandArg     = "outputCommand"
	MultiContainerRunVolumeMediumArg      = "sharedVolumeMedium"
	MultiContainerRunVolumeSizeLimitArg   = "sharedVolumeSizeLimit"
	MultiContainerRunSharedDirArg         = "sharedVolumeDir"
	MultiContainerRunPodOverrideArg       = "podOverride"
	MultiContainerRunInitImageArg         = "initImage"
	MultiContainerRunInitCommandArg       = "initCommand"
)
View Source
const (

	// PrepareDataFuncName gives the function name
	PrepareDataFuncName       = "PrepareData"
	PrepareDataNamespaceArg   = "namespace"
	PrepareDataImageArg       = "image"
	PrepareDataCommandArg     = "command"
	PrepareDataVolumes        = "volumes"
	PrepareDataServiceAccount = "serviceaccount"
	PrepareDataPodOverrideArg = "podOverride"
)
View Source
const (
	// Snapshot API Group
	SnapshotAPIGroup = "snapshot.storage.k8s.io"
	// RestoreCSISnapshotFuncName gives the name of the function
	RestoreCSISnapshotFuncName = "RestoreCSISnapshot"
	// RestoreCSISnapshotNameArg provides name of the VolumeSnapshot
	RestoreCSISnapshotNameArg = "name"
	// RestoreCSISnapshotPVCNameArg gives the name of the newly restored PVC
	RestoreCSISnapshotPVCNameArg = "pvc"
	// RestoreCSISnapshotNamespaceArg mentions the namespace of the newly restored PVC
	RestoreCSISnapshotNamespaceArg = "namespace"
	// RestoreCSISnapshotStorageClassArg specifies the name of the StorageClass
	RestoreCSISnapshotStorageClassArg = "storageClass"
	// RestoreCSISnapshotStorageRequestArg provides the storage size to be requested for PV in PVC
	RestoreCSISnapshotRestoreSizeArg = "restoreSize"
	// RestoreCSISnapshotAccessModesArg lists down the accessmodes for the underlying PV
	RestoreCSISnapshotAccessModesArg = "accessModes"
	// RestoreCSISnapshotLabelsArg has labels that will be added to the newly restored PVC
	RestoreCSISnapshotLabelsArg = "labels"
	// RestoreCSISnapshotVolumeModeArg defines mode of volume
	RestoreCSISnapshotVolumeModeArg = "volumeMode"
)
View Source
const (

	// RestoreDataFuncName gives the function name
	RestoreDataFuncName = "RestoreData"
	// RestoreDataNamespaceArg provides the namespace
	RestoreDataNamespaceArg = "namespace"
	// RestoreDataImageArg provides the image of the container with required tools
	RestoreDataImageArg = "image"
	// RestoreDataBackupArtifactPrefixArg provides the path of the backed up artifact
	RestoreDataBackupArtifactPrefixArg = "backupArtifactPrefix"
	// RestoreDataRestorePathArg provides the path to restore backed up data
	RestoreDataRestorePathArg = "restorePath"
	// RestoreDataBackupIdentifierArg provides a unique ID added to the backed up artifacts
	RestoreDataBackupIdentifierArg = "backupIdentifier"
	// RestoreDataPodArg provides the pod connected to the data volume
	RestoreDataPodArg = "pod"
	// RestoreDataVolsArg provides a map of PVC->mountPaths to be attached
	RestoreDataVolsArg = "volumes"
	// RestoreDataEncryptionKeyArg provides the encryption key used during backup
	RestoreDataEncryptionKeyArg = "encryptionKey"
	// RestoreDataBackupTagArg provides a unique tag added to the backup artifacts
	RestoreDataBackupTagArg = "backupTag"
	// RestoreDataPodOverrideArg contains pod specs which overrides default pod specs
	RestoreDataPodOverrideArg = "podOverride"
)
View Source
const (

	// RestoreDataAllFuncName gives the function name
	RestoreDataAllFuncName = "RestoreDataAll"
	// RestoreDataAllNamespaceArg provides the namespace
	RestoreDataAllNamespaceArg = "namespace"
	// RestoreDataAllImageArg provides the image of the container with required tools
	RestoreDataAllImageArg = "image"
	// RestoreDataAllBackupArtifactPrefixArg provides the path of the backed up artifact
	RestoreDataAllBackupArtifactPrefixArg = "backupArtifactPrefix"
	// RestoreDataAllRestorePathArg provides the path to restore backed up data
	RestoreDataAllRestorePathArg = "restorePath"
	// RestoreDataAllPodsArg provides the pod connected to the data volume
	RestoreDataAllPodsArg = "pods"
	// RestoreDataAllEncryptionKeyArg provides the encryption key used during backup
	RestoreDataAllEncryptionKeyArg = "encryptionKey"
	// RestoreDataAllBackupInfo provides backup info required for restore
	RestoreDataAllBackupInfo = "backupInfo"
	// RestoreDataPodOverrideArg contains pod specs which overrides default pod specs
	RestoreDataAllPodOverrideArg = "podOverride"
)
View Source
const (
	RestoreDataUsingKopiaServerFuncName = "RestoreDataUsingKopiaServer"
	// SparseRestoreOption is the key for specifying whether to do a sparse restore
	SparseRestoreOption = "sparseRestore"
)
View Source
const (
	// RestoreRDSSnapshotFuncName will store the name of the function
	RestoreRDSSnapshotFuncName = "RestoreRDSSnapshot"
	// RestoreRDSSnapshotDBEngine is type that will store which db we are dealing with
	RestoreRDSSnapshotDBEngine = "dbEngine"
	// RestoreRDSSnapshotNamespace for namespace arg
	RestoreRDSSnapshotNamespace = "namespace"
	// RestoreRDSSnapshotInstanceID is ID of the target instance
	RestoreRDSSnapshotInstanceID = "instanceID"
	// RestoreRDSSnapshotBackupArtifactPrefix stores the prefix of backup in object storage
	RestoreRDSSnapshotBackupArtifactPrefix = "backupArtifactPrefix"
	// RestoreRDSSnapshotBackupID stores the ID of backup in object storage
	RestoreRDSSnapshotBackupID = "backupID"
	// RestoreRDSSnapshotSnapshotID stores the snapshot ID
	RestoreRDSSnapshotSnapshotID = "snapshotID"
	// RestoreRDSSnapshotSecGrpID stores securityGroupID in the args
	RestoreRDSSnapshotSecGrpID = "securityGroupID"
	// RestoreRDSSnapshotEndpoint to set endpoint of restored rds instance
	RestoreRDSSnapshotEndpoint = "endpoint"
	// RestoreRDSSnapshotDBSubnetGroup is the dbSubnetGroup of the restored RDS instance
	RestoreRDSSnapshotDBSubnetGroup = "dbSubnetGroup"
	// RestoreRDSSnapshotUsername stores username of the database
	RestoreRDSSnapshotUsername = "username"
	// RestoreRDSSnapshotPassword stores the password of the database
	RestoreRDSSnapshotPassword = "password"
	// RestoreRDSSnapshotImage provides the image of the container with required tools
	RestoreRDSSnapshotImage = "image"

	// PostgreSQLEngine stores the postgres appname
	PostgreSQLEngine RDSDBEngine = "PostgreSQL"

	RDSPostgresDBInstanceEngineVersion = "13.0"
)
View Source
const (
	// ScaleWorkloadFuncName gives the function name
	ScaleWorkloadFuncName     = "ScaleWorkload"
	ScaleWorkloadNamespaceArg = "namespace"
	ScaleWorkloadNameArg      = "name"
	ScaleWorkloadKindArg      = "kind"
	ScaleWorkloadReplicas     = "replicas"
	ScaleWorkloadWaitArg      = "waitForReady"
)
View Source
const (
	// FunctionOutputVersion returns version
	FunctionOutputVersion = "version"

	// since pod labels and annotations argument are going to be named the
	// same for all the kanister functions that support these arguments, instead
	// of creating these for the functions, it's better to have a const here.
	PodLabelsArg      = "podLabels"
	PodAnnotationsArg = "podAnnotations"
)
View Source
const (
	// WaitFuncName specifies the function name
	WaitFuncName      = "Wait"
	WaitTimeoutArg    = "timeout"
	WaitConditionsArg = "conditions"
)
View Source
const (
	// WaitForSnapshotCompletionFuncName gives the function name
	WaitForSnapshotCompletionFuncName     = "WaitForSnapshotCompletion"
	WaitForSnapshotCompletionSnapshotsArg = "snapshots"
)
View Source
const (
	// WaitV2FuncName specifies the function name
	WaitV2FuncName      = "WaitV2"
	WaitV2TimeoutArg    = "timeout"
	WaitV2ConditionsArg = "conditions"
)
View Source
const (
	DeleteDataUsingKopiaServerFuncName = "DeleteDataUsingKopiaServer"
)

Variables

This section is empty.

Functions

func Arg

func Arg(args map[string]interface{}, argName string, result interface{}) error

Arg returns the value of the specified argument It will return an error if the argument type does not match the result type

func ArgExists

func ArgExists(args map[string]interface{}, argName string) bool

ArgExists checks if the argument exists

func CheckRepository

func CheckRepository(
	ctx context.Context,
	cli kubernetes.Interface,
	tp param.TemplateParams,
	encryptionKey,
	targetPaths,
	jobPrefix string,
	insecureTLS bool,
	podOverride crv1alpha1.JSONMap,
	annotations,
	labels map[string]string,
) (map[string]interface{}, error)

func CheckRepositoryPodFunc

func CheckRepositoryPodFunc(
	cli kubernetes.Interface,
	tp param.TemplateParams,
	encryptionKey,
	targetPath string,
	insecureTLS bool,
) func(ctx context.Context, pc kube.PodController) (map[string]interface{}, error)

func CleanUpCredsFile

func CleanUpCredsFile(ctx context.Context, pw kube.PodWriter, namespace, podName, containerName string)

CleanUpCredsFile is used to remove the file created by the given PodWriter

func DeleteAuroraDBCluster

func DeleteAuroraDBCluster(ctx context.Context, rdsCli *rds.RDS, descOp *rdserr.DescribeDBClustersOutput, instanceID string) error

func FetchPodVolumes

func FetchPodVolumes(pod string, tp param.TemplateParams) (map[string]string, error)

FetchPodVolumes returns a map of PVCName->MountPath for a given pod

func GetPodSpecOverride

func GetPodSpecOverride(tp param.TemplateParams, args map[string]interface{}, argName string) (crv1alpha1.JSONMap, error)

GetPodSpecOverride merges PodOverride specs passed in args and TemplateParams and returns combined Override specs

func GetPodWriter

func GetPodWriter(cli kubernetes.Interface, ctx context.Context, namespace, podName, containerName string, profile *param.Profile) (kube.PodWriter, error)

GetPodWriter creates a file with Google credentials if the given profile points to a GCS location

func GetRDSAuroraDBSubnetGroup

func GetRDSAuroraDBSubnetGroup(ctx context.Context, rdsCli *rds.RDS, instanceID string) (*string, error)

func GetRDSDBSubnetGroup

func GetRDSDBSubnetGroup(ctx context.Context, rdsCli *rds.RDS, instanceID string) (*string, error)

func GetYamlList

func GetYamlList(args map[string]interface{}, argName string) ([]string, error)

GetYamlList parses yaml formatted list arg and converts it into slice of string. Returns nil error, if arg is not present. The value can be in either of two formats: key: "- val1\n- val2\n- val3" (string) if you are referencing from configmap or from a inputArtifacts OR key:

  • "val1"
  • "val2" (list of string) Allows users to pass list in blueprint

func MaybeWriteProfileCredentials

func MaybeWriteProfileCredentials(ctx context.Context, pc kube.PodController, profile *param.Profile) (kube.PodFileRemover, error)

MaybeWriteProfileCredentials creates a file with Google credentials if the given profile points to a GCS location, otherwise does nothing

func OptArg

func OptArg(args map[string]interface{}, argName string, result interface{}, defaultValue interface{}) error

OptArg returns the value of the specified argument if it exists It will return the default value if the argument does not exist

func PodAnnotationsFromFunctionArgs

func PodAnnotationsFromFunctionArgs(args map[string]any) (map[string]string, error)

func PodLabelsFromFunctionArgs

func PodLabelsFromFunctionArgs(args map[string]any) (map[string]string, error)

func ResolveArtifactPrefix

func ResolveArtifactPrefix(artifactPrefix string, profile *param.Profile) string

ResolveArtifactPrefix appends the bucket name as a suffix to the given artifact path if not already present

func ValidateAnnotations

func ValidateAnnotations(annotations map[string]string) error

func ValidateCredentials

func ValidateCredentials(creds *param.Credential) error

ValidateCredentials verifies if the given credentials have appropriate values set

func ValidateLabels

func ValidateLabels(labels map[string]string) error

func ValidateLocationForBlockstorage

func ValidateLocationForBlockstorage(profile *param.Profile, sType blockstorage.Type) error

func ValidatePodLabelsAndAnnotations

func ValidatePodLabelsAndAnnotations(funcName string, args map[string]any) error

ValidatePodLabelsAndAnnotations validates the labels and annotations that are passed to a Kanister function (`funcName`) using `podLabels` and `podAnnotations` args.

func ValidateProfile

func ValidateProfile(profile *param.Profile) error

ValidateProfile verifies if the given profile has valid creds and location type

Types

type ActionSetAnnotations

type ActionSetAnnotations map[string]string

func (ActionSetAnnotations) MergeBPAnnotations

func (a ActionSetAnnotations) MergeBPAnnotations(bpAnnotations map[string]string) map[string]string

MergeBPAnnotations merges the annotations provided in the blueprint with the annotations configured via actionset. If the same key is present at both places, the one in blueprint will be used.

type ActionSetLabels

type ActionSetLabels map[string]string

func (ActionSetLabels) MergeBPLabels

func (a ActionSetLabels) MergeBPLabels(bpLabels map[string]string) map[string]string

MergeBPLabels merges the labels provided in the blueprint with the labels configured via actionset. If the same key is present at both places, the one in blueprint will be used.

type BackupDataStatsFunc

type BackupDataStatsFunc struct {
	// contains filtered or unexported fields
}

func (*BackupDataStatsFunc) Arguments

func (*BackupDataStatsFunc) Arguments() []string

func (*BackupDataStatsFunc) Exec

func (b *BackupDataStatsFunc) Exec(ctx context.Context, tp param.TemplateParams, args map[string]interface{}) (map[string]interface{}, error)

func (*BackupDataStatsFunc) ExecutionProgress

func (b *BackupDataStatsFunc) ExecutionProgress() (crv1alpha1.PhaseProgress, error)

func (*BackupDataStatsFunc) Name

func (*BackupDataStatsFunc) Name() string

func (*BackupDataStatsFunc) RequiredArgs

func (*BackupDataStatsFunc) RequiredArgs() []string

func (*BackupDataStatsFunc) Validate

func (b *BackupDataStatsFunc) Validate(args map[string]any) error

type BackupInfo

type BackupInfo struct {
	PodName   string
	BackupID  string
	BackupTag string
}

type CheckRepositoryFunc

type CheckRepositoryFunc struct {
	// contains filtered or unexported fields
}

func (*CheckRepositoryFunc) Arguments

func (*CheckRepositoryFunc) Arguments() []string

func (*CheckRepositoryFunc) Exec

func (c *CheckRepositoryFunc) Exec(ctx context.Context, tp param.TemplateParams, args map[string]interface{}) (map[string]interface{}, error)

func (*CheckRepositoryFunc) ExecutionProgress

func (c *CheckRepositoryFunc) ExecutionProgress() (crv1alpha1.PhaseProgress, error)

func (*CheckRepositoryFunc) Name

func (*CheckRepositoryFunc) Name() string

func (*CheckRepositoryFunc) RequiredArgs

func (*CheckRepositoryFunc) RequiredArgs() []string

func (*CheckRepositoryFunc) Validate

func (c *CheckRepositoryFunc) Validate(args map[string]any) error

type Condition

type Condition struct {
	ObjectReference crv1alpha1.ObjectReference `json:"objectReference,omitempty"`
	Condition       string                     `json:"condition,omitempty"`
}

type RDSAction

type RDSAction string

RDSAction for RDS backup or restore actions

type RDSDBEngine

type RDSDBEngine string

RDSDBEngine for RDS Engine types

type VolumeSnapshotInfo

type VolumeSnapshotInfo struct {
	SnapshotID string
	Type       blockstorage.Type
	Region     string
	PVCName    string
	Az         string
	Tags       blockstorage.VolumeTags
	VolumeType string
}

type WaitConditions

type WaitConditions struct {
	AnyOf []Condition `json:"anyOf,omitempty"`
	AllOf []Condition `json:"allOf,omitempty"`
}

Jump to

Keyboard shortcuts

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