mirror of https://github.com/k3s-io/k3s
74 lines
3.3 KiB
Go
74 lines
3.3 KiB
Go
/*
|
|
Copyright 2015 The Kubernetes Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package v1
|
|
|
|
const (
|
|
// If you add a new topology domain here, also consider adding it to the set of default values
|
|
// for the scheduler's --failure-domain command-line argument.
|
|
LabelHostname = "kubernetes.io/hostname"
|
|
LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone"
|
|
LabelZoneRegion = "failure-domain.beta.kubernetes.io/region"
|
|
|
|
LabelInstanceType = "beta.kubernetes.io/instance-type"
|
|
|
|
LabelOS = "beta.kubernetes.io/os"
|
|
LabelArch = "beta.kubernetes.io/arch"
|
|
|
|
// Historically fluentd was a manifest pod the was migrated to DaemonSet.
|
|
// To avoid situation during cluster upgrade when there are two instances
|
|
// of fluentd running on a node, kubelet need to mark node on which
|
|
// fluentd in not running as a manifest pod with LabelFluentdDsReady.
|
|
LabelFluentdDsReady = "alpha.kubernetes.io/fluentd-ds-ready"
|
|
)
|
|
|
|
// Role labels are applied to Nodes to mark their purpose. In particular, we
|
|
// usually want to distinguish the master, so that we can isolate privileged
|
|
// pods and operations.
|
|
//
|
|
// Originally we relied on not registering the master, on the fact that the
|
|
// master was Unschedulable, and on static manifests for master components.
|
|
// But we now do register masters in many environments, are generally moving
|
|
// away from static manifests (for better manageability), and working towards
|
|
// deprecating the unschedulable field (replacing it with taints & tolerations
|
|
// instead).
|
|
//
|
|
// Even with tainting, a label remains the easiest way of making a positive
|
|
// selection, so that pods can schedule only to master nodes for example, and
|
|
// thus installations will likely define a label for their master nodes.
|
|
//
|
|
// So that we can recognize master nodes in consequent places though (such as
|
|
// kubectl get nodes), we encourage installations to use the well-known labels.
|
|
// We define NodeLabelRole, which is the preferred form, but we will also recognize
|
|
// other forms that are known to be in widespread use (NodeLabelKubeadmAlphaRole).
|
|
|
|
const (
|
|
// NodeLabelRole is the preferred label applied to a Node as a hint that it has a particular purpose (defined by the value).
|
|
NodeLabelRole = "kubernetes.io/role"
|
|
|
|
// NodeLabelKubeadmAlphaRole is a label that kubeadm applies to a Node as a hint that it has a particular purpose.
|
|
// Use of NodeLabelRole is preferred.
|
|
NodeLabelKubeadmAlphaRole = "kubeadm.alpha.kubernetes.io/role"
|
|
|
|
// NodeLabelRoleMaster is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a master node.
|
|
// A master node typically runs kubernetes system components and will not typically run user workloads.
|
|
NodeLabelRoleMaster = "master"
|
|
|
|
// NodeLabelRoleNode is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a "normal" node,
|
|
// as opposed to a RoleMaster node.
|
|
NodeLabelRoleNode = "node"
|
|
)
|