From 5992425588dc9b370245d66fea2e46ff66982b2d Mon Sep 17 00:00:00 2001 From: Zihong Zheng Date: Tue, 16 May 2017 17:55:36 -0700 Subject: [PATCH] Autogenerated files --- hack/.linted_packages | 1 - pkg/api/BUILD | 1 - pkg/api/service/BUILD | 5 +- pkg/api/v1/service/BUILD | 5 +- pkg/api/validation/BUILD | 1 - pkg/controller/deployment/util/BUILD | 1 - pkg/kubectl/BUILD | 1 - pkg/kubectl/cmd/BUILD | 2 - pkg/kubectl/cmd/util/BUILD | 1 - pkg/printers/internalversion/BUILD | 1 - pkg/proxy/iptables/BUILD | 1 - .../pkg/api/annotation_key_constants.go | 33 +++++++++++++ .../pkg/api/v1/annotation_key_constants.go | 47 +++++++++++++++++++ .../k8s.io/client-go/pkg/api/v1/conversion.go | 2 +- test/e2e/BUILD | 1 - 15 files changed, 83 insertions(+), 20 deletions(-) diff --git a/hack/.linted_packages b/hack/.linted_packages index 3a2eb3c308c..a3b79bca88b 100644 --- a/hack/.linted_packages +++ b/hack/.linted_packages @@ -52,7 +52,6 @@ hack hack/boilerplate/test hack/cmd/teststale pkg/api -pkg/api/annotations pkg/api/errors pkg/api/events pkg/api/install diff --git a/pkg/api/BUILD b/pkg/api/BUILD index 90c18c9f5f1..c4ca2b63398 100644 --- a/pkg/api/BUILD +++ b/pkg/api/BUILD @@ -101,7 +101,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/api/annotations:all-srcs", "//pkg/api/endpoints:all-srcs", "//pkg/api/errors:all-srcs", "//pkg/api/events:all-srcs", diff --git a/pkg/api/service/BUILD b/pkg/api/service/BUILD index 6464ca1d21e..a514e373811 100644 --- a/pkg/api/service/BUILD +++ b/pkg/api/service/BUILD @@ -10,10 +10,7 @@ load( go_library( name = "go_default_library", - srcs = [ - "annotations.go", - "util.go", - ], + srcs = ["util.go"], tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", diff --git a/pkg/api/v1/service/BUILD b/pkg/api/v1/service/BUILD index 907da2e70da..2484d3394d5 100644 --- a/pkg/api/v1/service/BUILD +++ b/pkg/api/v1/service/BUILD @@ -10,10 +10,7 @@ load( go_library( name = "go_default_library", - srcs = [ - "annotations.go", - "util.go", - ], + srcs = ["util.go"], tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", diff --git a/pkg/api/validation/BUILD b/pkg/api/validation/BUILD index ffd4707ac6f..fbc56456b84 100644 --- a/pkg/api/validation/BUILD +++ b/pkg/api/validation/BUILD @@ -70,7 +70,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/helper:go_default_library", - "//pkg/api/service:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/api/v1:go_default_library", diff --git a/pkg/controller/deployment/util/BUILD b/pkg/controller/deployment/util/BUILD index cbbf6f72048..eb9bf868d7e 100644 --- a/pkg/controller/deployment/util/BUILD +++ b/pkg/controller/deployment/util/BUILD @@ -18,7 +18,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", diff --git a/pkg/kubectl/BUILD b/pkg/kubectl/BUILD index 38d5c5dd88c..afd5379b8ee 100644 --- a/pkg/kubectl/BUILD +++ b/pkg/kubectl/BUILD @@ -52,7 +52,6 @@ go_library( deps = [ "//federation/apis/federation/v1beta1:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/helper:go_default_library", "//pkg/api/util:go_default_library", "//pkg/api/v1:go_default_library", diff --git a/pkg/kubectl/cmd/BUILD b/pkg/kubectl/cmd/BUILD index 195c1c5d700..f832fd844c4 100644 --- a/pkg/kubectl/cmd/BUILD +++ b/pkg/kubectl/cmd/BUILD @@ -69,7 +69,6 @@ go_library( ], deps = [ "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/helper:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/api/v1/helper:go_default_library", @@ -197,7 +196,6 @@ go_test( ], deps = [ "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/ref:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", diff --git a/pkg/kubectl/cmd/util/BUILD b/pkg/kubectl/cmd/util/BUILD index f9d8a27f1d6..7faab90df31 100644 --- a/pkg/kubectl/cmd/util/BUILD +++ b/pkg/kubectl/cmd/util/BUILD @@ -27,7 +27,6 @@ go_library( "//federation/apis/federation:go_default_library", "//federation/client/clientset_generated/federation_internalclientset:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/service:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/apis/apps:go_default_library", diff --git a/pkg/printers/internalversion/BUILD b/pkg/printers/internalversion/BUILD index ec15e1c6ca7..cbd60408da5 100644 --- a/pkg/printers/internalversion/BUILD +++ b/pkg/printers/internalversion/BUILD @@ -60,7 +60,6 @@ go_library( "//federation/apis/federation:go_default_library", "//federation/client/clientset_generated/federation_internalclientset:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/events:go_default_library", "//pkg/api/helper:go_default_library", "//pkg/api/ref:go_default_library", diff --git a/pkg/proxy/iptables/BUILD b/pkg/proxy/iptables/BUILD index 4a2d71e594f..e041b7e091a 100644 --- a/pkg/proxy/iptables/BUILD +++ b/pkg/proxy/iptables/BUILD @@ -41,7 +41,6 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/service:go_default_library", "//pkg/proxy:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/iptables:go_default_library", diff --git a/staging/src/k8s.io/client-go/pkg/api/annotation_key_constants.go b/staging/src/k8s.io/client-go/pkg/api/annotation_key_constants.go index e63417fcd88..bfb42c8ba33 100644 --- a/staging/src/k8s.io/client-go/pkg/api/annotation_key_constants.go +++ b/staging/src/k8s.io/client-go/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 ( @@ -70,4 +72,35 @@ const ( // annotation key prefix used to identify non-convertible json paths. NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" + + kubectlPrefix = "kubectl.kubernetes.io/" + + // LastAppliedConfigAnnotation is the annotation used to store the previous + // configuration of a resource for use in a three way diff by UpdateApplyAnnotation. + LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration" + + // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers + // + // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to + // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow + // access only from the CIDRs currently allocated to MIT & the USPS. + // + // Not all cloud providers support this annotation, though AWS & GCE do. + AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" + + // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior. + AnnotationValueExternalTrafficLocal = "OnlyLocal" + // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior. + AnnotationValueExternalTrafficGlobal = "Global" + + // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8. + + // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service. + // If not specified, annotation is created by the service api backend with the allocated nodePort. + // Will use user-specified nodePort value if specified by the client. + BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport" + + // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route + // external traffic to local endpoints only. This preserves Source IP and avoids a second hop. + BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic" ) diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go b/staging/src/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go index c977a26400b..96bbdd57429 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/client-go/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,38 @@ 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" + + kubectlPrefix = "kubectl.kubernetes.io/" + + // LastAppliedConfigAnnotation is the annotation used to store the previous + // configuration of a resource for use in a three way diff by UpdateApplyAnnotation. + LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration" + + // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers + // + // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to + // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow + // access only from the CIDRs currently allocated to MIT & the USPS. + // + // Not all cloud providers support this annotation, though AWS & GCE do. + AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" + + // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior. + AnnotationValueExternalTrafficLocal = "OnlyLocal" + // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior. + AnnotationValueExternalTrafficGlobal = "Global" + + // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8. + + // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service. + // If not specified, annotation is created by the service api backend with the allocated nodePort. + // Will use user-specified nodePort value if specified by the client. + BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport" + + // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route + // external traffic to local endpoints only. This preserves Source IP and avoids a second hop. + BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic" ) diff --git a/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go b/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go index 4de76dd530c..4ded76091e3 100644 --- a/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go +++ b/staging/src/k8s.io/client-go/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/test/e2e/BUILD b/test/e2e/BUILD index 6a149dbf42d..bb67b533f2a 100644 --- a/test/e2e/BUILD +++ b/test/e2e/BUILD @@ -113,7 +113,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/annotations:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/api/v1/pod:go_default_library", "//pkg/api/v1/service:go_default_library",