Keep annotation_key_constants consistent
This commit is contained in:
parent
1e6061b9ec
commit
a82676a126
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// This file should be consistent with pkg/api/v1/annotation_key_constants.go.
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -14,9 +14,22 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// This file should be consistent with pkg/api/annotation_key_constants.go.
|
||||||
|
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
const (
|
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
|
// SeccompPodAnnotationKey represents the key of a seccomp profile applied
|
||||||
// to all containers of a pod.
|
// to all containers of a pod.
|
||||||
SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
|
SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
|
||||||
@ -56,4 +69,7 @@ const (
|
|||||||
// in the Annotations of a Pod.
|
// in the Annotations of a Pod.
|
||||||
// TODO: remove when alpha support for affinity is removed
|
// TODO: remove when alpha support for affinity is removed
|
||||||
AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
|
AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
|
||||||
|
|
||||||
|
// annotation key prefix used to identify non-convertible json paths.
|
||||||
|
NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
|
||||||
)
|
)
|
||||||
|
@ -301,7 +301,7 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re
|
|||||||
if out.Annotations == nil {
|
if out.Annotations == nil {
|
||||||
out.Annotations = make(map[string]string)
|
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 {
|
if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ConfigSourceAnnotationKey = "kubernetes.io/config.source"
|
ConfigSourceAnnotationKey = "kubernetes.io/config.source"
|
||||||
ConfigMirrorAnnotationKey = kubeapi.MirrorPodAnnotationKey
|
ConfigMirrorAnnotationKey = v1.MirrorPodAnnotationKey
|
||||||
ConfigFirstSeenAnnotationKey = "kubernetes.io/config.seen"
|
ConfigFirstSeenAnnotationKey = "kubernetes.io/config.seen"
|
||||||
ConfigHashAnnotationKey = "kubernetes.io/config.hash"
|
ConfigHashAnnotationKey = "kubernetes.io/config.hash"
|
||||||
CriticalPodAnnotationKey = "scheduler.alpha.kubernetes.io/critical-pod"
|
CriticalPodAnnotationKey = "scheduler.alpha.kubernetes.io/critical-pod"
|
||||||
|
Loading…
Reference in New Issue
Block a user