utils

package
v0.0.0-...-c71c742 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AwsSecretPrefix        = "aws-"
	DbSecretPrefix         = "db-"
	EncSecretPrefix        = "encryption-"
	BackupControllerName   = "controller_backup"
	DatabaseControllerName = "controller_database"
)

Variables

This section is empty.

Functions

func AddBackupMandatorySpecs

func AddBackupMandatorySpecs(bkp *v1alpha1.Backup)

AddBackupMandatorySpecs will add the specs which are mandatory for Backup CR in the case them not be applied

func AddDatabaseMandatorySpecs

func AddDatabaseMandatorySpecs(db *v1alpha1.Database)

AddDatabaseMandatorySpecs will add the specs which are mandatory for Database CR in the case them not be applied

func BuildDatabaseNameEnvVar

func BuildDatabaseNameEnvVar(db *v1alpha1.Database) corev1.EnvVar

BuildDatabaseNameEnvVar return the corev1.EnvVar object wth the key:value for the database name

func BuildDatabasePasswordEnvVar

func BuildDatabasePasswordEnvVar(db *v1alpha1.Database) corev1.EnvVar

BuildDatabasePasswordEnvVar return the corev1.EnvVar object wth the key:value for the database pwd

func BuildDatabaseUserEnvVar

func BuildDatabaseUserEnvVar(db *v1alpha1.Database) corev1.EnvVar

BuildDatabaseUserEnvVar return the corev1.EnvVar object wth the key:value for the database user

func GetAWSSecretName

func GetAWSSecretName(bkp *v1alpha1.Backup) string

GetAWSSecretName returns the name of the secret NOTE: The user can just inform the name and namespace of the Secret which is already applied in the cluster OR the data required for the operator be able to create one in the same namespace where the backup is applied

func GetAwsSecretNamespace

func GetAwsSecretNamespace(bkp *v1alpha1.Backup) string

GetAwsSecretNamespace returns the namespace where the secret is applied already NOTE: The user can just inform the name and namespace of the Secret which is already applied in the cluster OR the data required for the operator be able to create one in the same namespace where the backup is applied

func GetEncSecretName

func GetEncSecretName(bkp *v1alpha1.Backup) string

GetEncSecretName returns the name of the secret NOTE: The user can just inform the name and namespace of the Secret which is already applied in the cluster OR the data required for the operator be able to create one in the same namespace where the backup is applied

func GetEncSecretNamespace

func GetEncSecretNamespace(bkp *v1alpha1.Backup) string

GetEncSecretNamespace returns the namespace where the secret is applied already NOTE: The user can just inform the name and namespace of the Secret which is already applied in the cluster OR the data required for the operator be able to create one in the same namespace where the backup is applied

func GetEnvVarKey

func GetEnvVarKey(cgfKey, defaultKey string) string

GetEnvVarKey check if the customized key is in place for the configMap and returned the valid key

func GetLabels

func GetLabels(name string) map[string]string

func GetLoggerByRequestAndController

func GetLoggerByRequestAndController(request reconcile.Request, controllerName string) logr.Logger

func IsAwsKeySetupByName

func IsAwsKeySetupByName(bkp *v1alpha1.Backup) bool

IsAwsKeySetupByName returns true when it is setup to get an pre-existing secret applied in the cluster. NOTE: The user can just inform the name of the Secret which is already applied in the cluster OR the data required for the operator be able to create one

func IsEncKeySetupByName

func IsEncKeySetupByName(bkp *v1alpha1.Backup) bool

IsEncKeySetupByName returns true when it is setup to get an pre-existing secret applied in the cluster. NOTE: The user can just inform the name of the Secret which is already applied in the cluster OR the data required for the operator be able to create one

func IsEncKeySetupByNameAndNamespace

func IsEncKeySetupByNameAndNamespace(bkp *v1alpha1.Backup) bool

IsEncKeySetupByNameAndNamespace it will return true when the Enc Key is setup by using an preexisting secret applied in the cluster.

func IsEncryptionKeyOptionConfig

func IsEncryptionKeyOptionConfig(bkp *v1alpha1.Backup) bool

IsEncryptionKeyOptionConfig returns true when the CR has the configuration to allow it be used

Types

This section is empty.

Jump to

Keyboard shortcuts

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