Documentation ¶
Index ¶
- Constants
- type Label
- func (l Label) Component(name string) Label
- func (l Label) ComponentType() string
- func (l Label) Instance(name string) Label
- func (l Label) IsPD() bool
- func (l Label) IsTiDB() bool
- func (l Label) IsTiKV() bool
- func (l Label) LabelSelector() *metav1.LabelSelector
- func (l Label) Labels() map[string]string
- func (l Label) Namespace(name string) Label
- func (l Label) PD() Label
- func (l Label) Selector() (labels.Selector, error)
- func (l Label) TiDB() Label
- func (l Label) TiKV() Label
Constants ¶
View Source
const ( // ManagedByLabelKey is Kubernetes recommended label key, it represents the tool being used to manage the operation of an application // For resources managed by TiDB Operator, its value is always tidb-operator ManagedByLabelKey string = "app.kubernetes.io/managed-by" // ComponentLabelKey is Kubernetes recommended label key, it represents the component within the architecture ComponentLabelKey string = "app.kubernetes.io/component" // NameLabelKey is Kubernetes recommended label key, it represents the name of the application // It should always be tidb-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 set by helm when installing a release InstanceLabelKey string = "app.kubernetes.io/instance" // NamespaceLabelKey is label key used in PV for easy querying NamespaceLabelKey string = "app.kubernetes.io/namespace" // ClusterIDLabelKey is cluster id label key ClusterIDLabelKey string = "tidb.pingcap.com/cluster-id" // StoreIDLabelKey is store id label key StoreIDLabelKey string = "tidb.pingcap.com/store-id" // MemberIDLabelKey is member id label key MemberIDLabelKey string = "tidb.pingcap.com/member-id" // AnnPodNameKey is pod name annotation key used in PV/PVC for synchronizing tidb cluster meta info AnnPodNameKey string = "tidb.pingcap.com/pod-name" // AnnPVCDeferDeleting is pvc defer deletion annotation key used in PVC for defer deleting PVC AnnPVCDeferDeleting = "tidb.pingcap.com/pvc-defer-deleting" // Bootstrapping is bootstrapping key Bootstrapping string = "bootstrapping" // Replicas is replicas key Replicas string = "replicas" // PDLabelVal is PD label value PDLabelVal string = "pd" // TiDBLabelVal is TiDB label value TiDBLabelVal string = "tidb" // TiKVLabelVal is TiKV label value TiKVLabelVal string = "tikv" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Label ¶
Label is the label field in metadata
func (Label) ComponentType ¶ added in v0.2.0
ComponentType returns component type
func (Label) LabelSelector ¶
func (l Label) LabelSelector() *metav1.LabelSelector
LabelSelector gets LabelSelector from label
Click to show internal directories.
Click to hide internal directories.