From 579c0560a280eae60d245cb3a30b8680270590d9 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 22 Mar 2019 17:55:40 -0400 Subject: [PATCH] Add staging tools.go imports --- staging/publishing/import-restrictions.yaml | 5 ++++ .../examples/client-go/BUILD | 1 + .../examples/client-go/hack/BUILD | 13 +++++++++ .../examples/client-go/hack/tools.go | 22 ++++++++++++++ staging/src/k8s.io/code-generator/tools.go | 29 +++++++++++++++++++ staging/src/k8s.io/kube-aggregator/BUILD | 1 + staging/src/k8s.io/kube-aggregator/hack/BUILD | 13 +++++++++ .../src/k8s.io/kube-aggregator/hack/tools.go | 22 ++++++++++++++ staging/src/k8s.io/metrics/BUILD | 1 + staging/src/k8s.io/metrics/hack/BUILD | 13 +++++++++ staging/src/k8s.io/metrics/hack/tools.go | 22 ++++++++++++++ staging/src/k8s.io/node-api/BUILD | 1 + staging/src/k8s.io/node-api/hack/BUILD | 13 +++++++++ staging/src/k8s.io/node-api/hack/tools.go | 22 ++++++++++++++ staging/src/k8s.io/sample-apiserver/BUILD | 1 + .../src/k8s.io/sample-apiserver/hack/BUILD | 13 +++++++++ .../src/k8s.io/sample-apiserver/hack/tools.go | 22 ++++++++++++++ staging/src/k8s.io/sample-controller/BUILD | 1 + .../src/k8s.io/sample-controller/hack/BUILD | 13 +++++++++ .../k8s.io/sample-controller/hack/tools.go | 22 ++++++++++++++ 20 files changed, 250 insertions(+) create mode 100644 staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/BUILD create mode 100644 staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/tools.go create mode 100644 staging/src/k8s.io/code-generator/tools.go create mode 100644 staging/src/k8s.io/kube-aggregator/hack/BUILD create mode 100644 staging/src/k8s.io/kube-aggregator/hack/tools.go create mode 100644 staging/src/k8s.io/metrics/hack/BUILD create mode 100644 staging/src/k8s.io/metrics/hack/tools.go create mode 100644 staging/src/k8s.io/node-api/hack/BUILD create mode 100644 staging/src/k8s.io/node-api/hack/tools.go create mode 100644 staging/src/k8s.io/sample-apiserver/hack/BUILD create mode 100644 staging/src/k8s.io/sample-apiserver/hack/tools.go create mode 100644 staging/src/k8s.io/sample-controller/hack/BUILD create mode 100644 staging/src/k8s.io/sample-controller/hack/tools.go diff --git a/staging/publishing/import-restrictions.yaml b/staging/publishing/import-restrictions.yaml index 5b201f19c28..4b9a3ff243b 100644 --- a/staging/publishing/import-restrictions.yaml +++ b/staging/publishing/import-restrictions.yaml @@ -104,6 +104,7 @@ - k8s.io/api - k8s.io/apimachinery - k8s.io/client-go + - k8s.io/code-generator - k8s.io/metrics - k8s.io/klog @@ -113,6 +114,7 @@ - k8s.io/apimachinery - k8s.io/apiserver - k8s.io/client-go + - k8s.io/code-generator - k8s.io/component-base - k8s.io/kube-aggregator - k8s.io/kube-openapi @@ -124,6 +126,7 @@ - k8s.io/apimachinery - k8s.io/apiserver - k8s.io/client-go + - k8s.io/code-generator - k8s.io/component-base - k8s.io/sample-apiserver - k8s.io/klog @@ -135,6 +138,7 @@ - k8s.io/apimachinery - k8s.io/apiserver - k8s.io/client-go + - k8s.io/code-generator - k8s.io/component-base - k8s.io/klog - k8s.io/kube-openapi @@ -200,6 +204,7 @@ allowedImports: - k8s.io/apimachinery - k8s.io/client-go + - k8s.io/code-generator - k8s.io/node-api - baseImportPath: "./vendor/k8s.io/csi-translation-lib/" diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/BUILD b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/BUILD index 9bf1895c2b9..1a3be95c9f1 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/BUILD +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/BUILD @@ -9,6 +9,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack:all-srcs", "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr:all-srcs", "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:all-srcs", "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions:all-srcs", diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/BUILD b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/tools.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator" diff --git a/staging/src/k8s.io/code-generator/tools.go b/staging/src/k8s.io/code-generator/tools.go new file mode 100644 index 00000000000..7142f43f163 --- /dev/null +++ b/staging/src/k8s.io/code-generator/tools.go @@ -0,0 +1,29 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package contains code generation utilities +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import ( + _ "k8s.io/code-generator/cmd/client-gen" + _ "k8s.io/code-generator/cmd/deepcopy-gen" + _ "k8s.io/code-generator/cmd/defaulter-gen" + _ "k8s.io/code-generator/cmd/informer-gen" + _ "k8s.io/code-generator/cmd/lister-gen" +) diff --git a/staging/src/k8s.io/kube-aggregator/BUILD b/staging/src/k8s.io/kube-aggregator/BUILD index 229d53ddd80..916d0556ed3 100644 --- a/staging/src/k8s.io/kube-aggregator/BUILD +++ b/staging/src/k8s.io/kube-aggregator/BUILD @@ -43,6 +43,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/kube-aggregator/hack:all-srcs", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration:all-srcs", "//staging/src/k8s.io/kube-aggregator/pkg/apiserver:all-srcs", "//staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:all-srcs", diff --git a/staging/src/k8s.io/kube-aggregator/hack/BUILD b/staging/src/k8s.io/kube-aggregator/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/kube-aggregator/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/kube-aggregator/hack/tools.go b/staging/src/k8s.io/kube-aggregator/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/kube-aggregator/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator" diff --git a/staging/src/k8s.io/metrics/BUILD b/staging/src/k8s.io/metrics/BUILD index ed24b5f8fd8..bf69b5ff45e 100644 --- a/staging/src/k8s.io/metrics/BUILD +++ b/staging/src/k8s.io/metrics/BUILD @@ -9,6 +9,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/metrics/hack:all-srcs", "//staging/src/k8s.io/metrics/pkg/apis/custom_metrics:all-srcs", "//staging/src/k8s.io/metrics/pkg/apis/external_metrics:all-srcs", "//staging/src/k8s.io/metrics/pkg/apis/metrics:all-srcs", diff --git a/staging/src/k8s.io/metrics/hack/BUILD b/staging/src/k8s.io/metrics/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/metrics/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/metrics/hack/tools.go b/staging/src/k8s.io/metrics/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/metrics/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator" diff --git a/staging/src/k8s.io/node-api/BUILD b/staging/src/k8s.io/node-api/BUILD index 0321d12b424..975662d9ace 100644 --- a/staging/src/k8s.io/node-api/BUILD +++ b/staging/src/k8s.io/node-api/BUILD @@ -9,6 +9,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/node-api/hack:all-srcs", "//staging/src/k8s.io/node-api/pkg/apis/node/v1alpha1:all-srcs", "//staging/src/k8s.io/node-api/pkg/client/clientset/versioned:all-srcs", "//staging/src/k8s.io/node-api/pkg/client/informers/externalversions:all-srcs", diff --git a/staging/src/k8s.io/node-api/hack/BUILD b/staging/src/k8s.io/node-api/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/node-api/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/node-api/hack/tools.go b/staging/src/k8s.io/node-api/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/node-api/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator" diff --git a/staging/src/k8s.io/sample-apiserver/BUILD b/staging/src/k8s.io/sample-apiserver/BUILD index 5f12cfd9d36..40fd961c3c6 100644 --- a/staging/src/k8s.io/sample-apiserver/BUILD +++ b/staging/src/k8s.io/sample-apiserver/BUILD @@ -35,6 +35,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/sample-apiserver/hack:all-srcs", "//staging/src/k8s.io/sample-apiserver/pkg/admission/plugin/banflunder:all-srcs", "//staging/src/k8s.io/sample-apiserver/pkg/admission/wardleinitializer:all-srcs", "//staging/src/k8s.io/sample-apiserver/pkg/apis/wardle:all-srcs", diff --git a/staging/src/k8s.io/sample-apiserver/hack/BUILD b/staging/src/k8s.io/sample-apiserver/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/sample-apiserver/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/sample-apiserver/hack/tools.go b/staging/src/k8s.io/sample-apiserver/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/sample-apiserver/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator" diff --git a/staging/src/k8s.io/sample-controller/BUILD b/staging/src/k8s.io/sample-controller/BUILD index a9ce76b126c..0e3a2aea604 100644 --- a/staging/src/k8s.io/sample-controller/BUILD +++ b/staging/src/k8s.io/sample-controller/BUILD @@ -55,6 +55,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/sample-controller/hack:all-srcs", "//staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller:all-srcs", "//staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned:all-srcs", "//staging/src/k8s.io/sample-controller/pkg/generated/informers/externalversions:all-srcs", diff --git a/staging/src/k8s.io/sample-controller/hack/BUILD b/staging/src/k8s.io/sample-controller/hack/BUILD new file mode 100644 index 00000000000..6df04e38cd7 --- /dev/null +++ b/staging/src/k8s.io/sample-controller/hack/BUILD @@ -0,0 +1,13 @@ +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/staging/src/k8s.io/sample-controller/hack/tools.go b/staging/src/k8s.io/sample-controller/hack/tools.go new file mode 100644 index 00000000000..af1f099d6a9 --- /dev/null +++ b/staging/src/k8s.io/sample-controller/hack/tools.go @@ -0,0 +1,22 @@ +// +build tools + +/* +Copyright 2019 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. +*/ + +// This package imports things required by build scripts, to force `go mod` to see them as dependencies +package tools + +import _ "k8s.io/code-generator"