annotation_key_constants.go 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. Copyright 2017 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file should be consistent with pkg/api/v1/annotation_key_constants.go.
  14. package core
  15. const (
  16. // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy
  17. // webhook backend fails.
  18. ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open"
  19. // PodPresetOptOutAnnotationKey represents the annotation key for a pod to exempt itself from pod preset manipulation
  20. PodPresetOptOutAnnotationKey string = "podpreset.admission.kubernetes.io/exclude"
  21. // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods
  22. MirrorPodAnnotationKey string = "kubernetes.io/config.mirror"
  23. // TolerationsAnnotationKey represents the key of tolerations data (json serialized)
  24. // in the Annotations of a Pod.
  25. TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations"
  26. // TaintsAnnotationKey represents the key of taints data (json serialized)
  27. // in the Annotations of a Node.
  28. TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints"
  29. // SeccompPodAnnotationKey represents the key of a seccomp profile applied
  30. // to all containers of a pod.
  31. SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
  32. // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
  33. // to one container of a pod.
  34. SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
  35. // SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime.
  36. SeccompProfileRuntimeDefault string = "runtime/default"
  37. // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker.
  38. // This is now deprecated and should be replaced by SeccompProfileRuntimeDefault.
  39. DeprecatedSeccompProfileDockerDefault string = "docker/default"
  40. // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
  41. // in the Annotations of a Node.
  42. PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
  43. // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache
  44. // an object (e.g. secret, config map) before fetching it again from apiserver.
  45. // This annotation can be attached to node.
  46. ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
  47. // BootstrapCheckpointAnnotationKey represents a Resource (Pod) that should be checkpointed by
  48. // the kubelet prior to running
  49. BootstrapCheckpointAnnotationKey string = "node.kubernetes.io/bootstrap-checkpoint"
  50. // annotation key prefix used to identify non-convertible json paths.
  51. NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
  52. kubectlPrefix = "kubectl.kubernetes.io/"
  53. // LastAppliedConfigAnnotation is the annotation used to store the previous
  54. // configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
  55. LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration"
  56. // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
  57. //
  58. // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to
  59. // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow
  60. // access only from the CIDRs currently allocated to MIT & the USPS.
  61. //
  62. // Not all cloud providers support this annotation, though AWS & GCE do.
  63. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
  64. // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that
  65. // represents the timestamp (stored as RFC 3339 date-time string, e.g. '2018-10-22T19:32:52.1Z')
  66. // of the last change, of some Pod or Service object, that triggered the endpoints object change.
  67. // In other words, if a Pod / Service changed at time T0, that change was observed by endpoints
  68. // controller at T1, and the Endpoints object was changed at T2, the
  69. // EndpointsLastChangeTriggerTime would be set to T0.
  70. //
  71. // The "endpoints change trigger" here means any Pod or Service change that resulted in the
  72. // Endpoints object change.
  73. //
  74. // Given the definition of the "endpoints change trigger", please note that this annotation will
  75. // be set ONLY for endpoints object changes triggered by either Pod or Service change. If the
  76. // Endpoints object changes due to other reasons, this annotation won't be set (or updated if it's
  77. // already set).
  78. //
  79. // This annotation will be used to compute the in-cluster network programming latency SLI, see
  80. // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md
  81. EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time"
  82. // MigratedPluginsAnnotationKey is the annotation key, set for CSINode objects, that is a comma-separated
  83. // list of in-tree plugins that will be serviced by the CSI backend on the Node represented by CSINode.
  84. // This annotation is used by the Attach Detach Controller to determine whether to use the in-tree or
  85. // CSI Backend for a volume plugin on a specific node.
  86. MigratedPluginsAnnotationKey = "storage.alpha.kubernetes.io/migrated-plugins"
  87. )