resources

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitoredBy = "kvrocks/monitored-by"
	KvrocksRole = "kvrocks/role"
)
View Source
const DefaultStorageSize = "10Gi"
View Source
const SentinelImage = "redis:6.2.4"

Variables

View Source
var (
	ErrorPasswordEmpty        = "passworUnreasonable"
	ErrorReplicasUnreasonable = "replicasUnreasonable"
	ErrorResourcesNULL        = "resourcesUnreasonable"
)
View Source
var TerminationGracePeriodSeconds int64 = 20
View Source
var UnChangeCfg = map[string]struct{}{
	"daemonize":                             {},
	"bind":                                  {},
	"port":                                  {},
	"workers":                               {},
	"tcp-backlog":                           {},
	"slaveof":                               {},
	"db-name":                               {},
	"dir":                                   {},
	"backup-dir":                            {},
	"log-dir":                               {},
	"pidfile":                               {},
	"supervised":                            {},
	"rename-command":                        {},
	"rocksdb.block_size":                    {},
	"rocksdb.wal_size_limit_mb":             {},
	"rocksdb.enable_pipelined_write":        {},
	"rocksdb.cache_index_and_filter_blocks": {},
	"rocksdb.subkey_block_cache_size":       {},
	"rocksdb.metadata_block_cache_size":     {},
	"rocksdb.share_metadata_and_subkey_block_cache": {},
	"rocksdb.row_cache_size":                        {},
	"masterauth":                                    {},
	"requirepass":                                   {},
	"cluster-enabled":                               {},
}

Functions

func DeploymentLabels

func DeploymentLabels(name string) map[string]string

func GetClusterName

func GetClusterName(systenId, name string) string

func GetDeploymentName

func GetDeploymentName(name string, index ...int) string

func GetPVCOrPodIndex

func GetPVCOrPodIndex(podName string) (int, error)

func GetSentinelInstance

func GetSentinelInstance(instance *kvrocksv1alpha1.KVRocks) *kvrocksv1alpha1.KVRocks

func GetSentinelName

func GetSentinelName(system string) string

func GetStatefulSetName

func GetStatefulSetName(name string, index ...int) string

func MergeLabels

func MergeLabels(allLabels ...map[string]string) map[string]string

func MonitorLabels

func MonitorLabels(sentinel string) map[string]string

func NewClusterStatefulSet

func NewClusterStatefulSet(instance *kvrocksv1alpha1.KVRocks, index int) *kruise.StatefulSet

func NewExporterContainer

func NewExporterContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container

func NewInstanceContainer

func NewInstanceContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container

func NewKVRocksConfigMap

func NewKVRocksConfigMap(instance *kvrocksv1alpha1.KVRocks) *corev1.ConfigMap

func NewKVRocksService

func NewKVRocksService(instance *kvrocksv1alpha1.KVRocks) *corev1.Service

func NewReplicationStatefulSet

func NewReplicationStatefulSet(instance *kvrocksv1alpha1.KVRocks) *kruise.StatefulSet

func NewSentinelConfigMap

func NewSentinelConfigMap(instance *kvrocksv1alpha1.KVRocks) *corev1.ConfigMap

func NewSentinelContainer

func NewSentinelContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container

func NewSentinelDeployment

func NewSentinelDeployment(instance *kvrocksv1alpha1.KVRocks) *appsv1.Deployment

func NewSentinelService

func NewSentinelService(instance *kvrocksv1alpha1.KVRocks) *corev1.Service

func NewSentinelStatefulSet

func NewSentinelStatefulSet(instance *kvrocksv1alpha1.KVRocks) *kruise.StatefulSet

func NewStatefulSet

func NewStatefulSet(instance *kvrocksv1alpha1.KVRocks, name string) *kruise.StatefulSet

func ParseKVRocksConfigs

func ParseKVRocksConfigs(config map[string]string) map[string]string

func ParseRedisName

func ParseRedisName(name string) (string, string)

func SelectorLabels

func SelectorLabels(instance *kvrocksv1alpha1.KVRocks) map[string]string

func SentinelLabels

func SentinelLabels() map[string]string

func SetClusterNodeId

func SetClusterNodeId() string

func StatefulSetLabels

func StatefulSetLabels(name string) map[string]string

func ValidateKVRocks

func ValidateKVRocks(instance *kvrocksv1alpha1.KVRocks, log logr.Logger) (bool, *string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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