function

package
v0.0.0-...-dc362a7 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package function contains all common functions used in the project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNonAdminBackupAnnotations

func AddNonAdminBackupAnnotations(ownerNamespace string, ownerName string, ownerUUID string, existingAnnotations map[string]string) map[string]string

AddNonAdminBackupAnnotations return a map with both the object annotations and with the default NonAdminBackup annotations. If error occurs, a map with only the default NonAdminBackup annotations is returned

func AddNonAdminLabels

func AddNonAdminLabels(labels map[string]string) map[string]string

AddNonAdminLabels return a map with both the object labels and with the default Non Admin labels. If error occurs, a map with only the default Non Admin labels is returned

func CheckVeleroBackupLabels

func CheckVeleroBackupLabels(backup *velerov1api.Backup) bool

CheckVeleroBackupLabels return true if Velero Backup object has required Non Admin labels, false otherwise

func GenerateVeleroBackupName

func GenerateVeleroBackupName(namespace, nabName string) string

GenerateVeleroBackupName return generated name for Velero Backup object created from NonAdminBackup

func GetBackupSpecFromNonAdminBackup

func GetBackupSpecFromNonAdminBackup(nonAdminBackup *nacv1alpha1.NonAdminBackup) (*velerov1api.BackupSpec, error)

GetBackupSpecFromNonAdminBackup return BackupSpec object from NonAdminBackup spec, if no error occurs

func GetNonAdminBackupFromVeleroBackup

func GetNonAdminBackupFromVeleroBackup(ctx context.Context, clientInstance client.Client, backup *velerov1api.Backup) (*nacv1alpha1.NonAdminBackup, error)

GetNonAdminBackupFromVeleroBackup return referenced NonAdminBackup object from Velero Backup object, if no error occurs

func UpdateNonAdminBackupFromVeleroBackup

func UpdateNonAdminBackupFromVeleroBackup(ctx context.Context, r client.Client, logger logr.Logger, nab *nacv1alpha1.NonAdminBackup, veleroBackup *velerov1api.Backup) error

UpdateNonAdminBackupFromVeleroBackup update, if necessary, NonAdminBackup object fields related to referenced Velero Backup object, if no error occurs

Types

This section is empty.

Jump to

Keyboard shortcuts

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