config

package
v0.0.0-...-2ea7a04 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RedisSecretUsernameKey = "username"
	RedisSecretPasswordKey = "password" // #nosec

	S3_ACCESS_KEY_ID     = "AWS_ACCESS_KEY_ID"     // #nosec
	S3_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY" // #nosec
	S3_TOKEN             = "TOKEN"                 // #nosec
	S3_REGION            = "REGION"
	S3_ENDPOINTURL       = "ENDPOINTURL"

	PAUSE_ANNOTATION_KEY = "app.cpaas.io/pause-timestamp"

	// DNS
	LocalInjectName = "local.inject"

	ImageVersionKeyPrefix = "middleware.instance/imageversions-"
)
View Source
const (
	InstanceTypeKey               = "middleware.instance/type"
	CRUpgradeableVersion          = "middleware.upgrade.crVersion"
	CRUpgradeableComponentVersion = "middleware.upgrade.component.version"
	CRAutoUpgradeKey              = "middleware.instance/autoUpgrade"
	LatestKey                     = "middleware.instance/latest"
	CRVersionKey                  = "middleware.instance/crVersion"
	CRVersionSHAKey               = "middleware.instance/crVersion-sha"
	CoreComponentName             = "redis"

	OperatorVersionAnnotation = "operatorVersion"
)

Version Controller related keys

View Source
const DefaultRedisVersion = "6.0"

Variables

View Source
var (
	ErrImageNotFound = errors.New("image not found")
	ErrInvalidImage  = errors.New("invalid source image")
)

Functions

func BuildImageVersionKey

func BuildImageVersionKey(typ string) string

func DebugEnabled

func DebugEnabled() bool

func GetActiveRedisImageByVersion

func GetActiveRedisImageByVersion(version string) (string, error)

func GetDefaultRedisImage

func GetDefaultRedisImage() string

func GetOperatorVersion

func GetOperatorVersion() string

func GetPodName

func GetPodName() string

func GetPodUid

func GetPodUid() string

func GetProxyImage

func GetProxyImage(obj v1.Object) string

func GetRedisExporterImage

func GetRedisExporterImage(obj v1.Object) string

func GetRedisExposeImage

func GetRedisExposeImage(obj v1.Object) string

func GetRedisImageByVersion

func GetRedisImageByVersion(version string) (string, error)

func GetRedisToolsImage

func GetRedisToolsImage(obj v1.Object) string

func GetRedisVersion

func GetRedisVersion(image string) string

func GetShakeImage

func GetShakeImage(obj v1.Object) string

func GetWatchNamespace

func GetWatchNamespace() string

func Getenv

func Getenv(name string, defaults ...string) string

Types

type EventReason

type EventReason = string
const (
	EventPause          EventReason = "Paused"
	EventCreateUser     EventReason = "CreatedUser"
	EventUpdateUser     EventReason = "UpdatedUser"
	EventUpdatePassword EventReason = "UpdatedPassword"
	EventCleanResource  EventReason = "CleanResource"
	EventFailover       EventReason = "Failover"

	EventSetupMaster   EventReason = "SetupMaster"
	EventAllocateSlots EventReason = "AllocatedSlots"
	EventAssignSlots   EventReason = "AssignSlots"
	EventRebalance     EventReason = "Rebalancing"
)

Jump to

Keyboard shortcuts

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