label

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClusterLabelKey is cluster label key
	ClusterLabelKey string = "cluster.pingcap.com/tidbCluster"
	// NamespaceLabelKey is cluster label key
	NamespaceLabelKey string = "cluster.pingcap.com/namespace"
	// AppLabelKey is app label key
	AppLabelKey string = "cluster.pingcap.com/app"
	// OwnerLabelKey is owner label key
	OwnerLabelKey string = "cluster.pingcap.com/owner"
	// ClusterIDLabelKey is cluster id label key
	ClusterIDLabelKey string = "cluster.pingcap.com/clusterId"
	// StoreIDLabelKey is store id label key
	StoreIDLabelKey string = "cluster.pingcap.com/storeId"
	// MemberIDLabelKey is member id label key
	MemberIDLabelKey string = "cluster.pingcap.com/memberId"
	// AnnPodNameKey is podName annotations key
	AnnPodNameKey string = "volume.pingcap.com/podName"
	// AnnPVCDeferDeleting is pvc defer deletion key
	AnnPVCDeferDeleting = "cluster.pingcap.com/pvc-defer-deleting"
	// AnnPaused is the annotation that the object is paused
	AnnPaused string = "cluster.pingcap.com/paused"
	// PDLabelVal is PD label value
	PDLabelVal string = "pd"
	// TiDBLabelVal is TiDB label value
	TiDBLabelVal string = "tidb"
	// TiKVLabelVal is TiKV label value
	TiKVLabelVal string = "tikv"
	// MonitorLabelVal is Monitor label value
	MonitorLabelVal string = "monitor"
	// ClusterLabelVal is cluster label value
	ClusterLabelVal string = "tidbCluster"
)

Variables

This section is empty.

Functions

func ClusterListOptions

func ClusterListOptions(clusterName string) metav1.ListOptions

ClusterListOptions returns a cluster ListOptions filter

Types

type Label

type Label map[string]string

Label is the label field in metadata

func New

func New() Label

New initialize a new Label

func (Label) App

func (l Label) App(name string) Label

App adds app kv pair to label

func (Label) AppType

func (l Label) AppType() string

AppType returns app type

func (Label) Cluster

func (l Label) Cluster(name string) Label

Cluster adds cluster kv pair to label

func (Label) IsMonitor

func (l Label) IsMonitor() bool

IsMonitor returns whether label is a Monitor

func (Label) IsPD

func (l Label) IsPD() bool

IsPD returns whether label is a PD

func (Label) IsTiDB

func (l Label) IsTiDB() bool

IsTiDB returns whether label is a TiDB

func (Label) IsTiKV

func (l Label) IsTiKV() bool

IsTiKV returns whether label is a TiKV

func (Label) LabelSelector

func (l Label) LabelSelector() *metav1.LabelSelector

LabelSelector gets LabelSelector from label

func (Label) Labels

func (l Label) Labels() map[string]string

Labels converts label to map[string]string

func (Label) Monitor

func (l Label) Monitor() Label

Monitor assigns monitor to app key in label

func (Label) Namespace

func (l Label) Namespace(name string) Label

Namespace adds namespace kv pair to label

func (Label) PD

func (l Label) PD() Label

PD assigns pd to app key in label

func (Label) Selector

func (l Label) Selector() (labels.Selector, error)

Selector gets labels.Selector from label

func (Label) TiDB

func (l Label) TiDB() Label

TiDB assigns tidb to app key in label

func (Label) TiKV

func (l Label) TiKV() Label

TiKV assigns tikv to app key in label

Jump to

Keyboard shortcuts

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