diff --git a/cmd/kube-apiserver/app/options/BUILD b/cmd/kube-apiserver/app/options/BUILD index 2112ade4780..01569788ae5 100644 --- a/cmd/kube-apiserver/app/options/BUILD +++ b/cmd/kube-apiserver/app/options/BUILD @@ -10,6 +10,7 @@ go_library( name = "go_default_library", srcs = [ "globalflags.go", + "globalflags_providers.go", "options.go", "validation.go", ], diff --git a/cmd/kube-apiserver/app/options/globalflags.go b/cmd/kube-apiserver/app/options/globalflags.go index 00f59c02502..05c5e14ef4d 100644 --- a/cmd/kube-apiserver/app/options/globalflags.go +++ b/cmd/kube-apiserver/app/options/globalflags.go @@ -33,8 +33,7 @@ func AddCustomGlobalFlags(fs *pflag.FlagSet) { // Lookup flags in global flag set and re-register the values with our flagset. // Adds flags from k8s.io/kubernetes/pkg/cloudprovider/providers. - globalflag.Register(fs, "cloud-provider-gce-lb-src-cidrs") - fs.MarkDeprecated("cloud-provider-gce-lb-src-cidrs", "This flag will be removed once the GCE Cloud Provider is removed from kube-apiserver") + registerLegacyGlobalFlags(fs) // Adds flags from k8s.io/apiserver/pkg/admission. globalflag.Register(fs, "default-not-ready-toleration-seconds") diff --git a/cmd/kube-apiserver/app/options/globalflags_providerless.go b/cmd/kube-apiserver/app/options/globalflags_providerless.go new file mode 100644 index 00000000000..de00215c414 --- /dev/null +++ b/cmd/kube-apiserver/app/options/globalflags_providerless.go @@ -0,0 +1,27 @@ +// +build providerless + +/* +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. +*/ + +package options + +import ( + "github.com/spf13/pflag" +) + +func registerLegacyGlobalFlags(fs *pflag.FlagSet) { + // no-op when no legacy providers are compiled in +} diff --git a/cmd/kube-apiserver/app/options/globalflags_providers.go b/cmd/kube-apiserver/app/options/globalflags_providers.go new file mode 100644 index 00000000000..a07b349523b --- /dev/null +++ b/cmd/kube-apiserver/app/options/globalflags_providers.go @@ -0,0 +1,30 @@ +// +build !providerless + +/* +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. +*/ + +package options + +import ( + "github.com/spf13/pflag" + + "k8s.io/component-base/cli/globalflag" +) + +func registerLegacyGlobalFlags(fs *pflag.FlagSet) { + globalflag.Register(fs, "cloud-provider-gce-lb-src-cidrs") + fs.MarkDeprecated("cloud-provider-gce-lb-src-cidrs", "This flag will be removed once the GCE Cloud Provider is removed from kube-apiserver") +} diff --git a/cmd/kube-controller-manager/app/BUILD b/cmd/kube-controller-manager/app/BUILD index 1fb0323e8bd..b476d322778 100644 --- a/cmd/kube-controller-manager/app/BUILD +++ b/cmd/kube-controller-manager/app/BUILD @@ -11,8 +11,10 @@ go_library( "cloudproviders.go", "controllermanager.go", "core.go", + "flags_providers.go", "import_known_versions.go", "plugins.go", + "plugins_providers.go", "policy.go", "rbac.go", ], diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index e251c30fb4e..2ff0c41f6b5 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -126,10 +126,7 @@ controller, and serviceaccounts controller.`, namedFlagSets := s.Flags(KnownControllers(), ControllersDisabledByDefault.List()) verflag.AddFlags(namedFlagSets.FlagSet("global")) globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name()) - // hoist this flag from the global flagset to preserve the commandline until - // the gce cloudprovider is removed. - globalflag.Register(namedFlagSets.FlagSet("generic"), "cloud-provider-gce-lb-src-cidrs") - namedFlagSets.FlagSet("generic").MarkDeprecated("cloud-provider-gce-lb-src-cidrs", "This flag will be removed once the GCE Cloud Provider is removed from kube-controller-manager") + registerLegacyGlobalFlags(namedFlagSets) for _, f := range namedFlagSets.FlagSets { fs.AddFlagSet(f) } diff --git a/cmd/kube-controller-manager/app/flags_providerless.go b/cmd/kube-controller-manager/app/flags_providerless.go new file mode 100644 index 00000000000..f08fc68e26b --- /dev/null +++ b/cmd/kube-controller-manager/app/flags_providerless.go @@ -0,0 +1,27 @@ +// +build providerless + +/* +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. +*/ + +package app + +import ( + cliflag "k8s.io/component-base/cli/flag" +) + +func registerLegacyGlobalFlags(namedFlagSets cliflag.NamedFlagSets) { + // no-op when legacy cloud providers are not compiled +} diff --git a/cmd/kube-controller-manager/app/flags_providers.go b/cmd/kube-controller-manager/app/flags_providers.go new file mode 100644 index 00000000000..cb8a5a0cf44 --- /dev/null +++ b/cmd/kube-controller-manager/app/flags_providers.go @@ -0,0 +1,31 @@ +// +build !providerless + +/* +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. +*/ + +package app + +import ( + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/cli/globalflag" +) + +func registerLegacyGlobalFlags(namedFlagSets cliflag.NamedFlagSets) { + // hoist this flag from the global flagset to preserve the commandline until + // the gce cloudprovider is removed. + globalflag.Register(namedFlagSets.FlagSet("generic"), "cloud-provider-gce-lb-src-cidrs") + namedFlagSets.FlagSet("generic").MarkDeprecated("cloud-provider-gce-lb-src-cidrs", "This flag will be removed once the GCE Cloud Provider is removed from kube-controller-manager") +} diff --git a/cmd/kube-controller-manager/app/plugins.go b/cmd/kube-controller-manager/app/plugins.go index c6e08cf192e..9e136df94d3 100644 --- a/cmd/kube-controller-manager/app/plugins.go +++ b/cmd/kube-controller-manager/app/plugins.go @@ -31,15 +31,10 @@ import ( _ "k8s.io/kubernetes/pkg/cloudprovider/providers" // Volume plugins "k8s.io/kubernetes/pkg/volume" - "k8s.io/kubernetes/pkg/volume/awsebs" - "k8s.io/kubernetes/pkg/volume/azure_dd" - "k8s.io/kubernetes/pkg/volume/azure_file" - "k8s.io/kubernetes/pkg/volume/cinder" "k8s.io/kubernetes/pkg/volume/csi" "k8s.io/kubernetes/pkg/volume/fc" "k8s.io/kubernetes/pkg/volume/flexvolume" "k8s.io/kubernetes/pkg/volume/flocker" - "k8s.io/kubernetes/pkg/volume/gcepd" "k8s.io/kubernetes/pkg/volume/glusterfs" "k8s.io/kubernetes/pkg/volume/hostpath" "k8s.io/kubernetes/pkg/volume/iscsi" @@ -51,7 +46,6 @@ import ( "k8s.io/kubernetes/pkg/volume/scaleio" "k8s.io/kubernetes/pkg/volume/storageos" volumeutil "k8s.io/kubernetes/pkg/volume/util" - "k8s.io/kubernetes/pkg/volume/vsphere_volume" utilfeature "k8s.io/apiserver/pkg/util/feature" persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config" @@ -66,12 +60,8 @@ import ( func ProbeAttachableVolumePlugins() []volume.VolumePlugin { allPlugins := []volume.VolumePlugin{} - allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) + allPlugins = appendAttachableLegacyProviderVolumes(allPlugins) allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) allPlugins = append(allPlugins, scaleio.ProbeVolumePlugins()...) allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...) allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...) @@ -92,15 +82,10 @@ func GetDynamicPluginProber(config persistentvolumeconfig.VolumeConfiguration) v func ProbeExpandableVolumePlugins(config persistentvolumeconfig.VolumeConfiguration) []volume.VolumePlugin { allPlugins := []volume.VolumePlugin{} - allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) + allPlugins = appendExpandableLegacyProviderVolumes(allPlugins) allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...) allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...) allPlugins = append(allPlugins, scaleio.ProbeVolumePlugins()...) allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...) allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...) @@ -146,7 +131,7 @@ func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config persiste // add rbd provisioner allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...) allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...) + allPlugins = appendLegacyProviderVolumes(allPlugins) allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...) allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...) @@ -154,12 +139,6 @@ func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config persiste allPlugins = append(allPlugins, local.ProbeVolumePlugins()...) allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) - if utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { allPlugins = append(allPlugins, csi.ProbeVolumePlugins()...) } diff --git a/cmd/kube-controller-manager/app/plugins_providerless.go b/cmd/kube-controller-manager/app/plugins_providerless.go new file mode 100644 index 00000000000..cd251593041 --- /dev/null +++ b/cmd/kube-controller-manager/app/plugins_providerless.go @@ -0,0 +1,38 @@ +// +build providerless + +/* +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. +*/ + +package app + +import ( + "k8s.io/kubernetes/pkg/volume" +) + +func appendAttachableLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + // no-op when compiled without legacy cloud providers + return allPlugins +} + +func appendExpandableLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + // no-op when compiled without legacy cloud providers + return allPlugins +} + +func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + // no-op when compiled without legacy cloud providers + return allPlugins +} diff --git a/cmd/kube-controller-manager/app/plugins_providers.go b/cmd/kube-controller-manager/app/plugins_providers.go new file mode 100644 index 00000000000..8c505642dac --- /dev/null +++ b/cmd/kube-controller-manager/app/plugins_providers.go @@ -0,0 +1,52 @@ +// +build !providerless + +/* +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. +*/ + +package app + +import ( + "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/pkg/volume/awsebs" + "k8s.io/kubernetes/pkg/volume/azure_dd" + "k8s.io/kubernetes/pkg/volume/azure_file" + "k8s.io/kubernetes/pkg/volume/cinder" + "k8s.io/kubernetes/pkg/volume/gcepd" + "k8s.io/kubernetes/pkg/volume/vsphere_volume" +) + +func appendAttachableLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) + return allPlugins +} + +func appendExpandableLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + return appendLegacyProviderVolumes(allPlugins) +} + +func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) + return allPlugins +} diff --git a/cmd/kubelet/app/BUILD b/cmd/kubelet/app/BUILD index 8057d9304de..654f93c527b 100644 --- a/cmd/kubelet/app/BUILD +++ b/cmd/kubelet/app/BUILD @@ -33,6 +33,7 @@ go_library( "init_others.go", "init_windows.go", "plugins.go", + "plugins_providers.go", "server.go", "server_linux.go", "server_unsupported.go", diff --git a/cmd/kubelet/app/plugins.go b/cmd/kubelet/app/plugins.go index bc887f64248..4ddf1d65f51 100644 --- a/cmd/kubelet/app/plugins.go +++ b/cmd/kubelet/app/plugins.go @@ -23,13 +23,10 @@ import ( _ "k8s.io/kubernetes/pkg/credentialprovider/azure" _ "k8s.io/kubernetes/pkg/credentialprovider/gcp" "k8s.io/utils/exec" + // Volume plugins "k8s.io/kubernetes/pkg/volume" - "k8s.io/kubernetes/pkg/volume/awsebs" - "k8s.io/kubernetes/pkg/volume/azure_dd" - "k8s.io/kubernetes/pkg/volume/azure_file" "k8s.io/kubernetes/pkg/volume/cephfs" - "k8s.io/kubernetes/pkg/volume/cinder" "k8s.io/kubernetes/pkg/volume/configmap" "k8s.io/kubernetes/pkg/volume/csi" "k8s.io/kubernetes/pkg/volume/downwardapi" @@ -37,7 +34,6 @@ import ( "k8s.io/kubernetes/pkg/volume/fc" "k8s.io/kubernetes/pkg/volume/flexvolume" "k8s.io/kubernetes/pkg/volume/flocker" - "k8s.io/kubernetes/pkg/volume/gcepd" "k8s.io/kubernetes/pkg/volume/git_repo" "k8s.io/kubernetes/pkg/volume/glusterfs" "k8s.io/kubernetes/pkg/volume/hostpath" @@ -51,7 +47,6 @@ import ( "k8s.io/kubernetes/pkg/volume/scaleio" "k8s.io/kubernetes/pkg/volume/secret" "k8s.io/kubernetes/pkg/volume/storageos" - "k8s.io/kubernetes/pkg/volume/vsphere_volume" // Cloud providers _ "k8s.io/kubernetes/pkg/cloudprovider/providers" @@ -67,9 +62,8 @@ func ProbeVolumePlugins() []volume.VolumePlugin { // // Kubelet does not currently need to configure volume plugins. // If/when it does, see kube-controller-manager/app/plugins.go for example of using volume.VolumeConfig - allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) + allPlugins = appendLegacyProviderVolumes(allPlugins) allPlugins = append(allPlugins, emptydir.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...) allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(volume.VolumeConfig{})...) allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(volume.VolumeConfig{})...) @@ -77,16 +71,12 @@ func ProbeVolumePlugins() []volume.VolumePlugin { allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...) allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...) allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...) allPlugins = append(allPlugins, cephfs.ProbeVolumePlugins()...) allPlugins = append(allPlugins, downwardapi.ProbeVolumePlugins()...) allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...) allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...) allPlugins = append(allPlugins, configmap.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) allPlugins = append(allPlugins, projected.ProbeVolumePlugins()...) allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...) allPlugins = append(allPlugins, scaleio.ProbeVolumePlugins()...) diff --git a/cmd/kubelet/app/plugins_providerless.go b/cmd/kubelet/app/plugins_providerless.go new file mode 100644 index 00000000000..b73ae5a5d53 --- /dev/null +++ b/cmd/kubelet/app/plugins_providerless.go @@ -0,0 +1,26 @@ +// +build providerless + +/* +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. +*/ + +package app + +import "k8s.io/kubernetes/pkg/volume" + +func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + // no-op when we didn't compile in support for these + return allPlugins +} diff --git a/cmd/kubelet/app/plugins_providers.go b/cmd/kubelet/app/plugins_providers.go new file mode 100644 index 00000000000..e40b11a761e --- /dev/null +++ b/cmd/kubelet/app/plugins_providers.go @@ -0,0 +1,39 @@ +// +build !providerless + +/* +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. +*/ + +package app + +import ( + "k8s.io/kubernetes/pkg/volume" + "k8s.io/kubernetes/pkg/volume/awsebs" + "k8s.io/kubernetes/pkg/volume/azure_dd" + "k8s.io/kubernetes/pkg/volume/azure_file" + "k8s.io/kubernetes/pkg/volume/cinder" + "k8s.io/kubernetes/pkg/volume/gcepd" + "k8s.io/kubernetes/pkg/volume/vsphere_volume" +) + +func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin) []volume.VolumePlugin { + allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...) + allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) + return allPlugins +} diff --git a/pkg/cloudprovider/providers/BUILD b/pkg/cloudprovider/providers/BUILD index 5bccc7c4787..ac4cc7fac12 100644 --- a/pkg/cloudprovider/providers/BUILD +++ b/pkg/cloudprovider/providers/BUILD @@ -4,7 +4,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = ["providers.go"], + srcs = [ + "doc.go", + "providers.go", + ], importpath = "k8s.io/kubernetes/pkg/cloudprovider/providers", visibility = [ "//cmd/cloud-controller-manager:__pkg__", diff --git a/pkg/cloudprovider/providers/doc.go b/pkg/cloudprovider/providers/doc.go new file mode 100644 index 00000000000..86f7b0eee63 --- /dev/null +++ b/pkg/cloudprovider/providers/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package cloudprovider diff --git a/pkg/cloudprovider/providers/openstack/BUILD b/pkg/cloudprovider/providers/openstack/BUILD index 33481967944..1aa0eb3eb41 100644 --- a/pkg/cloudprovider/providers/openstack/BUILD +++ b/pkg/cloudprovider/providers/openstack/BUILD @@ -9,6 +9,7 @@ load( go_library( name = "go_default_library", srcs = [ + "doc.go", "metadata.go", "openstack.go", "openstack_client.go", diff --git a/pkg/cloudprovider/providers/openstack/doc.go b/pkg/cloudprovider/providers/openstack/doc.go new file mode 100644 index 00000000000..f970097aa5f --- /dev/null +++ b/pkg/cloudprovider/providers/openstack/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package openstack diff --git a/pkg/cloudprovider/providers/openstack/metadata.go b/pkg/cloudprovider/providers/openstack/metadata.go index 2ba32f59d59..f00e0e1c898 100644 --- a/pkg/cloudprovider/providers/openstack/metadata.go +++ b/pkg/cloudprovider/providers/openstack/metadata.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/metadata_test.go b/pkg/cloudprovider/providers/openstack/metadata_test.go index 53a0da250dd..320691e4f66 100644 --- a/pkg/cloudprovider/providers/openstack/metadata_test.go +++ b/pkg/cloudprovider/providers/openstack/metadata_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack.go b/pkg/cloudprovider/providers/openstack/openstack.go index 96bae12e322..d7741097a4e 100644 --- a/pkg/cloudprovider/providers/openstack/openstack.go +++ b/pkg/cloudprovider/providers/openstack/openstack.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack_client.go b/pkg/cloudprovider/providers/openstack/openstack_client.go index 2eb2c24ddc1..de3e7b6965a 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_client.go +++ b/pkg/cloudprovider/providers/openstack/openstack_client.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack_instances.go b/pkg/cloudprovider/providers/openstack/openstack_instances.go index 4ca4198f419..3d817985da5 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_instances.go +++ b/pkg/cloudprovider/providers/openstack/openstack_instances.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -23,9 +25,9 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + v1 "k8s.io/api/core/v1" "k8s.io/klog" - "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" ) diff --git a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go index 83b41b14db9..25c86a09677 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go +++ b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -39,7 +41,7 @@ import ( "github.com/gophercloud/gophercloud/pagination" "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" diff --git a/pkg/cloudprovider/providers/openstack/openstack_metrics.go b/pkg/cloudprovider/providers/openstack/openstack_metrics.go index d24d657352d..84021f58f0f 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_metrics.go +++ b/pkg/cloudprovider/providers/openstack/openstack_metrics.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack_routes.go b/pkg/cloudprovider/providers/openstack/openstack_routes.go index 3aa82dd70af..d8e85db4dbb 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_routes.go +++ b/pkg/cloudprovider/providers/openstack/openstack_routes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go index 9199744f9b9..db180838fcc 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/openstack/openstack_test.go b/pkg/cloudprovider/providers/openstack/openstack_test.go index 929cec70ba1..e5097451c20 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -29,7 +31,7 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/cloudprovider/providers/openstack/openstack_volumes.go b/pkg/cloudprovider/providers/openstack/openstack_volumes.go index 9a98b3c4953..6bc266d7bca 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_volumes.go +++ b/pkg/cloudprovider/providers/openstack/openstack_volumes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/cloudprovider/providers/providers.go b/pkg/cloudprovider/providers/providers.go index 8a5c7c9e815..f258be3134f 100644 --- a/pkg/cloudprovider/providers/providers.go +++ b/pkg/cloudprovider/providers/providers.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/pkg/controller/nodeipam/BUILD b/pkg/controller/nodeipam/BUILD index 944e519b1c9..c9ec8c852a3 100644 --- a/pkg/controller/nodeipam/BUILD +++ b/pkg/controller/nodeipam/BUILD @@ -27,6 +27,7 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "legacyprovider.go", "node_ipam_controller.go", ], importpath = "k8s.io/kubernetes/pkg/controller/nodeipam", diff --git a/pkg/controller/nodeipam/ipam/BUILD b/pkg/controller/nodeipam/ipam/BUILD index b50ce534ddb..d848d7f9f4f 100644 --- a/pkg/controller/nodeipam/ipam/BUILD +++ b/pkg/controller/nodeipam/ipam/BUILD @@ -35,7 +35,7 @@ go_library( "adapter.go", "cidr_allocator.go", "cloud_cidr_allocator.go", - "controller.go", + "controller_legacyprovider.go", "doc.go", "range_allocator.go", "timeout.go", diff --git a/pkg/controller/nodeipam/ipam/adapter.go b/pkg/controller/nodeipam/ipam/adapter.go index 54a998943de..bfbfb9e2416 100644 --- a/pkg/controller/nodeipam/ipam/adapter.go +++ b/pkg/controller/nodeipam/ipam/adapter.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" clientset "k8s.io/client-go/kubernetes" diff --git a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go index c5fde54632b..3eda5919f1a 100644 --- a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go +++ b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -25,7 +27,7 @@ import ( "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_nolegacyproviders.go b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_nolegacyproviders.go new file mode 100644 index 00000000000..4787b5b5e4a --- /dev/null +++ b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_nolegacyproviders.go @@ -0,0 +1,32 @@ +// +build providerless + +/* +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. +*/ + +package ipam + +import ( + "errors" + + informers "k8s.io/client-go/informers/core/v1" + clientset "k8s.io/client-go/kubernetes" + cloudprovider "k8s.io/cloud-provider" +) + +// NewCloudCIDRAllocator creates a new cloud CIDR allocator. +func NewCloudCIDRAllocator(client clientset.Interface, cloud cloudprovider.Interface, nodeInformer informers.NodeInformer) (CIDRAllocator, error) { + return nil, errors.New("legacy cloud provider support not built") +} diff --git a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go index bbf6fd3eb87..f4617df2113 100644 --- a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go +++ b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "testing" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" diff --git a/pkg/controller/nodeipam/ipam/controller.go b/pkg/controller/nodeipam/ipam/controller_legacyprovider.go similarity index 99% rename from pkg/controller/nodeipam/ipam/controller.go rename to pkg/controller/nodeipam/ipam/controller_legacyprovider.go index 728c59746e0..a0d25fd7508 100644 --- a/pkg/controller/nodeipam/ipam/controller.go +++ b/pkg/controller/nodeipam/ipam/controller_legacyprovider.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/controller/nodeipam/legacyprovider.go b/pkg/controller/nodeipam/legacyprovider.go new file mode 100644 index 00000000000..c0c99c85d12 --- /dev/null +++ b/pkg/controller/nodeipam/legacyprovider.go @@ -0,0 +1,69 @@ +// +build !providerless + +/* +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. +*/ + +package nodeipam + +import ( + "net" + + coreinformers "k8s.io/client-go/informers/core/v1" + clientset "k8s.io/client-go/kubernetes" + cloudprovider "k8s.io/cloud-provider" + "k8s.io/klog" + + "k8s.io/kubernetes/pkg/controller/nodeipam/ipam" + nodesync "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync" +) + +func startLegacyIPAM( + ic *Controller, + nodeInformer coreinformers.NodeInformer, + cloud cloudprovider.Interface, + kubeClient clientset.Interface, + clusterCIDRs []*net.IPNet, + serviceCIDR *net.IPNet, + nodeCIDRMaskSize int, +) { + cfg := &ipam.Config{ + Resync: ipamResyncInterval, + MaxBackoff: ipamMaxBackoff, + InitialRetry: ipamInitialBackoff, + } + switch ic.allocatorType { + case ipam.IPAMFromClusterAllocatorType: + cfg.Mode = nodesync.SyncFromCluster + case ipam.IPAMFromCloudAllocatorType: + cfg.Mode = nodesync.SyncFromCloud + } + + // we may end up here with no cidr at all in case of FromCloud/FromCluster + var cidr *net.IPNet + if len(clusterCIDRs) > 0 { + cidr = clusterCIDRs[0] + } + if len(clusterCIDRs) > 1 { + klog.Warningf("Multiple cidrs were configured with FromCluster or FromCloud. cidrs except first one were discarded") + } + ipamc, err := ipam.NewController(cfg, kubeClient, cloud, cidr, serviceCIDR, nodeCIDRMaskSize) + if err != nil { + klog.Fatalf("Error creating ipam controller: %v", err) + } + if err := ipamc.Start(nodeInformer); err != nil { + klog.Fatalf("Error trying to Init(): %v", err) + } +} diff --git a/pkg/controller/nodeipam/node_ipam_controller.go b/pkg/controller/nodeipam/node_ipam_controller.go index 337e7ecfd54..dd6745b6c85 100644 --- a/pkg/controller/nodeipam/node_ipam_controller.go +++ b/pkg/controller/nodeipam/node_ipam_controller.go @@ -28,14 +28,13 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" cloudprovider "k8s.io/cloud-provider" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/nodeipam/ipam" - nodesync "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync" "k8s.io/kubernetes/pkg/util/metrics" ) @@ -131,33 +130,7 @@ func NewNodeIpamController( // TODO: Abstract this check into a generic controller manager should run method. if ic.allocatorType == ipam.IPAMFromClusterAllocatorType || ic.allocatorType == ipam.IPAMFromCloudAllocatorType { - cfg := &ipam.Config{ - Resync: ipamResyncInterval, - MaxBackoff: ipamMaxBackoff, - InitialRetry: ipamInitialBackoff, - } - switch ic.allocatorType { - case ipam.IPAMFromClusterAllocatorType: - cfg.Mode = nodesync.SyncFromCluster - case ipam.IPAMFromCloudAllocatorType: - cfg.Mode = nodesync.SyncFromCloud - } - - // we may end up here with no cidr at all in case of FromCloud/FromCluster - var cidr *net.IPNet - if len(clusterCIDRs) > 0 { - cidr = clusterCIDRs[0] - } - if len(clusterCIDRs) > 1 { - klog.Warningf("Multiple cidrs were configured with FromCluster or FromCloud. cidrs except first one were discarded") - } - ipamc, err := ipam.NewController(cfg, kubeClient, cloud, cidr, serviceCIDR, nodeCIDRMaskSize) - if err != nil { - klog.Fatalf("Error creating ipam controller: %v", err) - } - if err := ipamc.Start(nodeInformer); err != nil { - klog.Fatalf("Error trying to Init(): %v", err) - } + startLegacyIPAM(ic, nodeInformer, cloud, kubeClient, clusterCIDRs, serviceCIDR, nodeCIDRMaskSize) } else { var err error ic.cidrAllocator, err = ipam.New(kubeClient, cloud, nodeInformer, ic.allocatorType, clusterCIDRs, ic.serviceCIDR, nodeCIDRMaskSize) diff --git a/pkg/controller/nodeipam/nolegacyprovider.go b/pkg/controller/nodeipam/nolegacyprovider.go new file mode 100644 index 00000000000..e92da04bc98 --- /dev/null +++ b/pkg/controller/nodeipam/nolegacyprovider.go @@ -0,0 +1,40 @@ +// +build providerless + +/* +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. +*/ + +package nodeipam + +import ( + "net" + + coreinformers "k8s.io/client-go/informers/core/v1" + clientset "k8s.io/client-go/kubernetes" + cloudprovider "k8s.io/cloud-provider" + "k8s.io/klog" +) + +func startLegacyIPAM( + ic *Controller, + nodeInformer coreinformers.NodeInformer, + cloud cloudprovider.Interface, + kubeClient clientset.Interface, + clusterCIDRs []*net.IPNet, + serviceCIDR *net.IPNet, + nodeCIDRMaskSize int, +) { + klog.Fatal("Error trying to Init(): legacy cloud provider support disabled at build time") +} diff --git a/pkg/volume/awsebs/attacher.go b/pkg/volume/awsebs/attacher.go index c939af5aae5..365ebb3e082 100644 --- a/pkg/volume/awsebs/attacher.go +++ b/pkg/volume/awsebs/attacher.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/awsebs/attacher_test.go b/pkg/volume/awsebs/attacher_test.go index 27e3c1675fd..31d7f500a0a 100644 --- a/pkg/volume/awsebs/attacher_test.go +++ b/pkg/volume/awsebs/attacher_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -22,7 +24,7 @@ import ( "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/volume" diff --git a/pkg/volume/awsebs/aws_ebs.go b/pkg/volume/awsebs/aws_ebs.go index 0edde65f15e..85efce5552e 100644 --- a/pkg/volume/awsebs/aws_ebs.go +++ b/pkg/volume/awsebs/aws_ebs.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -28,7 +30,7 @@ import ( "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/volume/awsebs/aws_ebs_block.go b/pkg/volume/awsebs/aws_ebs_block.go index 6279a2ef245..a991474a91f 100644 --- a/pkg/volume/awsebs/aws_ebs_block.go +++ b/pkg/volume/awsebs/aws_ebs_block.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -22,7 +24,7 @@ import ( "strconv" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/klog" "k8s.io/kubernetes/pkg/util/mount" diff --git a/pkg/volume/awsebs/aws_ebs_block_test.go b/pkg/volume/awsebs/aws_ebs_block_test.go index f778c63fa61..05ed2fa7ea6 100644 --- a/pkg/volume/awsebs/aws_ebs_block_test.go +++ b/pkg/volume/awsebs/aws_ebs_block_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "path/filepath" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utiltesting "k8s.io/client-go/util/testing" diff --git a/pkg/volume/awsebs/aws_ebs_test.go b/pkg/volume/awsebs/aws_ebs_test.go index 2119a31de44..bddaadaf861 100644 --- a/pkg/volume/awsebs/aws_ebs_test.go +++ b/pkg/volume/awsebs/aws_ebs_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -24,7 +26,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" diff --git a/pkg/volume/awsebs/aws_util.go b/pkg/volume/awsebs/aws_util.go index 9a3e4f66e48..2f69d54f9b9 100644 --- a/pkg/volume/awsebs/aws_util.go +++ b/pkg/volume/awsebs/aws_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -26,10 +28,10 @@ import ( "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/cloud-provider" + cloudprovider "k8s.io/cloud-provider" volumehelpers "k8s.io/cloud-provider/volume/helpers" "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/volume" diff --git a/pkg/volume/azure_dd/BUILD b/pkg/volume/azure_dd/BUILD index 620f91f8fb8..e9345051380 100644 --- a/pkg/volume/azure_dd/BUILD +++ b/pkg/volume/azure_dd/BUILD @@ -19,6 +19,7 @@ go_library( "azure_dd_max_disk_count.go", "azure_mounter.go", "azure_provision.go", + "doc.go", ], importpath = "k8s.io/kubernetes/pkg/volume/azure_dd", deps = [ diff --git a/pkg/volume/azure_dd/attacher.go b/pkg/volume/azure_dd/attacher.go index 1a34a91fd50..28592bc7e94 100644 --- a/pkg/volume/azure_dd/attacher.go +++ b/pkg/volume/azure_dd/attacher.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/attacher_test.go b/pkg/volume/azure_dd/attacher_test.go index 50a89f6bfff..69ecd3860d6 100644 --- a/pkg/volume/azure_dd/attacher_test.go +++ b/pkg/volume/azure_dd/attacher_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_common.go b/pkg/volume/azure_dd/azure_common.go index 2d7ca1c76f8..c8cd1361ce1 100644 --- a/pkg/volume/azure_dd/azure_common.go +++ b/pkg/volume/azure_dd/azure_common.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_common_linux.go b/pkg/volume/azure_dd/azure_common_linux.go index 3a98acb98aa..89a08750ca6 100644 --- a/pkg/volume/azure_dd/azure_common_linux.go +++ b/pkg/volume/azure_dd/azure_common_linux.go @@ -1,3 +1,4 @@ +// +build !providerless // +build linux /* diff --git a/pkg/volume/azure_dd/azure_common_test.go b/pkg/volume/azure_dd/azure_common_test.go index 18e9b2bdad1..fc9399e2d1a 100644 --- a/pkg/volume/azure_dd/azure_common_test.go +++ b/pkg/volume/azure_dd/azure_common_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_common_unsupported.go b/pkg/volume/azure_dd/azure_common_unsupported.go index ba938ccc28a..842f023332f 100644 --- a/pkg/volume/azure_dd/azure_common_unsupported.go +++ b/pkg/volume/azure_dd/azure_common_unsupported.go @@ -1,3 +1,4 @@ +// +build !providerless // +build !linux,!windows /* diff --git a/pkg/volume/azure_dd/azure_common_windows.go b/pkg/volume/azure_dd/azure_common_windows.go index b95fd05f8b6..85bff9ccacd 100644 --- a/pkg/volume/azure_dd/azure_common_windows.go +++ b/pkg/volume/azure_dd/azure_common_windows.go @@ -1,3 +1,4 @@ +// +build !providerless // +build windows /* diff --git a/pkg/volume/azure_dd/azure_dd.go b/pkg/volume/azure_dd/azure_dd.go index 53232c45277..04053081f81 100644 --- a/pkg/volume/azure_dd/azure_dd.go +++ b/pkg/volume/azure_dd/azure_dd.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_dd_block.go b/pkg/volume/azure_dd/azure_dd_block.go index 310b424b720..39bdb28edb9 100644 --- a/pkg/volume/azure_dd/azure_dd_block.go +++ b/pkg/volume/azure_dd/azure_dd_block.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_dd_block_test.go b/pkg/volume/azure_dd/azure_dd_block_test.go index 1951707470d..d419f074d39 100644 --- a/pkg/volume/azure_dd/azure_dd_block_test.go +++ b/pkg/volume/azure_dd/azure_dd_block_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_dd_max_disk_count.go b/pkg/volume/azure_dd/azure_dd_max_disk_count.go index a5dc0d44028..3e6289cd24e 100644 --- a/pkg/volume/azure_dd/azure_dd_max_disk_count.go +++ b/pkg/volume/azure_dd/azure_dd_max_disk_count.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_dd_test.go b/pkg/volume/azure_dd/azure_dd_test.go index 82fa41bc53c..1d8ef3ed75b 100644 --- a/pkg/volume/azure_dd/azure_dd_test.go +++ b/pkg/volume/azure_dd/azure_dd_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_mounter.go b/pkg/volume/azure_dd/azure_mounter.go index dd4ff36486b..f2ed18c5d92 100644 --- a/pkg/volume/azure_dd/azure_mounter.go +++ b/pkg/volume/azure_dd/azure_mounter.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_provision.go b/pkg/volume/azure_dd/azure_provision.go index 0868463a89c..1f6efb64a1e 100644 --- a/pkg/volume/azure_dd/azure_provision.go +++ b/pkg/volume/azure_dd/azure_provision.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/azure_provision_test.go b/pkg/volume/azure_dd/azure_provision_test.go index 0854c497ac2..dfc8fc80573 100644 --- a/pkg/volume/azure_dd/azure_provision_test.go +++ b/pkg/volume/azure_dd/azure_provision_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/azure_dd/doc.go b/pkg/volume/azure_dd/doc.go new file mode 100644 index 00000000000..0b0f4da530a --- /dev/null +++ b/pkg/volume/azure_dd/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package azure_dd diff --git a/pkg/volume/azure_file/azure_file.go b/pkg/volume/azure_file/azure_file.go index 37e5f238011..d6c25bc0c79 100644 --- a/pkg/volume/azure_file/azure_file.go +++ b/pkg/volume/azure_file/azure_file.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/azure_file/azure_file_test.go b/pkg/volume/azure_file/azure_file_test.go index 7efa11c4884..14b95597ab5 100644 --- a/pkg/volume/azure_file/azure_file_test.go +++ b/pkg/volume/azure_file/azure_file_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/azure_file/azure_provision.go b/pkg/volume/azure_file/azure_provision.go index 0f90b6418cf..64b95712a1d 100644 --- a/pkg/volume/azure_file/azure_provision.go +++ b/pkg/volume/azure_file/azure_provision.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/volume/azure_file/azure_util.go b/pkg/volume/azure_file/azure_util.go index 986107cae87..3407a20a045 100644 --- a/pkg/volume/azure_file/azure_util.go +++ b/pkg/volume/azure_file/azure_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/cinder/attacher.go b/pkg/volume/cinder/attacher.go index 9abbfa8b441..d7ddb29dc1e 100644 --- a/pkg/volume/cinder/attacher.go +++ b/pkg/volume/cinder/attacher.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/cinder/attacher_test.go b/pkg/volume/cinder/attacher_test.go index 7b444d84667..a2a678f4a6e 100644 --- a/pkg/volume/cinder/attacher_test.go +++ b/pkg/volume/cinder/attacher_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/cinder/cinder.go b/pkg/volume/cinder/cinder.go index b7f9d386653..d6f7a517e3f 100644 --- a/pkg/volume/cinder/cinder.go +++ b/pkg/volume/cinder/cinder.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/pkg/volume/cinder/cinder_block.go b/pkg/volume/cinder/cinder_block.go index 0938c99f7d7..c03310aa7a4 100644 --- a/pkg/volume/cinder/cinder_block.go +++ b/pkg/volume/cinder/cinder_block.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/cinder/cinder_block_test.go b/pkg/volume/cinder/cinder_block_test.go index 8da1c6ee463..3f9dbe6b999 100644 --- a/pkg/volume/cinder/cinder_block_test.go +++ b/pkg/volume/cinder/cinder_block_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/cinder/cinder_test.go b/pkg/volume/cinder/cinder_test.go index 9dc710e4076..ec1dbee7118 100644 --- a/pkg/volume/cinder/cinder_test.go +++ b/pkg/volume/cinder/cinder_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/pkg/volume/cinder/cinder_util.go b/pkg/volume/cinder/cinder_util.go index 7c461473178..60092dfc52a 100644 --- a/pkg/volume/cinder/cinder_util.go +++ b/pkg/volume/cinder/cinder_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/pkg/volume/gcepd/attacher.go b/pkg/volume/gcepd/attacher.go index a685b89a599..9d67f67f584 100644 --- a/pkg/volume/gcepd/attacher.go +++ b/pkg/volume/gcepd/attacher.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -27,7 +29,7 @@ import ( "strconv" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog" diff --git a/pkg/volume/gcepd/attacher_test.go b/pkg/volume/gcepd/attacher_test.go index 729be7ab3b7..43a7126ae74 100644 --- a/pkg/volume/gcepd/attacher_test.go +++ b/pkg/volume/gcepd/attacher_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "fmt" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" @@ -29,9 +31,10 @@ import ( "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" + "strings" + "k8s.io/apimachinery/pkg/types" "k8s.io/klog" - "strings" ) func TestGetDeviceName_Volume(t *testing.T) { diff --git a/pkg/volume/gcepd/gce_pd.go b/pkg/volume/gcepd/gce_pd.go index 2f459bf8304..d8b43e9ceba 100644 --- a/pkg/volume/gcepd/gce_pd.go +++ b/pkg/volume/gcepd/gce_pd.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -25,7 +27,7 @@ import ( "strconv" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/volume/gcepd/gce_pd_block.go b/pkg/volume/gcepd/gce_pd_block.go index 9d3e7580b94..671f5d7178d 100644 --- a/pkg/volume/gcepd/gce_pd_block.go +++ b/pkg/volume/gcepd/gce_pd_block.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "path/filepath" "strconv" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/klog" "k8s.io/kubernetes/pkg/util/mount" diff --git a/pkg/volume/gcepd/gce_pd_block_test.go b/pkg/volume/gcepd/gce_pd_block_test.go index ee61ec4d497..6f992fbe075 100644 --- a/pkg/volume/gcepd/gce_pd_block_test.go +++ b/pkg/volume/gcepd/gce_pd_block_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "path/filepath" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utiltesting "k8s.io/client-go/util/testing" diff --git a/pkg/volume/gcepd/gce_pd_test.go b/pkg/volume/gcepd/gce_pd_test.go index 479a5a7b96e..e2bd930d555 100644 --- a/pkg/volume/gcepd/gce_pd_test.go +++ b/pkg/volume/gcepd/gce_pd_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -24,7 +26,7 @@ import ( "sort" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/fake" diff --git a/pkg/volume/gcepd/gce_util.go b/pkg/volume/gcepd/gce_util.go index adc1ef4e987..146b208001d 100644 --- a/pkg/volume/gcepd/gce_util.go +++ b/pkg/volume/gcepd/gce_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( "strings" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" cloudvolume "k8s.io/cloud-provider/volume" diff --git a/pkg/volume/gcepd/gce_util_test.go b/pkg/volume/gcepd/gce_util_test.go index 43040e26e59..ec9445d7a84 100644 --- a/pkg/volume/gcepd/gce_util_test.go +++ b/pkg/volume/gcepd/gce_util_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/BUILD b/pkg/volume/vsphere_volume/BUILD index 1263202752d..fa80590cefa 100644 --- a/pkg/volume/vsphere_volume/BUILD +++ b/pkg/volume/vsphere_volume/BUILD @@ -10,6 +10,7 @@ go_library( name = "go_default_library", srcs = [ "attacher.go", + "doc.go", "vsphere_volume.go", "vsphere_volume_block.go", "vsphere_volume_util.go", diff --git a/pkg/volume/vsphere_volume/attacher.go b/pkg/volume/vsphere_volume/attacher.go index 8a9363253f9..d60e0cda133 100644 --- a/pkg/volume/vsphere_volume/attacher.go +++ b/pkg/volume/vsphere_volume/attacher.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/attacher_test.go b/pkg/volume/vsphere_volume/attacher_test.go index b7d453588bb..35bc112a856 100644 --- a/pkg/volume/vsphere_volume/attacher_test.go +++ b/pkg/volume/vsphere_volume/attacher_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/doc.go b/pkg/volume/vsphere_volume/doc.go new file mode 100644 index 00000000000..63a309655c9 --- /dev/null +++ b/pkg/volume/vsphere_volume/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package vsphere_volume diff --git a/pkg/volume/vsphere_volume/vsphere_volume.go b/pkg/volume/vsphere_volume/vsphere_volume.go index fc0f4291bcd..198fd7c65fb 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/pkg/volume/vsphere_volume/vsphere_volume.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_block.go b/pkg/volume/vsphere_volume/vsphere_volume_block.go index c7b8e57701f..b660cd3cd4d 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_block.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_block.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_block_test.go b/pkg/volume/vsphere_volume/vsphere_volume_block_test.go index 008bf483988..941202e84a8 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_block_test.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_block_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_test.go b/pkg/volume/vsphere_volume/vsphere_volume_test.go index e4b5ca69847..a881682edc2 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_test.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_util.go b/pkg/volume/vsphere_volume/vsphere_volume_util.go index 049f5aff566..fe15ddfeae5 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_util.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/BUILD b/staging/src/k8s.io/legacy-cloud-providers/aws/BUILD index f12856f1f7d..0a6eae57a71 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/BUILD +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/BUILD @@ -17,6 +17,7 @@ go_library( "aws_routes.go", "aws_utils.go", "device_allocator.go", + "doc.go", "instances.go", "log_handler.go", "retry_handler.go", diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go index 513d9c2d47c..3fc5cdcab65 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go index 844a3a0c0af..05a2ad6c00e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_fakes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go index 6c4c59b039e..c97c96ed6f0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go index bdec204e58e..06374699ec9 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer_test.go index 0c4214af5d3..a437e3d3ad0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go index bb7958f04f0..16d97e1e636 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_metrics.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_routes.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_routes.go index 36e6696f2ca..3c37a12928d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_routes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_routes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go index a3cf55f2930..b7a919a720e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_utils.go b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_utils.go index bd373d64e58..27ce55a92c6 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/aws_utils.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/aws_utils.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator.go b/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator.go index ae5b0275773..084962b8838 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator_test.go index 5c45dcbf660..8eb81c08f2a 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/device_allocator_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/doc.go b/staging/src/k8s.io/legacy-cloud-providers/aws/doc.go new file mode 100644 index 00000000000..94cbbd1fc88 --- /dev/null +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package aws diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/instances.go b/staging/src/k8s.io/legacy-cloud-providers/aws/instances.go index e18d559b5bb..53f2939d7cd 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/instances.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/instances.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/instances_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/instances_test.go index d80d70b2364..e2a31310c96 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/instances_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/instances_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/log_handler.go b/staging/src/k8s.io/legacy-cloud-providers/aws/log_handler.go index 9328fd284ac..15c13e11e3e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/log_handler.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/log_handler.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler.go b/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler.go index 0fe6c2a5753..ddb1d0061b3 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler_test.go index 27b18c6005a..4c5e9b37967 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/sets_ippermissions.go b/staging/src/k8s.io/legacy-cloud-providers/aws/sets_ippermissions.go index 201b8ac9cf0..fc56ad45f7e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/sets_ippermissions.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/sets_ippermissions.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/tags.go b/staging/src/k8s.io/legacy-cloud-providers/aws/tags.go index bd537db7a41..b5509c042f2 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/tags.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/tags.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/tags_test.go b/staging/src/k8s.io/legacy-cloud-providers/aws/tags_test.go index 125f4b2b3fb..66e850341f9 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/tags_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/tags_test.go @@ -1,3 +1,5 @@ +// +build !nolegacyroviders + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/aws/volumes.go b/staging/src/k8s.io/legacy-cloud-providers/aws/volumes.go index 74a4d577c7d..099a377a2fa 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/aws/volumes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/aws/volumes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD b/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD index 5b8745c01d7..b6a2178520a 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD @@ -34,6 +34,7 @@ go_library( "azure_vmss_cache.go", "azure_wrap.go", "azure_zones.go", + "doc.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure", importpath = "k8s.io/legacy-cloud-providers/azure", diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go index 746d8db32af..81c586d03cb 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff.go index 9d4a35a0f24..eeefe41c005 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff_test.go index c14ace656f2..d2bb3e1ba13 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_backoff_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go index 91b02a574ae..58114416258 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache.go index ac959515a84..90bc7e163ad 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache_test.go index 574d2cb119b..12a33a14125 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_cache_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go index 30c2d13df56..a273776ca62 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config.go index 9ef26eab802..7f094e47e0e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config_test.go index 101d97be86d..8d713595f1d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_config_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go index 27ec48c3319..10518b05e2a 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go index 421a84402b7..32e6da6bd2c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go index 5d94831d23b..7490d93fcf4 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard_test.go index 6624489853d..630a6eb9473 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_standard_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go index daceb25d398..5115d8043ec 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go index 66946d88f0e..659ffa522bf 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_file.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_file.go index 08e7e7d280a..bc4106d2fc7 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_file.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_file.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go index 419c1b9f1e0..187e77f679f 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go index 3242b143f6d..ae37614dc82 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances_test.go index 696722cc208..bf17e63473c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go index de5f179f01e..19529177ced 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer_test.go index 5b434e35231..22284569ba0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go index bfe222ff9ca..ebbae1da8d0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go index 7eddafab9ff..3a4ce99ff71 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics_test.go index 7033e6a7be4..286208e5e46 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_metrics_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes.go index 2ed54d78322..028bb445d03 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes_test.go index ad12a002025..c98bd67912e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_routes_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go index 84c0c82295f..da58cd43220 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard_test.go index 32447fa9cb9..014854cffe8 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go index aec80c53830..4fa273756f1 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go index 0369b06b642..ae912ae8f55 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go index 6d7fdc8e4f8..890ce4988b5 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go index b4aa29634df..d57b43be06b 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_test.go index 8e402aee3d5..e7005279d2f 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go index 8cfdd34f1aa..26b6e1292c8 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go index 417564b4c5e..3a39b0c179f 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go index 172d06751f9..a7ef5a5ff19 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache_test.go index b6609a6a2ad..bf70b4ddd4e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_test.go index 60cdde41c50..7a6ee56baec 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap.go index 242ab96574f..5da34a1f407 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap_test.go index a3786c27631..ca19d71de6e 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_wrap_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones.go index 37f5ac40d33..e5c3c889058 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones_test.go index f837bb58b9e..62dec7781e5 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_zones_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/doc.go b/staging/src/k8s.io/legacy-cloud-providers/azure/doc.go new file mode 100644 index 00000000000..55dd87189f0 --- /dev/null +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package azure diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go index e98f785f9c1..db55a7ca379 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go index 7674e36df60..82466ea3fc5 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager_test.go index 48a5fcedd96..77e76cae49c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_address_manager_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_addresses.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_addresses.go index 08ef981157e..b161a498652 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_addresses.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_addresses.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_alpha.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_alpha.go index efb57c0abd5..9467fa0039f 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_alpha.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_alpha.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations.go index a9cab8f366f..e03d532ce84 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations_test.go index 049b2bd545d..b1e69be6e93 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_annotations_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_backendservice.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_backendservice.go index aa0f52d212b..3aca49cd835 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_backendservice.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_backendservice.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_cert.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_cert.go index 8d9481945c0..7350210acbc 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_cert.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_cert.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go index 2f40167788d..b2e2a1deaf9 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusters.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusters.go index 379f5396a25..f313b3bac1c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusters.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_clusters.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks.go index c64e66cd1a0..ba18584fea8 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks_test.go index 27531cb8098..413c9d32529 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_disks_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_fake.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_fake.go index 2394cb47333..a2ea59f8b32 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_fake.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_fake.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_firewall.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_firewall.go index d8b2ae749f3..357f85d1fb2 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_firewall.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_firewall.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go index af12aa47c2b..7e4b1e34eea 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go index 7572fd7deb6..7bb222b2941 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -26,7 +28,7 @@ import ( "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilversion "k8s.io/apimachinery/pkg/util/version" ) diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks_test.go index cd7b36a4f7a..efc84c825c9 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_healthchecks_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go index 8fbdf8ae55d..a1dad3713d1 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go index 5cd2679c66b..acb18ddae12 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_instances.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go index 43e1ccab9cf..7097ddd5a33 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go index 7bc1ea1d1eb..4ef5d52723d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go index 1d5759f1629..f9ff6853ac1 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external_test.go index 07b3b8830e8..af1ce6f0357 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go index 4ed2c2f777d..80690184ae6 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal_test.go index 2e56bb65d17..0f1336d2b69 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_naming.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_naming.go index f7c2e0ce289..07aebb39155 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_naming.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_naming.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_test.go index 7d7224892c1..8935389faef 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_utils_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_utils_test.go index e46ec019425..e695b621bd9 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_utils_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_utils_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_networkendpointgroup.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_networkendpointgroup.go index 23503d2e007..4ea9fc5a347 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_networkendpointgroup.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_networkendpointgroup.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_routes.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_routes.go index b75bdc745e0..d78f6dc8840 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_routes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_routes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_securitypolicy.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_securitypolicy.go index bfb2cb96ebe..10e876de71c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_securitypolicy.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_securitypolicy.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetpool.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetpool.go index 8f2f2cdff1b..6d5d55e0d03 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetpool.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetpool.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetproxy.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetproxy.go index 1744e88e86a..7c28d8fc4db 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetproxy.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_targetproxy.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_test.go index 627c3c50dcc..9aa640334cb 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_tpu.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_tpu.go index ff4217eb18f..61d35592054 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_tpu.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_tpu.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_urlmap.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_urlmap.go index 2ea04e4a2c4..f2bdda1cba0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_urlmap.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_urlmap.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util.go index 3b1d5353a4f..a871c54d5dd 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util_test.go index bd21e26f6b4..ce25fcdc2a4 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_util_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go index 0862d6dea9f..4c5a6d0df6a 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/metrics.go b/staging/src/k8s.io/legacy-cloud-providers/gce/metrics.go index 22f1c2dde6f..ef56b869242 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/metrics.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/metrics.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/metrics_test.go b/staging/src/k8s.io/legacy-cloud-providers/gce/metrics_test.go index 89fde2ac4b6..25ab7c10435 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/metrics_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/metrics_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/support.go b/staging/src/k8s.io/legacy-cloud-providers/gce/support.go index 9ad04439780..5413e78151d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/support.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/support.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go b/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go index e8434bd2a0c..d539c8f3cd5 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/token_source.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/BUILD b/staging/src/k8s.io/legacy-cloud-providers/vsphere/BUILD index 24073fd8fbe..b8a0c1a773c 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/BUILD +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/BUILD @@ -10,6 +10,7 @@ go_library( name = "go_default_library", srcs = [ "credentialmanager.go", + "doc.go", "nodemanager.go", "vsphere.go", "vsphere_util.go", diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go index 5a6dadb904c..64db83926fc 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -19,13 +21,14 @@ package vsphere import ( "errors" "fmt" - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/client-go/listers/core/v1" - "k8s.io/klog" "net/http" "strings" "sync" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/client-go/listers/core/v1" + "k8s.io/klog" ) // Error Messages diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager_test.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager_test.go index b148daa685f..d8ec6ed5fdf 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/credentialmanager_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/doc.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/doc.go new file mode 100644 index 00000000000..12c287753c6 --- /dev/null +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/doc.go @@ -0,0 +1,17 @@ +/* +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. +*/ + +package vsphere diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go index ac922a2e80d..def53a99028 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( "sync" "github.com/vmware/govmomi/object" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" k8stypes "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" "k8s.io/klog" diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go index d7289df2990..6798ec5c757 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_test.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_test.go index ca66df3f08e..5c95c9e43d0 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go index db000e0af8c..795f1632afd 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_linux.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_linux.go index b8dd5a3a4ef..772d46e8b42 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_linux.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_linux.go @@ -1,3 +1,4 @@ +// +build !providerless // +build linux /* diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_test.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_test.go index 4e34b0c7776..3ddb478825d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_test.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_unsupported.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_unsupported.go index d812a063bce..0d691f3c540 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_unsupported.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_unsupported.go @@ -1,3 +1,4 @@ +// +build !providerless // +build !windows,!linux /* diff --git a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go index 4ef732654ed..b828902b9ea 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go +++ b/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go @@ -1,3 +1,4 @@ +// +build !providerless // +build windows /*