dbinstance

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswordCacheKey    = "dbMasterUserPassword"
	RestoreFlagCacheKay = "dbRestoreState"

	RestoreStateRestored restoreSate = "RestoreStateRestored"
	RestoreStateNormal   restoreSate = "RestoreStateNormal"

	ErrNoRetrievePasswordOrGenerate                          = "cannot retrieve password form masterUserPasswordSecretRef or generate a password"
	ErrNoMasterUserPasswordSecretRefNorAutogenerateNoRestore = "neither a masterUserPasswordSecretRef is given, nor password autogeneration was enabled, not a restore is performed"
	ErrCachePassword                                         = "cannot cache password"
	ErrNoPasswordUpToDate                                    = "cannot determine password up to date status"
	ErrGetCachedPassword                                     = "cannot get cached password"
	ErrRetrievePasswordForUpdate                             = "cannot retrieve password for update"
)

Publicly usable variables

Variables

This section is empty.

Functions

func Cache added in v0.42.0

func Cache(ctx context.Context, kube client.Client, mg resource.Managed, kv map[string]string) (sc *corev1.Secret, err error)

Cache caches the given key/value map to the corresponding cache secret

func DeleteCache added in v0.42.0

func DeleteCache(ctx context.Context, kube client.Client, mg resource.Managed) (err error)

DeleteCache removes the (secret) cache

func GenerateRestoreDBInstanceFromS3Input

func GenerateRestoreDBInstanceFromS3Input(name, password string, p *v1alpha1.DBInstanceParameters) *svcsdk.RestoreDBInstanceFromS3Input

GenerateRestoreDBInstanceFromS3Input from RDSInstanceSpec

func GenerateRestoreDBInstanceFromSnapshotInput

func GenerateRestoreDBInstanceFromSnapshotInput(name string, p *v1alpha1.DBInstanceParameters) *svcsdk.RestoreDBInstanceFromDBSnapshotInput

GenerateRestoreDBInstanceFromSnapshotInput from RDSInstanceSpec

func GenerateRestoreDBInstanceToPointInTimeInput

func GenerateRestoreDBInstanceToPointInTimeInput(name string, p *v1alpha1.DBInstanceParameters) *svcsdk.RestoreDBInstanceToPointInTimeInput

GenerateRestoreDBInstanceToPointInTimeInput from RDSInstanceSpec

func GetDesiredPassword added in v0.42.0

func GetDesiredPassword(ctx context.Context, kube client.Client, cr svcapitypes.RDSClusterOrInstance) (desiredPassword string, err error)

GetDesiredPassword calculates the desired password from cache/masterPasswordSecretRef

func GetSecretValue added in v0.42.0

func GetSecretValue(ctx context.Context, kube client.Client, ref *xpv1.SecretKeySelector) (val string, err error)

GetSecretValue fetches the referenced input secret key reference

func PasswordUpToDate added in v0.42.0

func PasswordUpToDate(ctx context.Context, kube client.Client, cr svcapitypes.RDSClusterOrInstance) (upToDate bool, err error)

PasswordUpToDate tell whether the password is up-to-date (depends on restore, masterPasswordSecretRef and cached password)

Types

This section is empty.

Jump to

Keyboard shortcuts

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