Vendor: Update k8s version

Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
Michał Żyłowski 2017-02-03 14:41:32 +01:00
parent dfa93414c5
commit 52baf68d50
3756 changed files with 113013 additions and 92675 deletions

View file

@ -8,7 +8,6 @@ cmd/genkubedocs
cmd/genman
cmd/genswaggertypedocs
cmd/genyaml
cmd/integration
cmd/kube-aggregator
cmd/kube-aggregator/pkg/apis/apiregistration/install
cmd/kube-aggregator/pkg/client/informers
@ -25,31 +24,25 @@ cmd/kube-controller-manager/app/options
cmd/kube-discovery
cmd/kube-proxy
cmd/kubeadm
cmd/kubeadm
cmd/kubeadm/app/apis/kubeadm/install
cmd/kubeadm/app/phases/apiconfig
cmd/kubeadm/app/phases/certs
cmd/kubectl
cmd/kubelet
cmd/libs/go2idl/client-gen
cmd/libs/go2idl/client-gen/generators
cmd/libs/go2idl/client-gen/test_apis/testgroup/install
cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/internalversion
cmd/libs/go2idl/conversion-gen
cmd/libs/go2idl/deepcopy-gen
cmd/libs/go2idl/defaulter-gen
cmd/libs/go2idl/generator
cmd/libs/go2idl/go-to-protobuf
cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo
cmd/libs/go2idl/import-boss
cmd/libs/go2idl/informer-gen
cmd/libs/go2idl/lister-gen
cmd/libs/go2idl/openapi-gen
cmd/libs/go2idl/parser
cmd/libs/go2idl/set-gen
cmd/libs/go2idl/set-gen/generators
cmd/linkcheck
docs/user-guide/environment-guide/containers/backend
docs/user-guide/environment-guide/containers/show
docs/user-guide/liveness/image
examples
examples/apiserver/server
examples/explorer
@ -68,15 +61,14 @@ pkg/api/annotations
pkg/api/errors
pkg/api/events
pkg/api/install
pkg/api/meta
pkg/api/resource
pkg/api/service
pkg/api/v1
pkg/api/v1/service
pkg/apimachinery
pkg/apis/abac/v0
pkg/apis/abac/v1beta1
pkg/apis/apps/install
pkg/apis/authentication.k8s.io/install
pkg/apis/authentication/install
pkg/apis/authorization/install
pkg/apis/autoscaling/install
@ -94,8 +86,7 @@ pkg/apis/rbac/install
pkg/apis/rbac/v1alpha1
pkg/apis/storage/install
pkg/apis/storage/validation
pkg/auth/authenticator
pkg/auth/authorizer/union
pkg/client/cache
pkg/client/conditions
pkg/client/informers/informers_generated/apps
pkg/client/informers/informers_generated/apps/internalversion
@ -109,7 +100,7 @@ pkg/client/informers/informers_generated/batch/v1
pkg/client/informers/informers_generated/batch/v2alpha1
pkg/client/informers/informers_generated/certificates
pkg/client/informers/informers_generated/certificates/internalversion
pkg/client/informers/informers_generated/certificates/v1alpha1
pkg/client/informers/informers_generated/certificates/v1beta1
pkg/client/informers/informers_generated/core
pkg/client/informers/informers_generated/core/internalversion
pkg/client/informers/informers_generated/core/v1
@ -122,11 +113,11 @@ pkg/client/informers/informers_generated/policy/v1beta1
pkg/client/informers/informers_generated/rbac
pkg/client/informers/informers_generated/rbac/internalversion
pkg/client/informers/informers_generated/rbac/v1alpha1
pkg/client/informers/informers_generated/rbac/v1beta1
pkg/client/informers/informers_generated/storage
pkg/client/informers/informers_generated/storage/internalversion
pkg/client/informers/informers_generated/storage/v1beta1
pkg/client/listers/apps/internalversion
pkg/client/listers/apps/v1alpha1
pkg/client/listers/apps/v1beta1
pkg/client/listers/authentication/internalversion
pkg/client/listers/authentication/v1beta1
@ -138,7 +129,7 @@ pkg/client/listers/batch/internalversion
pkg/client/listers/batch/v1
pkg/client/listers/batch/v2alpha1
pkg/client/listers/certificates/internalversion
pkg/client/listers/certificates/v1alpha1
pkg/client/listers/certificates/v1beta1
pkg/client/listers/core/internalversion
pkg/client/listers/core/v1
pkg/client/listers/extensions/internalversion
@ -150,64 +141,51 @@ pkg/client/listers/policy/v1alpha1
pkg/client/listers/policy/v1beta1
pkg/client/listers/rbac/internalversion
pkg/client/listers/rbac/v1alpha1
pkg/client/listers/rbac/v1beta1
pkg/client/listers/storage/internalversion
pkg/client/listers/storage/v1beta1
pkg/client/metrics
pkg/client/metrics/prometheus
pkg/client/restclient/watch
pkg/client/testing/core
pkg/client/typed/discovery
pkg/client/unversioned
pkg/client/unversioned/adapters/internalclientset
pkg/client/unversioned/auth
pkg/client/unversioned/remotecommand
pkg/cloudprovider/providers
pkg/cloudprovider/providers/azure
pkg/cloudprovider/providers/cloudstack
pkg/controller/framework
pkg/controller/volume
pkg/controller/volume/attachdetach/cache
pkg/controller/volume/attachdetach/populator
pkg/controller/volume/attachdetach/reconciler
pkg/controller/volume/cache
pkg/controller/volume/populator
pkg/controller/volume/reconciler
pkg/controller/volume/statusupdater
pkg/conversion
pkg/conversion/queryparams
pkg/credentialprovider/aws
pkg/genericapiserver/api/audit
pkg/genericapiserver/api/handlers/responsewriters
pkg/genericapiserver/api/openapi
pkg/genericapiserver/api/request
pkg/genericapiserver/filters
pkg/genericapiserver/mux
pkg/genericapiserver/routes
pkg/fields
pkg/genericapiserver
pkg/genericapiserver/endpoints/handlers/responsewriters
pkg/genericapiserver/endpoints/openapi
pkg/genericapiserver/registry
pkg/genericapiserver/server/filters
pkg/genericapiserver/server/mux
pkg/genericapiserver/server/routes
pkg/hyperkube
pkg/kubelet/api
pkg/kubelet/container
pkg/kubelet/envvars
pkg/kubelet/eviction
pkg/kubelet/sysctls
pkg/kubelet/util/csr
pkg/kubelet/util/format
pkg/kubelet/util/ioutils
pkg/kubelet/volume
pkg/kubelet/volume/cache
pkg/kubelet/volume/populator
pkg/kubelet/volume/reconciler
pkg/kubelet/volumemanager
pkg/kubelet/volumemanager/cache
pkg/kubelet/volumemanager/populator
pkg/kubelet/volumemanager/reconciler
pkg/labels
pkg/proxy/config
pkg/proxy/healthcheck
pkg/quota
pkg/quota/install
pkg/registry
pkg/registry/authorization/util
pkg/registry/clusterrole/storage
pkg/registry/clusterrolebinding/storage
pkg/registry/configmap/storage
pkg/registry/core/configmap/storage
pkg/registry/core/endpoint
pkg/registry/core/node/rest
@ -216,30 +194,20 @@ pkg/registry/core/rangeallocation
pkg/registry/core/service/ipallocator/controller
pkg/registry/core/service/ipallocator/storage
pkg/registry/core/serviceaccount
pkg/registry/endpoint
pkg/registry/extensions/podsecuritypolicy/storage
pkg/registry/extensions/thirdpartyresource
pkg/registry/extensions/thirdpartyresource/storage
pkg/registry/node/rest
pkg/registry/pod/storage
pkg/registry/podsecuritypolicy/storage
pkg/registry/rangeallocation
pkg/registry/rbac/clusterrole/storage
pkg/registry/rbac/clusterrolebinding/storage
pkg/registry/rbac/role/storage
pkg/registry/rbac/rolebinding/storage
pkg/registry/role/storage
pkg/registry/rolebinding/storage
pkg/registry/service/ipallocator/controller
pkg/registry/service/ipallocator/storage
pkg/registry/serviceaccount
pkg/registry/thirdpartyresource
pkg/registry/thirdpartyresource/storage
pkg/runtime
pkg/runtime/serializer
pkg/runtime/serializer/json
pkg/runtime/serializer/recognizer/testing
pkg/runtime/serializer/protobuf
pkg/runtime/serializer/recognizer
pkg/runtime/serializer/streaming
pkg/runtime/serializer/versioning
pkg/runtime/serializer/yaml
pkg/security
pkg/security/podsecuritypolicy/apparmor
pkg/security/podsecuritypolicy/capabilities
@ -248,14 +216,13 @@ pkg/serviceaccount
pkg/storage
pkg/storage/etcd3
pkg/storage/storagebackend/factory
pkg/types
pkg/util/async
pkg/util/cert
pkg/util/codeinspector
pkg/util/errors
pkg/util/flock
pkg/util/flushwriter
pkg/util/framer
pkg/util/goroutinemap
pkg/util/hash
pkg/util/homedir
pkg/util/i18n
pkg/util/interrupt
pkg/util/io
@ -264,14 +231,18 @@ pkg/util/limitwriter
pkg/util/logs
pkg/util/maps
pkg/util/metrics
pkg/util/net
pkg/util/netsh
pkg/util/rand
pkg/util/ratelimit
pkg/util/replicaset
pkg/util/restoptions
pkg/util/runtime
pkg/util/sets
pkg/util/tail
pkg/util/validation
pkg/util/validation/field
pkg/util/version
pkg/util/wait
pkg/util/workqueue
pkg/util/yaml
pkg/version/prometheus
pkg/volume
pkg/volume/downwardapi
@ -299,14 +270,36 @@ plugin/pkg/auth/authenticator
plugin/pkg/auth/authenticator/password
plugin/pkg/auth/authenticator/password/allow
plugin/pkg/auth/authenticator/request/basicauth
plugin/pkg/auth/authenticator/request/union
plugin/pkg/auth/authenticator/request/x509
plugin/pkg/auth/authorizer
plugin/pkg/auth/authorizer/rbac/bootstrappolicy
plugin/pkg/client/auth
plugin/pkg/client/auth/gcp
test/e2e/cleanup
test/e2e/generated
staging/src/k8s.io/apimachinery/pkg/api/errors
staging/src/k8s.io/apimachinery/pkg/apimachinery
staging/src/k8s.io/apimachinery/pkg/conversion/queryparams
staging/src/k8s.io/apimachinery/pkg/runtime
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/yaml
staging/src/k8s.io/apimachinery/pkg/util/json
staging/src/k8s.io/apimachinery/pkg/util/validation/field
staging/src/k8s.io/apimachinery/pkg/version
staging/src/k8s.io/apimachinery/pkg/watch
staging/src/k8s.io/apiserver/pkg/authentication/authenticator
staging/src/k8s.io/apiserver/pkg/authentication/request/union
staging/src/k8s.io/apiserver/pkg/authentication/request/x509
staging/src/k8s.io/apiserver/pkg/authorization/union
staging/src/k8s.io/apiserver/pkg/endpoints/request
staging/src/k8s.io/apiserver/pkg/server
staging/src/k8s.io/apiserver/pkg/storage/names
staging/src/k8s.io/apiserver/pkg/util/flushwriter
staging/src/k8s.io/client-go/discovery
staging/src/k8s.io/client-go/plugin/pkg/client/auth
staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp
staging/src/k8s.io/client-go/rest/watch
staging/src/k8s.io/client-go/tools/auth
staging/src/k8s.io/client-go/tools/metrics
staging/src/k8s.io/client-go/util/cert
staging/src/k8s.io/client-go/util/homedir
test/e2e/perftype
test/e2e_node/runner/local
test/images/clusterapi-tester
@ -330,4 +323,3 @@ test/integration/objectmeta
test/integration/openshift
test/soak/cauldron
test/soak/serve_hostnames
third_party/forked/golang/expansion

