diff --git a/pkg/api/annotation_key_constants.go b/pkg/api/annotation_key_constants.go index e63417fcd88..b77f3172340 100644 --- a/pkg/api/annotation_key_constants.go +++ b/pkg/api/annotation_key_constants.go @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// This file should be consistent with pkg/api/v1/annotation_key_constants.go. + package api const ( diff --git a/pkg/api/v1/annotation_key_constants.go b/pkg/api/v1/annotation_key_constants.go index c977a26400b..ffd4b8b2ada 100644 --- a/pkg/api/v1/annotation_key_constants.go +++ b/pkg/api/v1/annotation_key_constants.go @@ -14,9 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. */ +// This file should be consistent with pkg/api/annotation_key_constants.go. + package v1 const ( + // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods + MirrorPodAnnotationKey string = "kubernetes.io/config.mirror" + + // TolerationsAnnotationKey represents the key of tolerations data (json serialized) + // in the Annotations of a Pod. + TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations" + + // TaintsAnnotationKey represents the key of taints data (json serialized) + // in the Annotations of a Node. + TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints" + // SeccompPodAnnotationKey represents the key of a seccomp profile applied // to all containers of a pod. SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod" @@ -56,4 +69,7 @@ const ( // in the Annotations of a Pod. // TODO: remove when alpha support for affinity is removed AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity" + + // annotation key prefix used to identify non-convertible json paths. + NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" ) diff --git a/pkg/api/v1/conversion.go b/pkg/api/v1/conversion.go index f3670b5f83e..6295337416c 100644 --- a/pkg/api/v1/conversion.go +++ b/pkg/api/v1/conversion.go @@ -301,7 +301,7 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re if out.Annotations == nil { out.Annotations = make(map[string]string) } - out.Annotations[api.NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() + out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() } if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil { return err diff --git a/pkg/kubelet/types/pod_update.go b/pkg/kubelet/types/pod_update.go index a5b4de85f88..2c2dbb8a071 100644 --- a/pkg/kubelet/types/pod_update.go +++ b/pkg/kubelet/types/pod_update.go @@ -26,7 +26,7 @@ import ( const ( ConfigSourceAnnotationKey = "kubernetes.io/config.source" - ConfigMirrorAnnotationKey = kubeapi.MirrorPodAnnotationKey + ConfigMirrorAnnotationKey = v1.MirrorPodAnnotationKey ConfigFirstSeenAnnotationKey = "kubernetes.io/config.seen" ConfigHashAnnotationKey = "kubernetes.io/config.hash" CriticalPodAnnotationKey = "scheduler.alpha.kubernetes.io/critical-pod"