1 /* 2 Copyright 2017 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 // This file should be consistent with pkg/apis/core/annotation_key_constants.go. 18 19 package v1 20 21 const ( 22 // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy 23 // webhook backend fails. 24 ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open" 25 26 // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods 27 MirrorPodAnnotationKey string = "kubernetes.io/config.mirror" 28 29 // TolerationsAnnotationKey represents the key of tolerations data (json serialized) 30 // in the Annotations of a Pod. 31 TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations" 32 33 // TaintsAnnotationKey represents the key of taints data (json serialized) 34 // in the Annotations of a Node. 35 TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints" 36 37 // SeccompPodAnnotationKey represents the key of a seccomp profile applied 38 // to all containers of a pod. 39 // Deprecated: set a pod security context `seccompProfile` field. 40 SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod" 41 42 // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied 43 // to one container of a pod. 44 // Deprecated: set a container security context `seccompProfile` field. 45 SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" 46 47 // SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime. 48 // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. 49 SeccompProfileRuntimeDefault string = "runtime/default" 50 51 // SeccompProfileNameUnconfined is the unconfined seccomp profile. 52 SeccompProfileNameUnconfined string = "unconfined" 53 54 // SeccompLocalhostProfileNamePrefix is the prefix for specifying profiles loaded from the node's disk. 55 SeccompLocalhostProfileNamePrefix = "localhost/" 56 57 // DeprecatedAppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. 58 // Deprecated: use a pod or container security context `appArmorProfile` field instead. 59 DeprecatedAppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" 60 61 // DeprecatedAppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. 62 DeprecatedAppArmorBetaProfileRuntimeDefault = "runtime/default" 63 64 // DeprecatedAppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. 65 DeprecatedAppArmorBetaProfileNamePrefix = "localhost/" 66 67 // DeprecatedAppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile 68 DeprecatedAppArmorBetaProfileNameUnconfined = "unconfined" 69 70 // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. 71 // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. 72 DeprecatedSeccompProfileDockerDefault string = "docker/default" 73 74 // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) 75 // in the Annotations of a Node. 76 PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods" 77 78 // ObjectTTLAnnotationKey represents a suggestion for kubelet for how long it can cache 79 // an object (e.g. secret, config map) before fetching it again from apiserver. 80 // This annotation can be attached to node. 81 ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" 82 83 // annotation key prefix used to identify non-convertible json paths. 84 NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" 85 86 kubectlPrefix = "kubectl.kubernetes.io/" 87 88 // LastAppliedConfigAnnotation is the annotation used to store the previous 89 // configuration of a resource for use in a three way diff by UpdateApplyAnnotation. 90 LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration" 91 92 // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers 93 // 94 // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to 95 // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow 96 // access only from the CIDRs currently allocated to MIT & the USPS. 97 // 98 // Not all cloud providers support this annotation, though AWS & GCE do. 99 AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" 100 101 // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that 102 // represents the timestamp (stored as RFC 3339 date-time string, e.g. '2018-10-22T19:32:52.1Z') 103 // of the last change, of some Pod or Service object, that triggered the endpoints object change. 104 // In other words, if a Pod / Service changed at time T0, that change was observed by endpoints 105 // controller at T1, and the Endpoints object was changed at T2, the 106 // EndpointsLastChangeTriggerTime would be set to T0. 107 // 108 // The "endpoints change trigger" here means any Pod or Service change that resulted in the 109 // Endpoints object change. 110 // 111 // Given the definition of the "endpoints change trigger", please note that this annotation will 112 // be set ONLY for endpoints object changes triggered by either Pod or Service change. If the 113 // Endpoints object changes due to other reasons, this annotation won't be set (or updated if it's 114 // already set). 115 // 116 // This annotation will be used to compute the in-cluster network programming latency SLI, see 117 // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md 118 EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time" 119 120 // EndpointsOverCapacity will be set on an Endpoints resource when it 121 // exceeds the maximum capacity of 1000 addresses. Initially the Endpoints 122 // controller will set this annotation with a value of "warning". In a 123 // future release, the controller may set this annotation with a value of 124 // "truncated" to indicate that any addresses exceeding the limit of 1000 125 // have been truncated from the Endpoints resource. 126 EndpointsOverCapacity = "endpoints.kubernetes.io/over-capacity" 127 128 // MigratedPluginsAnnotationKey is the annotation key, set for CSINode objects, that is a comma-separated 129 // list of in-tree plugins that will be serviced by the CSI backend on the Node represented by CSINode. 130 // This annotation is used by the Attach Detach Controller to determine whether to use the in-tree or 131 // CSI Backend for a volume plugin on a specific node. 132 MigratedPluginsAnnotationKey = "storage.alpha.kubernetes.io/migrated-plugins" 133 134 // PodDeletionCost can be used to set to an int32 that represent the cost of deleting 135 // a pod compared to other pods belonging to the same ReplicaSet. Pods with lower 136 // deletion cost are preferred to be deleted before pods with higher deletion cost. 137 // Note that this is honored on a best-effort basis, and so it does not offer guarantees on 138 // pod deletion order. 139 // The implicit deletion cost for pods that don't set the annotation is 0, negative values are permitted. 140 // 141 // This annotation is beta-level and is only honored when PodDeletionCost feature is enabled. 142 PodDeletionCost = "controller.kubernetes.io/pod-deletion-cost" 143 144 // DeprecatedAnnotationTopologyAwareHints can be used to enable or disable 145 // Topology Aware Hints for a Service. This may be set to "Auto" or 146 // "Disabled". Any other value is treated as "Disabled". This annotation has 147 // been deprecated in favor of the "service.kubernetes.io/topology-mode" 148 // annotation. 149 DeprecatedAnnotationTopologyAwareHints = "service.kubernetes.io/topology-aware-hints" 150 151 // AnnotationTopologyMode can be used to enable or disable Topology Aware 152 // Routing for a Service. Well known values are "Auto" and "Disabled". 153 // Implementations may choose to develop new topology approaches, exposing 154 // them with domain-prefixed values. For example, "example.com/lowest-rtt" 155 // could be a valid implementation-specific value for this annotation. These 156 // heuristics will often populate topology hints on EndpointSlices, but that 157 // is not a requirement. 158 AnnotationTopologyMode = "service.kubernetes.io/topology-mode" 159 ) 160