17
vendor/k8s.io/kubernetes/hack/BUILD generated vendored
View file

@ -14,6 +14,23 @@ filegroup(
srcs = [
":package-srcs",
"//hack/boilerplate:all-srcs",
"//hack/e2e-internal:all-srcs",
"//hack/lib:all-srcs",
],
tags = ["automanaged"],
)
sh_test(
name = "verify-boilerplate",
srcs = ["verify-boilerplate.sh"],
data = ["//:all-srcs"],
tags = ["manual"],
)
test_suite(
name = "verify-all",
tags = ["manual"],
tests = [
"verify-boilerplate",
],
)

10
vendor/k8s.io/kubernetes/hack/OWNERS generated vendored
View file

@ -1,4 +1,12 @@
assignees:
reviewers:
- eparis
- ihmccreery
- ixdy
- jbeda
- lavalamp
- spxtr
- zmerlynn
approvers:
- eparis
- ihmccreery
- ixdy

View file

@ -37,7 +37,7 @@ readonly SWAGGER_PKG="swagger"
function kube::hack::build_ui() {
local pkg="$1"
local src="$2"
local output_file="pkg/genericapiserver/routes/data/${pkg}/datafile.go"
local output_file="pkg/genericapiserver/server/routes/data/${pkg}/datafile.go"
go-bindata -nocompress -o "${output_file}" -prefix ${PWD} -pkg "${pkg}" "${src}"

16
vendor/k8s.io/kubernetes/hack/e2e-internal/BUILD generated vendored Normal file
View file

@ -0,0 +1,16 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

16
vendor/k8s.io/kubernetes/hack/lib/BUILD generated vendored Normal file
View file

@ -0,0 +1,16 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View file

@ -21,11 +21,13 @@ readonly KUBE_GOPATH="${KUBE_OUTPUT}/go"
# The set of server targets that we are only building for Linux
# Note: if you are adding something here, you might need to add it to
# kube::build::source_targets in build/common.sh as well.
# If you update this list, please also update build/release-tars/BUILD.
kube::golang::server_targets() {
local targets=(
cmd/kube-proxy
cmd/kube-apiserver
cmd/kube-controller-manager
cmd/cloud-controller-manager
cmd/kubelet
cmd/kubeadm
cmd/hyperkube
@ -40,6 +42,7 @@ readonly KUBE_SERVER_TARGETS=($(kube::golang::server_targets))
readonly KUBE_SERVER_BINARIES=("${KUBE_SERVER_TARGETS[@]##*/}")
# The set of server targets that we are only building for Kubernetes nodes
# If you update this list, please also update build/release-tars/BUILD.
kube::golang::node_targets() {
local targets=(
cmd/kube-proxy
@ -122,6 +125,7 @@ else
fi
# The set of client targets that we are building for all platforms
# If you update this list, please also update build/release-tars/BUILD.
readonly KUBE_CLIENT_TARGETS=(
cmd/kubectl
federation/cmd/kubefed
@ -130,6 +134,7 @@ readonly KUBE_CLIENT_BINARIES=("${KUBE_CLIENT_TARGETS[@]##*/}")
readonly KUBE_CLIENT_BINARIES_WIN=("${KUBE_CLIENT_BINARIES[@]/%/.exe}")
# The set of test targets that we are building for all platforms
# If you update this list, please also update build/release-tars/BUILD.
kube::golang::test_targets() {
local targets=(
cmd/gendocs
@ -149,6 +154,7 @@ kube::golang::test_targets() {
readonly KUBE_TEST_TARGETS=($(kube::golang::test_targets))
readonly KUBE_TEST_BINARIES=("${KUBE_TEST_TARGETS[@]##*/}")
readonly KUBE_TEST_BINARIES_WIN=("${KUBE_TEST_BINARIES[@]/%/.exe}")
# If you update this list, please also update build/release-tars/BUILD.
readonly KUBE_TEST_PORTABLE=(
test/e2e/testing-manifests
test/kubemark
@ -164,6 +170,7 @@ readonly KUBE_TEST_PORTABLE=(
# Test targets which run on the Kubernetes clusters directly, so we only
# need to target server platforms.
# These binaries will be distributed in the kubernetes-test tarball.
# If you update this list, please also update build/release-tars/BUILD.
readonly KUBE_TEST_SERVER_TARGETS=(
cmd/kubemark
vendor/github.com/onsi/ginkgo/ginkgo
@ -186,6 +193,7 @@ readonly KUBE_ALL_TARGETS=(
readonly KUBE_ALL_BINARIES=("${KUBE_ALL_TARGETS[@]##*/}")
readonly KUBE_STATIC_LIBRARIES=(
cloud-controller-manager
kube-apiserver
kube-controller-manager
kube-scheduler

View file

@ -59,10 +59,11 @@ authorization.k8s.io/v1beta1 \
autoscaling/v1 \
batch/v1 \
batch/v2alpha1 \
certificates.k8s.io/v1alpha1 \
certificates.k8s.io/v1beta1 \
extensions/v1beta1 \
imagepolicy.k8s.io/v1alpha1 \
policy/v1beta1 \
rbac.authorization.k8s.io/v1beta1 \
rbac.authorization.k8s.io/v1alpha1 \
storage.k8s.io/v1beta1\
}"

View file

@ -167,12 +167,19 @@ kube::util::host_platform() {
kube::util::find-binary-for-platform() {
local -r lookfor="$1"
local -r platform="$2"
local -r locations=(
local locations=(
"${KUBE_ROOT}/_output/bin/${lookfor}"
"${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}"
"${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}"
"${KUBE_ROOT}/platforms/${platform}/${lookfor}"
)
# Also search for binary in bazel build tree.
# In some cases we have to name the binary $BINARY_bin, since there was a
# directory named $BINARY next to it.
locations+=($(find "${KUBE_ROOT}/bazel-bin/" -type f -executable \
\( -name "${lookfor}" -o -name "${lookfor}_bin" \) 2>/dev/null || true) )
# List most recently-updated location.
local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
echo -n "${bin}"
}
@ -313,22 +320,31 @@ kube::util::group-version-to-pkg-path() {
case "${group_version}" in
# both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API.
__internal)
echo "api"
echo "pkg/api"
;;
v1)
echo "api/v1"
echo "pkg/api/v1"
;;
federation/v1beta1)
echo "federation/apis/federation/v1beta1"
;;
meta/v1)
echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1"
;;
meta/v1)
echo "../vendor/k8s.io/apimachinery/pkg/apis/meta/v1"
;;
unversioned)
echo "api/unversioned"
echo "pkg/api/unversioned"
;;
*.k8s.io)
echo "apis/${group_version%.*k8s.io}"
echo "pkg/apis/${group_version%.*k8s.io}"
;;
*.k8s.io/*)
echo "apis/${group_version/.*k8s.io/}"
echo "pkg/apis/${group_version/.*k8s.io/}"
;;
*)
echo "apis/${group_version%__internal}"
echo "pkg/apis/${group_version%__internal}"
;;
esac
}

View file

@ -417,7 +417,10 @@ function start_apiserver {
# Wait for kube-apiserver to come up before launching the rest of the components.
echo "Waiting for apiserver to come up"
kube::util::wait_for_url "https://${API_HOST}:${API_SECURE_PORT}/version" "apiserver: " 1 ${WAIT_FOR_URL_API_SERVER} || exit 1
# this uses the API port because if you don't have any authenticator, you can't seem to use the secure port at all.
# this matches what happened with the combination in 1.4.
# TODO change this conditionally based on whether API_PORT is on or off
kube::util::wait_for_url "http://${API_HOST}:${API_PORT}/version" "apiserver: " 1 ${WAIT_FOR_URL_API_SERVER} || exit 1
# Create kubeconfigs for all components, using client certs
kube::util::write_client_kubeconfig "${CONTROLPLANE_SUDO}" "${CERT_DIR}" "${ROOT_CA_FILE}" "${API_HOST}" "${API_SECURE_PORT}" admin
@ -533,6 +536,7 @@ function start_kubelet {
--experimental-cgroups-per-qos=${EXPERIMENTAL_CGROUPS_PER_QOS} \
--cgroup-driver=${CGROUP_DRIVER} \
--cgroup-root=${CGROUP_ROOT} \
--keep-terminated-pod-volumes=true \
${auth_args} \
${dns_args} \
${net_plugin_dir_args} \

View file

@ -900,6 +900,22 @@ run_kubectl_apply_tests() {
kubectl delete svc prune-svc 2>&1 "${kube_flags[@]}"
}
# Runs tests related to kubectl create --filename(-f) --selector(-l).
run_kubectl_create_filter_tests() {
## kubectl create -f with label selector should only create matching objects
# Pre-Condition: no POD exists
kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
# create
kubectl create -l unique-label=bingbang -f hack/testdata/filter "${kube_flags[@]}"
# check right pod exists
kube::test::get_object_assert 'pods selector-test-pod' "{{${labels_field}.name}}" 'selector-test-pod'
# check wrong pod doesn't exist
output_message=$(! kubectl get pods selector-test-pod-dont-apply 2>&1 "${kube_flags[@]}")
kube::test::if_has_string "${output_message}" 'pods "selector-test-pod-dont-apply" not found'
# cleanup
kubectl delete pods selector-test-pod
}
# Runs tests for --save-config tests.
run_save_config_tests() {
## Configuration annotations should be set when --save-config is enabled
@ -2043,7 +2059,7 @@ run_deployment_tests() {
kubectl apply -f hack/testdata/deployment-revision2.yaml "${kube_flags[@]}"
kube::test::get_object_assert deployment.extensions "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:"
# Rollback to revision 1 with dry-run - should be no-op
kubectl rollout undo deployment nginx --to-revision=1 --dry-run=true "${kube_flags[@]}"
kubectl rollout undo deployment nginx --dry-run=true "${kube_flags[@]}" | grep "test-cmd"
kube::test::get_object_assert deployment.extensions "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:"
# Rollback to revision 1
kubectl rollout undo deployment nginx --to-revision=1 "${kube_flags[@]}"
@ -2592,6 +2608,7 @@ runTests() {
# run for federation apiserver as well.
run_kubectl_apply_tests
run_kubectl_run_tests
run_kubectl_create_filter_tests
fi
###############

View file

@ -57,6 +57,10 @@ kube::test::find_dirs() {
-o -path './test/e2e_node/system/*' \
-name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u
# run tests for client-go
find ./staging/src/k8s.io/client-go -name '*_test.go' \
-name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u
# run tests for apiserver
find ./staging/src/k8s.io/apiserver -name '*_test.go' \
-name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u

View file

@ -1,4 +1,4 @@
apiVersion: certificates.k8s.io/v1alpha1
apiVersion: certificates.k8s.io/v1beta1
kind: CertificateSigningRequest
metadata:
name: foo

View file

@ -44,7 +44,7 @@ for gv in "${ALL_GROUP_VERSIONS[@]}"; do
fi
INTERESTING_GROUP_VERSIONS+=(${gv})
GV_DIRS+=("${REPO_DIR}/pkg/$(kube::util::group-version-to-pkg-path "${gv}")")
GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")")
done
GROUP_VERSIONS="${INTERESTING_GROUP_VERSIONS[@]}" GV_DIRS="${GV_DIRS[@]}" kube::swagger::gen_api_ref_docs "${SWAGGER_SPEC_PATH}" "${OUTPUT}"

View file

@ -25,14 +25,12 @@ kube::golang::setup_env
BUILD_TARGETS=(
cmd/libs/go2idl/client-gen
cmd/libs/go2idl/set-gen
cmd/libs/go2idl/lister-gen
cmd/libs/go2idl/informer-gen
)
make -C "${KUBE_ROOT}" WHAT="${BUILD_TARGETS[*]}"
clientgen=$(kube::util::find-binary "client-gen")
setgen=$(kube::util::find-binary "set-gen")
listergen=$(kube::util::find-binary "lister-gen")
informergen=$(kube::util::find-binary "informer-gen")
@ -45,7 +43,8 @@ GV_DIRS=()
for gv in "${GROUP_VERSIONS[@]}"; do
# add items, but strip off any leading apis/ you find to match command expectations
api_dir=$(kube::util::group-version-to-pkg-path "${gv}")
pkg_dir=${api_dir#apis/}
nopkg_dir=${api_dir#pkg/}
pkg_dir=${nopkg_dir#apis/}
# skip groups that aren't being served, clients for these don't matter
if [[ " ${KUBE_NONSERVER_GROUP_VERSIONS} " == *" ${gv} "* ]]; then
@ -63,9 +62,8 @@ ${clientgen} "$@"
${clientgen} -t "$@"
${clientgen} --clientset-name="clientset" --input="${GV_DIRS_CSV}" "$@"
# Clientgen for federation clientset.
${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/","api/","extensions/","batch/" --included-types-overrides="api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job" "$@"
${clientgen} --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1beta1","api/v1","extensions/v1beta1","batch/v1" --included-types-overrides="api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job" "$@"
${setgen} "$@"
${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/","api/","extensions/","batch/","autoscaling/" --included-types-overrides="api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler" "$@"
${clientgen} --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1beta1","api/v1","extensions/v1beta1","batch/v1","autoscaling/v1" --included-types-overrides="api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler" "$@"
LISTERGEN_APIS=(
pkg/api

View file

@ -39,9 +39,9 @@ GROUP_VERSIONS=("federation/v1beta1" "v1" "extensions/v1beta1")
GV_DIRS=()
for gv in "${GROUP_VERSIONS[@]}"; do
if [[ ${gv} == "federation/v1beta1" ]]; then
GV_DIRS+=("${REPO_DIR}/federation/$(kube::util::group-version-to-pkg-path "${gv}")")
GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")")
else
GV_DIRS+=("${REPO_DIR}/pkg/$(kube::util::group-version-to-pkg-path "${gv}")")
GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")")
fi
done

View file

@ -31,7 +31,7 @@ kube::golang::setup_env
GROUP_VERSIONS=(federation/v1beta1)
GV_DIRS=()
for gv in "${GROUP_VERSIONS[@]}"; do
GV_DIRS+=("federation/$(kube::util::group-version-to-pkg-path "${gv}")")
GV_DIRS+=("$(kube::util::group-version-to-pkg-path "${gv}")")
done
# To avoid compile errors, remove the currently existing files.

View file

@ -29,7 +29,7 @@ BINS=(
)
make -C "${KUBE_ROOT}" WHAT="${BINS[*]}"
if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3.0."* ]]; then
if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then
echo "Generating protobuf requires protoc 3.0.0-beta1 or newer. Please download and"
echo "install the platform appropriate Protobuf package for your OS: "
echo
@ -46,8 +46,17 @@ function cleanup {
trap cleanup EXIT
gogopath=$(dirname $(kube::util::find-binary "protoc-gen-gogo"))
export PATH=$gogopath:$PATH
protoc -I${KUBE_REMOTE_RUNTIME_ROOT} --gogo_out=plugins=grpc:${KUBE_REMOTE_RUNTIME_ROOT} ${KUBE_REMOTE_RUNTIME_ROOT}/api.proto
PATH="${gogopath}:${PATH}" \
protoc \
--proto_path="${KUBE_REMOTE_RUNTIME_ROOT}" \
--proto_path="${KUBE_ROOT}/vendor" \
--gogo_out=plugins=grpc:${KUBE_REMOTE_RUNTIME_ROOT} ${KUBE_REMOTE_RUNTIME_ROOT}/api.proto
# Update boilerplate for the generated file.
echo "$(cat hack/boilerplate/boilerplate.go.txt ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go)" > ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go
sed -i".bak" "s/Copyright YEAR/Copyright $(date '+%Y')/g" ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go
# Run gofmt to clean up the generated code.
kube::golang::verify_go_version
gofmt -l -s -w ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go

View file

@ -32,8 +32,8 @@ GROUP_VERSIONS=(meta/v1 ${KUBE_AVAILABLE_GROUP_VERSIONS})
# To avoid compile errors, remove the currently existing files.
for group_version in "${GROUP_VERSIONS[@]}"; do
rm -f "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go"
rm -f "$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go"
done
for group_version in "${GROUP_VERSIONS[@]}"; do
kube::swagger::gen_types_swagger_doc "${group_version}" "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")"
kube::swagger::gen_types_swagger_doc "${group_version}" "$(kube::util::group-version-to-pkg-path "${group_version}")"
done

View file

@ -67,7 +67,6 @@ cluster/saltbase/salt/kubelet/default:{% if grains['feature_gates'] is defined -
cluster/saltbase/salt/kubelet/default:{% if pillar.get('non_masquerade_cidr','') -%}
cluster/saltbase/salt/opencontrail-networking-master/init.sls: - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}'
cluster/saltbase/salt/opencontrail-networking-minion/init.sls: - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}'
cluster/saltbase/salt/supervisor/kubelet-checker.sh: {% set kubelet_port = pillar['kubelet_port'] -%}
cluster/saltbase/salt/supervisor/supervisor_watcher.sh:# Apply oom_score_adj: -901 to processes
cluster/ubuntu/util.sh: local node_ip=${1}
cluster/vagrant/provision-utils.sh: api_servers: '$(echo "$MASTER_IP" | sed -e "s/'/''/g")'
@ -105,14 +104,14 @@ hack/test-update-storage-objects.sh: local storage_media_type=${3:-""}
hack/test-update-storage-objects.sh: local storage_versions=${2:-""}
hack/test-update-storage-objects.sh: source_file=${test_data[0]}
hack/test-update-storage-objects.sh:# source_file,resource,namespace,name,old_version,new_version
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort *int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort" json:"container_port,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: PodCidr *string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr" json:"pod_cidr,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional RuntimeConfig runtime_config = 1;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int32 container_port = 2;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int64 oom_score_adj = 5;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional string pod_cidr = 1;
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.proto: RuntimeConfig runtime_config = 1;
pkg/kubelet/api/v1alpha1/runtime/api.proto: int32 container_port = 2;
pkg/kubelet/api/v1alpha1/runtime/api.proto: int64 oom_score_adj = 5;
pkg/kubelet/api/v1alpha1/runtime/api.proto: string pod_cidr = 1;
pkg/kubelet/cm/container_manager_linux.go: glog.V(3).Infof("Failed to apply oom_score_adj %d for pid %d: %v", oomScoreAdj, pid, err)
pkg/kubelet/cm/container_manager_linux.go: glog.V(5).Infof("attempting to apply oom_score_adj of %d to pid %d", oomScoreAdj, pid)
pkg/kubelet/network/hairpin/hairpin.go: hairpinModeRelativePath = "hairpin_mode"
@ -124,11 +123,17 @@ pkg/util/oom/oom_linux.go: oomScoreAdjPath := path.Join("/proc", pidStr, "oom_sc
pkg/util/oom/oom_linux.go:// Writes 'value' to /proc/<pid>/oom_score_adj for all processes in cgroup cgroupName.
pkg/util/oom/oom_linux.go:// Writes 'value' to /proc/<pid>/oom_score_adj. PID = 0 means self
test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volume/data-1"},
test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/create/data-1"},
test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/delete/data-1"},
test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/update/data-3"},
test/e2e/common/downwardapi_volume.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=" + filePath},
test/e2e/common/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePath),
test/e2e/common/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePathInReader),
test/e2e/common/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration),
test/e2e/common/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration),
test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/create/data-1"},
test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/delete/data-1"},
test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/update/data-3"},
test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be %d; found %d", pid, expectedOOMScoreAdj, oomScore)
test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be < %d; found %d", pid, expectedMaxOOMScoreAdj, oomScore)
test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be >= %d; found %d", pid, expectedMinOOMScoreAdj, oomScore)

View file

@ -97,6 +97,7 @@ concurrent-resource-quota-syncs
concurrent-serviceaccount-token-syncs
concurrent-service-syncs
config-map
config-map-data
config-map-namespace
config-sync-period
configure-cloud-routes
@ -308,6 +309,7 @@ junit-file-number
k8s-bin-dir
k8s-build-output
keep-gogoproto
keep-terminated-pod-volumes
km-path
kops-admin-access
kops-cluster
@ -542,6 +544,7 @@ seccomp-profile-root
secondary-node-eviction-rate
secret-name
secure-port
self-hosted
serialize-image-pulls
server-start-timeout
service-account-key-file

View file

@ -28,14 +28,17 @@ preload-dep() {
org="$1"
project="$2"
sha="$3"
# project_dir ($4) is optional, if unset we will generate it
if [[ -z ${4:-} ]]; then
project_dir="${GOPATH}/src/${org}/${project}.git"
else
project_dir="${4}"
fi
org_dir="${GOPATH}/src/${org}"
mkdir -p "${org_dir}"
pushd "${org_dir}" > /dev/null
git clone "https://${org}/${project}.git" > /dev/null 2>&1
pushd "${org_dir}/${project}" > /dev/null
git checkout "${sha}" > /dev/null 2>&1
popd > /dev/null
echo "**HACK** preloading dep for ${org} ${project} at ${sha} into ${project_dir}"
git clone "https://${org}/${project}" "${project_dir}" > /dev/null 2>&1
pushd "${project_dir}" > /dev/null
git checkout "${sha}"
popd > /dev/null
}
@ -50,9 +53,17 @@ if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
exit 0
fi
# Create a nice clean place to put our new godeps
_tmpdir="$(mktemp -d -t gopath.XXXXXX)"
KEEP_TMP=false
if [[ -z ${TMP_GOPATH:-} ]]; then
# Create a nice clean place to put our new godeps
_tmpdir="$(mktemp -d -t gopath.XXXXXX)"
else
# reuse what we might have saved previously
_tmpdir="${TMP_GOPATH}"
fi
if [[ -z ${KEEP_TMP:-} ]]; then
KEEP_TMP=false
fi
function cleanup {
if [ "${KEEP_TMP}" == "true" ]; then
echo "Leaving ${_tmpdir} for you to examine or copy. Please delete it manually when finished. (rm -rf ${_tmpdir})"

View file

@ -55,7 +55,7 @@ export IFS=$'\n'
# as the prefix, however if we run it outside it returns the full path of the file
# with a leading underscore. We'll need to support both scenarios for all_packages.
all_packages=(
$(go list -e ./... | egrep -v "/(third_party|vendor|staging|generated|clientset_generated)" | sed -e 's|^k8s.io/kubernetes/||' -e "s|^_${KUBE_ROOT}/\?||")
$(go list -e ./... | egrep -v "/(third_party|vendor|staging/src/k8s.io/client-go/pkg|generated|clientset_generated)" | sed -e 's|^k8s.io/kubernetes/||' -e "s|^_${KUBE_ROOT}/\?||")
)
linted_packages=(
$(cat $linted_file)
@ -76,6 +76,12 @@ for p in "${all_packages[@]}"; do
fi
done
# Check that all linted_packages actually still exist
gone=()
for p in "${linted_packages[@]}"; do
array_contains "$p" "${all_packages[@]}" || gone+=( "$p" )
done
# Check to be sure all the packages that should pass lint are.
if [ ${#errors[@]} -eq 0 ]; then
echo 'Congratulations! All Go source files have been linted.'
@ -94,18 +100,29 @@ fi
# check to make sure all packages that pass lint are in the linted file.
echo
if [ ${#linted[@]} -eq 0 ]; then
if [ ${#linted[@]} -eq 0 -a ${#gone[@]} -eq 0 ]; then
echo 'Success! All packages that should pass lint are listed in the linted file.'
else
{
echo "Some packages passed golint but are not listed in hack/.linted_packages."
echo "Please add them in alphabetical order:"
echo
for p in "${linted[@]}"; do
echo " echo $p >> hack/.linted_packages"
done
echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages"
echo
if [ ${#gone[@]} -gt 0 ]; then
echo "Some packages in hack/.linted_packages do not exist anymore. Please remove them"
echo "from hack/.linted_packages:"
echo
for p in "${gone[@]}"; do
echo " $p"
done
echo
fi
if [ ${#linted[@]} -gt 0 ]; then
echo "Some packages passed golint but are not listed in hack/.linted_packages."
echo "Please add them in alphabetical order:"
echo
for p in "${linted[@]}"; do
echo " echo $p >> hack/.linted_packages"
done
echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages"
echo
fi
echo 'You can test via this script and commit the result.'
echo
} >&2

View file

@ -25,10 +25,15 @@ kube::golang::setup_env
for dep in $(ls -1 ${KUBE_ROOT}/staging/src/k8s.io/); do
if go list -f {{.Deps}} ./vendor/k8s.io/${dep}/... | sed 's/ /\n/g' - | grep k8s.io/kubernetes | grep -v 'k8s.io/kubernetes/vendor' | LC_ALL=C sort -u | grep -e "."; then
if go list -f {{.Deps}} ./vendor/k8s.io/${dep}/... | tr " " '\n' | grep k8s.io/kubernetes | grep -v 'k8s.io/kubernetes/vendor' | LC_ALL=C sort -u | grep -e "."; then
echo "${dep} has a cyclical dependency"
exit 1
fi
done
if grep -rq '// import "k8s.io/kubernetes/' 'staging/'; then
echo 'file has "// import "k8s.io/kubernetes/"'
exit 1
fi
exit 0