1/*
2Copyright 2015 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17package v1
18
19const (
20	// If you add a new topology domain here, also consider adding it to the set of default values
21	// for the scheduler's --failure-domain command-line argument.
22	LabelHostname          = "kubernetes.io/hostname"
23	LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone"
24	LabelZoneRegion        = "failure-domain.beta.kubernetes.io/region"
25
26	LabelInstanceType = "beta.kubernetes.io/instance-type"
27
28	LabelOS   = "beta.kubernetes.io/os"
29	LabelArch = "beta.kubernetes.io/arch"
30
31	// Historically fluentd was a manifest pod the was migrated to DaemonSet.
32	// To avoid situation during cluster upgrade when there are two instances
33	// of fluentd running on a node, kubelet need to mark node on which
34	// fluentd in not running as a manifest pod with LabelFluentdDsReady.
35	LabelFluentdDsReady = "alpha.kubernetes.io/fluentd-ds-ready"
36
37	// When feature-gate for TaintBasedEvictions=true flag is enabled,
38	// TaintNodeNotReady would be automatically added by node controller
39	// when node is not ready, and removed when node becomes ready.
40	TaintNodeNotReady = "node.alpha.kubernetes.io/notReady"
41
42	// When feature-gate for TaintBasedEvictions=true flag is enabled,
43	// TaintNodeUnreachable would be automatically added by node controller
44	// when node becomes unreachable (corresponding to NodeReady status ConditionUnknown)
45	// and removed when node becomes reachable (NodeReady status ConditionTrue).
46	TaintNodeUnreachable = "node.alpha.kubernetes.io/unreachable"
47)
48
49// Role labels are applied to Nodes to mark their purpose.  In particular, we
50// usually want to distinguish the master, so that we can isolate privileged
51// pods and operations.
52//
53// Originally we relied on not registering the master, on the fact that the
54// master was Unschedulable, and on static manifests for master components.
55// But we now do register masters in many environments, are generally moving
56// away from static manifests (for better manageability), and working towards
57// deprecating the unschedulable field (replacing it with taints & tolerations
58// instead).
59//
60// Even with tainting, a label remains the easiest way of making a positive
61// selection, so that pods can schedule only to master nodes for example, and
62// thus installations will likely define a label for their master nodes.
63//
64// So that we can recognize master nodes in consequent places though (such as
65// kubectl get nodes), we encourage installations to use the well-known labels.
66// We define NodeLabelRole, which is the preferred form, but we will also recognize
67// other forms that are known to be in widespread use (NodeLabelKubeadmAlphaRole).
68
69const (
70	// NodeLabelRole is the preferred label applied to a Node as a hint that it has a particular purpose (defined by the value).
71	NodeLabelRole = "kubernetes.io/role"
72
73	// NodeLabelKubeadmAlphaRole is a label that kubeadm applies to a Node as a hint that it has a particular purpose.
74	// Use of NodeLabelRole is preferred.
75	NodeLabelKubeadmAlphaRole = "kubeadm.alpha.kubernetes.io/role"
76
77	// NodeLabelRoleMaster is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a master node.
78	// A master node typically runs kubernetes system components and will not typically run user workloads.
79	NodeLabelRoleMaster = "master"
80
81	// NodeLabelRoleNode is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a "normal" node,
82	// as opposed to a RoleMaster node.
83	NodeLabelRoleNode = "node"
84)
85