Documentation ¶
Index ¶
- Constants
- func ClusterListOptions(instanceName string) metav1.ListOptions
- type Label
- func (l Label) ClusterMode(mode string) Label
- func (l Label) ClusterModeType() string
- func (l Label) Component(name string) Label
- func (l Label) ComponentType() string
- func (l Label) GetGroup() string
- func (l Label) Group(groupID string) Label
- func (l Label) Instance(name string) Label
- func (l Label) IsMaster() bool
- func (l Label) IsSentinel() bool
- func (l Label) IsSlave() bool
- func (l Label) LabelSelector() *metav1.LabelSelector
- func (l Label) Labels() map[string]string
- func (l Label) Master() Label
- func (l Label) Namespace(name string) Label
- func (l Label) Redis() Label
- func (l Label) RedisClusterMode() Label
- func (l Label) ReplicaMode() Label
- func (l Label) Selector() (labels.Selector, error)
- func (l Label) Sentinel() Label
- func (l Label) Slave() Label
Constants ¶
View Source
const ( // NameLabelKey is Kubernetes recommended label key, it represents the name of the application // It should always be redis-cluster in our case. NameLabelKey string = "app.kubernetes.io/name" // InstanceLabelKey is Kubernetes recommended label key, it represents a unique name identifying the instance of an application // It's the cluster name in our case InstanceLabelKey string = "app.kubernetes.io/instance" // ComponentLabelKey is Kubernetes recommended label key, it represents the component within the architecture ComponentLabelKey string = "app.kubernetes.io/component" // ManagedByLabelKey is Kubernetes recommended label key, it represents the tool being used to manage the operation of an application // For resources managed by Redis Operator, its value is always redis-operator ManagedByLabelKey string = "app.kubernetes.io/managed-by" // NamespaceLabelKey is label key used in PV for easy querying NamespaceLabelKey string = "app.kubernetes.io/namespace" // AnnPodNameKey is pod name annotation key used in PV/PVC for synchronizing redis cluster meta info AnnPodNameKey string = "anywhy.github.io/pod-name" // ClusterGroupIDLabelKey is pod name annotation key used for redis cluster group synchronizing redis cluster meta info ClusterGroupIDLabelKey string = "anywhy.github.io/cluster-group-id" // ClusterModeLabelKey is redis cluster mode ClusterModeLabelKey string = "anywhy.github.io/cluster-mode" // ClusterNodeRoleLabelKey is redis node role ClusterNodeRoleLabelKey string = "anywhy.github.io/node-role" // MasterNodeLabelKey redis master role label key MasterNodeLabelKey string = "master" // SlaveNodeLabelKey redis slave role label key SlaveNodeLabelKey string = "slave" // RedisLabelKey redis component label key RedisLabelKey string = "redis" // SentinelLabelKey redis sentinel component label key SentinelLabelKey string = "sentinel" // ReplicaClusterLabelKey means that redis cluster is master/slave ReplicaClusterLabelKey string = "replica" // RedisClusterLabelKey means redis cluster is shard mode RedisClusterLabelKey string = "cluster" )
Variables ¶
This section is empty.
Functions ¶
func ClusterListOptions ¶
func ClusterListOptions(instanceName string) metav1.ListOptions
ClusterListOptions returns a cluster ListOptions filter
Types ¶
type Label ¶
Label is the label field in metadatas
func (Label) ClusterMode ¶
ClusterMode add redis mode kv pair to label
func (Label) ClusterModeType ¶
ClusterModeType return cluster mode
func (Label) ComponentType ¶
ComponentType returns component type
func (Label) LabelSelector ¶
func (l Label) LabelSelector() *metav1.LabelSelector
LabelSelector gets LabelSelector from label
func (Label) RedisClusterMode ¶
RedisClusterMode redis cluster
Click to show internal directories.
Click to hide internal directories.