1 /* 2 Copyright 2019 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1 18 19 const ( 20 LabelHostname = "kubernetes.io/hostname" 21 22 // Label value is the network location of kube-apiserver stored as <ip:port> 23 // Stored in APIServer Identity lease objects to view what address is used for peer proxy 24 AnnotationPeerAdvertiseAddress = "kubernetes.io/peer-advertise-address" 25 26 LabelTopologyZone = "topology.kubernetes.io/zone" 27 LabelTopologyRegion = "topology.kubernetes.io/region" 28 29 // These label have been deprecated since 1.17, but will be supported for 30 // the foreseeable future, to accommodate things like long-lived PVs that 31 // use them. New users should prefer the "topology.kubernetes.io/*" 32 // equivalents. 33 LabelFailureDomainBetaZone = "failure-domain.beta.kubernetes.io/zone" // deprecated 34 LabelFailureDomainBetaRegion = "failure-domain.beta.kubernetes.io/region" // deprecated 35 36 // Retained for compat when vendored. Do not use these consts in new code. 37 LabelZoneFailureDomain = LabelFailureDomainBetaZone // deprecated 38 LabelZoneRegion = LabelFailureDomainBetaRegion // deprecated 39 LabelZoneFailureDomainStable = LabelTopologyZone // deprecated 40 LabelZoneRegionStable = LabelTopologyRegion // deprecated 41 42 LabelInstanceType = "beta.kubernetes.io/instance-type" 43 LabelInstanceTypeStable = "node.kubernetes.io/instance-type" 44 45 LabelOSStable = "kubernetes.io/os" 46 LabelArchStable = "kubernetes.io/arch" 47 48 // LabelWindowsBuild is used on Windows nodes to specify the Windows build number starting with v1.17.0. 49 // It's in the format MajorVersion.MinorVersion.BuildNumber (for ex: 10.0.17763) 50 LabelWindowsBuild = "node.kubernetes.io/windows-build" 51 52 // LabelNamespaceSuffixKubelet is an allowed label namespace suffix kubelets can self-set ([*.]kubelet.kubernetes.io/*) 53 LabelNamespaceSuffixKubelet = "kubelet.kubernetes.io" 54 // LabelNamespaceSuffixNode is an allowed label namespace suffix kubelets can self-set ([*.]node.kubernetes.io/*) 55 LabelNamespaceSuffixNode = "node.kubernetes.io" 56 57 // LabelNamespaceNodeRestriction is a forbidden label namespace that kubelets may not self-set when the NodeRestriction admission plugin is enabled 58 LabelNamespaceNodeRestriction = "node-restriction.kubernetes.io" 59 60 // IsHeadlessService is added by Controller to an Endpoint denoting if its parent 61 // Service is Headless. The existence of this label can be used further by other 62 // controllers and kube-proxy to check if the Endpoint objects should be replicated when 63 // using Headless Services 64 IsHeadlessService = "service.kubernetes.io/headless" 65 66 // LabelNodeExcludeBalancers specifies that the node should not be considered as a target 67 // for external load-balancers which use nodes as a second hop (e.g. many cloud LBs which only 68 // understand nodes). For services that use externalTrafficPolicy=Local, this may mean that 69 // any backends on excluded nodes are not reachable by those external load-balancers. 70 // Implementations of this exclusion may vary based on provider. 71 LabelNodeExcludeBalancers = "node.kubernetes.io/exclude-from-external-load-balancers" 72 // LabelMetadataName is the label name which, in-tree, is used to automatically label namespaces, so they can be selected easily by tools which require definitive labels 73 LabelMetadataName = "kubernetes.io/metadata.name" 74 ) 75