Documentation ¶
Index ¶
- Constants
- type Label
- func (l Label) Component(name string) Label
- func (l Label) ComponentType() string
- func (l Label) Discovery() Label
- func (l Label) Instance(name string) Label
- func (l Label) IsManagedByTiKVOperator() bool
- func (l Label) IsPD() 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) String() string
- 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 tikv-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 tikv-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 = "tikv.org/cluster-id" // StoreIDLabelKey is TiKV store id label key StoreIDLabelKey string = "tikv.org/store-id" // MemberIDLabelKey is member id label key MemberIDLabelKey string = "tikv.org/member-id" // AnnForceUpgradeKey is tc annotation key to indicate whether force upgrade should be done AnnForceUpgradeKey = "tikv.org/force-upgrade" // AnnPDDeferDeleting is pd pod annotation key in pod for defer for deleting pod AnnPDDeferDeleting = "tikv.org/pd-defer-deleting" // AnnEvictLeaderBeginTime is pod annotation key to indicate the begin time for evicting region leader AnnEvictLeaderBeginTime = "tikv.org/evictLeaderBeginTime" // AnnPodDeferDeleting is pod annotation key to indicate the pod which need to be restarted AnnPodDeferDeleting = "tikv.org/pod-defer-deleting" // AnnPodNameKey is pod name annotation key used in PV/PVC for synchronizing tidb cluster meta info AnnPodNameKey string = "tikv.org/pod-name" // AnnPVCDeferDeleting is pvc defer deletion annotation key used in PVC for defer deleting PVC AnnPVCDeferDeleting = "tikv.org/pvc-defer-deleting" // AnnPVCPodScheduling is pod scheduling annotation key, it represents whether the pod is scheduling AnnPVCPodScheduling = "tikv.org/pod-scheduling" // AnnPDDeleteSlots is annotation key of pd delete slots. AnnPDDeleteSlots = "pd.tikv.org/delete-slots" // TiKVDeleteSlots is annotation key of tikv delete slots. AnnTiKVDeleteSlots = "tikv.tikv.org/delete-slots" // AnnSysctlInit is pod annotation key to indicate whether configuring sysctls with init container AnnSysctlInit = "tikv.org/sysctl-init" // AnnSysctlInitVal is pod annotation value to indicate whether configuring sysctls with init container AnnSysctlInitVal = "true" // AnnForceUpgradeVal is tc annotation value to indicate whether force upgrade should be done AnnForceUpgradeVal = "true" // PDLabelVal is PD label value PDLabelVal string = "pd" // TiKVLabelVal is TiKV label value TiKVLabelVal string = "tikv" // DiscoveryLabelVal is Discovery label value DiscoveryLabelVal string = "discovery" // TiKVOperator is ManagedByLabelKey label value TiKVOperator string = "tikv-operator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Label ¶
Label is the label field in metadata
func (Label) ComponentType ¶
ComponentType returns component type
func (Label) IsManagedByTiKVOperator ¶
IsManagedByTiKVOperator returns whether label is a Managed by tikv-operator
func (Label) LabelSelector ¶
func (l Label) LabelSelector() *metav1.LabelSelector
LabelSelector gets LabelSelector from label
Click to show internal directories.
Click to hide internal directories.