From 442d2c1404c93613a483742a60ea2e438024135b Mon Sep 17 00:00:00 2001 From: deads2k Date: Wed, 4 Jan 2017 09:18:35 -0500 Subject: [PATCH] move pkg/auth/user to staging --- hack/godep-save.sh | 3 +++ hack/make-rules/test.sh | 1 + pkg/auth/user/BUILD | 5 +---- pkg/auth/user/doc.go | 9 +++++---- .../src/k8s.io/apiserver/.import-restrictions | 10 ++++++++++ .../apiserver/pkg/authentication/user/doc.go | 19 +++++++++++++++++++ .../pkg/authentication}/user/user.go | 0 vendor/k8s.io/apiserver | 1 + 8 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 staging/src/k8s.io/apiserver/.import-restrictions create mode 100644 staging/src/k8s.io/apiserver/pkg/authentication/user/doc.go rename {pkg/auth => staging/src/k8s.io/apiserver/pkg/authentication}/user/user.go (100%) create mode 120000 vendor/k8s.io/apiserver diff --git a/hack/godep-save.sh b/hack/godep-save.sh index caae48cc1f2..281f3a815ba 100755 --- a/hack/godep-save.sh +++ b/hack/godep-save.sh @@ -41,6 +41,9 @@ pushd "${KUBE_ROOT}" > /dev/null if [ ! -e "vendor/k8s.io/client-go" ]; then ln -s ../../staging/src/k8s.io/client-go vendor/k8s.io/client-go fi + if [ ! -e "vendor/k8s.io/apiserver" ]; then + ln -s ../../staging/src/k8s.io/apiserver vendor/k8s.io/apiserver + fi popd > /dev/null echo "Don't forget to run hack/update-godep-licenses.sh if you added or removed a dependency!" diff --git a/hack/make-rules/test.sh b/hack/make-rules/test.sh index b55e041786e..69c4a615c3e 100755 --- a/hack/make-rules/test.sh +++ b/hack/make-rules/test.sh @@ -53,6 +53,7 @@ kube::test::find_dirs() { find -L . \ -path './_output' -prune \ -o -path './vendor/k8s.io/client-go/*' \ + -o -path './vendor/k8s.io/apiserver/*' \ -o -path './test/e2e_node/system/*' \ -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./||' | LC_ALL=C sort -u ) diff --git a/pkg/auth/user/BUILD b/pkg/auth/user/BUILD index 37a3bbe2f8b..72e02123044 100644 --- a/pkg/auth/user/BUILD +++ b/pkg/auth/user/BUILD @@ -9,9 +9,6 @@ load( go_library( name = "go_default_library", - srcs = [ - "doc.go", - "user.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/pkg/auth/user/doc.go b/pkg/auth/user/doc.go index 589656f0c5d..72eb15c8a5d 100644 --- a/pkg/auth/user/doc.go +++ b/pkg/auth/user/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package user contains utilities for dealing with simple user exchange in the auth -// packages. The user.Info interface defines an interface for exchanging that info. -package user // import "k8s.io/kubernetes/pkg/auth/user" +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package user diff --git a/staging/src/k8s.io/apiserver/.import-restrictions b/staging/src/k8s.io/apiserver/.import-restrictions new file mode 100644 index 00000000000..c80e742d557 --- /dev/null +++ b/staging/src/k8s.io/apiserver/.import-restrictions @@ -0,0 +1,10 @@ +{ + "Rules": [ + { + "SelectorRegexp": "k8s[.]io/kubernetes", + "ForbiddenPrefixes": [ + "" + ] + } + ] +} diff --git a/staging/src/k8s.io/apiserver/pkg/authentication/user/doc.go b/staging/src/k8s.io/apiserver/pkg/authentication/user/doc.go new file mode 100644 index 00000000000..570c51ae995 --- /dev/null +++ b/staging/src/k8s.io/apiserver/pkg/authentication/user/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package user contains utilities for dealing with simple user exchange in the auth +// packages. The user.Info interface defines an interface for exchanging that info. +package user diff --git a/pkg/auth/user/user.go b/staging/src/k8s.io/apiserver/pkg/authentication/user/user.go similarity index 100% rename from pkg/auth/user/user.go rename to staging/src/k8s.io/apiserver/pkg/authentication/user/user.go diff --git a/vendor/k8s.io/apiserver b/vendor/k8s.io/apiserver new file mode 120000 index 00000000000..086889020de --- /dev/null +++ b/vendor/k8s.io/apiserver @@ -0,0 +1 @@ +../../staging/src/k8s.io/apiserver \ No newline at end of file