Documentation ¶
Index ¶
- Constants
- Variables
- func DeploymentLabels(name string) map[string]string
- func GetClusterName(systenId, name string) string
- func GetDeploymentName(name string, index ...int) string
- func GetPVCOrPodIndex(podName string) (int, error)
- func GetSentinelInstance(instance *kvrocksv1alpha1.KVRocks) *kvrocksv1alpha1.KVRocks
- func GetSentinelName(system string) string
- func GetStatefulSetName(name string, index ...int) string
- func MergeLabels(allLabels ...map[string]string) map[string]string
- func MonitorLabels(sentinel string) map[string]string
- func NewClusterStatefulSet(instance *kvrocksv1alpha1.KVRocks, index int) *kruise.StatefulSet
- func NewExporterContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container
- func NewInstanceContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container
- func NewKVRocksConfigMap(instance *kvrocksv1alpha1.KVRocks) *corev1.ConfigMap
- func NewKVRocksService(instance *kvrocksv1alpha1.KVRocks) *corev1.Service
- func NewReplicationStatefulSet(instance *kvrocksv1alpha1.KVRocks) *kruise.StatefulSet
- func NewSentinelConfigMap(instance *kvrocksv1alpha1.KVRocks) *corev1.ConfigMap
- func NewSentinelContainer(instance *kvrocksv1alpha1.KVRocks) *corev1.Container
- func NewSentinelDeployment(instance *kvrocksv1alpha1.KVRocks) *appsv1.Deployment
- func NewSentinelService(instance *kvrocksv1alpha1.KVRocks) *corev1.Service
- func NewSentinelStatefulSet(instance *kvrocksv1alpha1.KVRocks) *kruise.StatefulSet
- func NewStatefulSet(instance *kvrocksv1alpha1.KVRocks, name string) *kruise.StatefulSet
- func ParseKVRocksConfigs(config map[string]string) map[string]string
- func ParseRedisName(name string) (string, string)
- func SelectorLabels(instance *kvrocksv1alpha1.KVRocks) map[string]string
- func SentinelLabels() map[string]string
- func SetClusterNodeId() string
- func StatefulSetLabels(name string) map[string]string
- func ValidateKVRocks(instance *kvrocksv1alpha1.KVRocks, log logr.Logger) (bool, *string)
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 GetClusterName ¶
func GetDeploymentName ¶
func GetPVCOrPodIndex ¶
func GetSentinelInstance ¶
func GetSentinelInstance(instance *kvrocksv1alpha1.KVRocks) *kvrocksv1alpha1.KVRocks
func GetSentinelName ¶
func GetStatefulSetName ¶
func MonitorLabels ¶
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 ParseRedisName ¶
func SelectorLabels ¶
func SelectorLabels(instance *kvrocksv1alpha1.KVRocks) map[string]string
func SentinelLabels ¶
func SetClusterNodeId ¶
func SetClusterNodeId() string
func StatefulSetLabels ¶
func ValidateKVRocks ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.