mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #80353 from BenTheElder/tags
simulate in-tree cloud provider removal with a build tag
This commit is contained in:
commit
e232921c1f
@ -10,6 +10,7 @@ go_library(
|
|||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"globalflags.go",
|
"globalflags.go",
|
||||||
|
"globalflags_providers.go",
|
||||||
"options.go",
|
"options.go",
|
||||||
"validation.go",
|
"validation.go",
|
||||||
],
|
],
|
||||||
|
@ -33,8 +33,7 @@ func AddCustomGlobalFlags(fs *pflag.FlagSet) {
|
|||||||
// Lookup flags in global flag set and re-register the values with our flagset.
|
// Lookup flags in global flag set and re-register the values with our flagset.
|
||||||
|
|
||||||
// Adds flags from k8s.io/kubernetes/pkg/cloudprovider/providers.
|
// Adds flags from k8s.io/kubernetes/pkg/cloudprovider/providers.
|
||||||
globalflag.Register(fs, "cloud-provider-gce-lb-src-cidrs")
|
registerLegacyGlobalFlags(fs)
|
||||||
fs.MarkDeprecated("cloud-provider-gce-lb-src-cidrs", "This flag will be removed once the GCE Cloud Provider is removed from kube-apiserver")
|
|
||||||
|
|
||||||
// Adds flags from k8s.io/apiserver/pkg/admission.
|
// Adds flags from k8s.io/apiserver/pkg/admission.
|
||||||
globalflag.Register(fs, "default-not-ready-toleration-seconds")
|
globalflag.Register(fs, "default-not-ready-toleration-seconds")
|
||||||
|
27
cmd/kube-apiserver/app/options/globalflags_providerless.go
Normal file
27
cmd/kube-apiserver/app/options/globalflags_providerless.go
Normal file
@ -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
|
||||||
|
}
|
30
cmd/kube-apiserver/app/options/globalflags_providers.go
Normal file
30
cmd/kube-apiserver/app/options/globalflags_providers.go
Normal file
@ -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")
|
||||||
|
}
|
@ -11,8 +11,10 @@ go_library(
|
|||||||
"cloudproviders.go",
|
"cloudproviders.go",
|
||||||
"controllermanager.go",
|
"controllermanager.go",
|
||||||
"core.go",
|
"core.go",
|
||||||
|
"flags_providers.go",
|
||||||
"import_known_versions.go",
|
"import_known_versions.go",
|
||||||
"plugins.go",
|
"plugins.go",
|
||||||
|
"plugins_providers.go",
|
||||||
"policy.go",
|
"policy.go",
|
||||||
"rbac.go",
|
"rbac.go",
|
||||||
],
|
],
|
||||||
|
@ -126,10 +126,7 @@ controller, and serviceaccounts controller.`,
|
|||||||
namedFlagSets := s.Flags(KnownControllers(), ControllersDisabledByDefault.List())
|
namedFlagSets := s.Flags(KnownControllers(), ControllersDisabledByDefault.List())
|
||||||
verflag.AddFlags(namedFlagSets.FlagSet("global"))
|
verflag.AddFlags(namedFlagSets.FlagSet("global"))
|
||||||
globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name())
|
globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name())
|
||||||
// hoist this flag from the global flagset to preserve the commandline until
|
registerLegacyGlobalFlags(namedFlagSets)
|
||||||
// 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")
|
|
||||||
for _, f := range namedFlagSets.FlagSets {
|
for _, f := range namedFlagSets.FlagSets {
|
||||||
fs.AddFlagSet(f)
|
fs.AddFlagSet(f)
|
||||||
}
|
}
|
||||||
|
27
cmd/kube-controller-manager/app/flags_providerless.go
Normal file
27
cmd/kube-controller-manager/app/flags_providerless.go
Normal file
@ -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
|
||||||
|
}
|
31
cmd/kube-controller-manager/app/flags_providers.go
Normal file
31
cmd/kube-controller-manager/app/flags_providers.go
Normal file
@ -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")
|
||||||
|
}
|
@ -31,15 +31,10 @@ import (
|
|||||||
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
||||||
// Volume plugins
|
// Volume plugins
|
||||||
"k8s.io/kubernetes/pkg/volume"
|
"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/csi"
|
||||||
"k8s.io/kubernetes/pkg/volume/fc"
|
"k8s.io/kubernetes/pkg/volume/fc"
|
||||||
"k8s.io/kubernetes/pkg/volume/flexvolume"
|
"k8s.io/kubernetes/pkg/volume/flexvolume"
|
||||||
"k8s.io/kubernetes/pkg/volume/flocker"
|
"k8s.io/kubernetes/pkg/volume/flocker"
|
||||||
"k8s.io/kubernetes/pkg/volume/gcepd"
|
|
||||||
"k8s.io/kubernetes/pkg/volume/glusterfs"
|
"k8s.io/kubernetes/pkg/volume/glusterfs"
|
||||||
"k8s.io/kubernetes/pkg/volume/hostpath"
|
"k8s.io/kubernetes/pkg/volume/hostpath"
|
||||||
"k8s.io/kubernetes/pkg/volume/iscsi"
|
"k8s.io/kubernetes/pkg/volume/iscsi"
|
||||||
@ -51,7 +46,6 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/volume/scaleio"
|
"k8s.io/kubernetes/pkg/volume/scaleio"
|
||||||
"k8s.io/kubernetes/pkg/volume/storageos"
|
"k8s.io/kubernetes/pkg/volume/storageos"
|
||||||
volumeutil "k8s.io/kubernetes/pkg/volume/util"
|
volumeutil "k8s.io/kubernetes/pkg/volume/util"
|
||||||
"k8s.io/kubernetes/pkg/volume/vsphere_volume"
|
|
||||||
|
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
|
persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
|
||||||
@ -66,12 +60,8 @@ import (
|
|||||||
func ProbeAttachableVolumePlugins() []volume.VolumePlugin {
|
func ProbeAttachableVolumePlugins() []volume.VolumePlugin {
|
||||||
allPlugins := []volume.VolumePlugin{}
|
allPlugins := []volume.VolumePlugin{}
|
||||||
|
|
||||||
allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...)
|
allPlugins = appendAttachableLegacyProviderVolumes(allPlugins)
|
||||||
allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...)
|
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, scaleio.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
||||||
@ -92,15 +82,10 @@ func GetDynamicPluginProber(config persistentvolumeconfig.VolumeConfiguration) v
|
|||||||
func ProbeExpandableVolumePlugins(config persistentvolumeconfig.VolumeConfiguration) []volume.VolumePlugin {
|
func ProbeExpandableVolumePlugins(config persistentvolumeconfig.VolumeConfiguration) []volume.VolumePlugin {
|
||||||
allPlugins := []volume.VolumePlugin{}
|
allPlugins := []volume.VolumePlugin{}
|
||||||
|
|
||||||
allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...)
|
allPlugins = appendExpandableLegacyProviderVolumes(allPlugins)
|
||||||
allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, rbd.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, scaleio.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, storageos.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
||||||
@ -146,7 +131,7 @@ func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config persiste
|
|||||||
// add rbd provisioner
|
// add rbd provisioner
|
||||||
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...)
|
allPlugins = appendLegacyProviderVolumes(allPlugins)
|
||||||
|
|
||||||
allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, portworx.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, local.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, storageos.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) {
|
if utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) {
|
||||||
allPlugins = append(allPlugins, csi.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, csi.ProbeVolumePlugins()...)
|
||||||
}
|
}
|
||||||
|
38
cmd/kube-controller-manager/app/plugins_providerless.go
Normal file
38
cmd/kube-controller-manager/app/plugins_providerless.go
Normal file
@ -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
|
||||||
|
}
|
52
cmd/kube-controller-manager/app/plugins_providers.go
Normal file
52
cmd/kube-controller-manager/app/plugins_providers.go
Normal file
@ -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
|
||||||
|
}
|
@ -33,6 +33,7 @@ go_library(
|
|||||||
"init_others.go",
|
"init_others.go",
|
||||||
"init_windows.go",
|
"init_windows.go",
|
||||||
"plugins.go",
|
"plugins.go",
|
||||||
|
"plugins_providers.go",
|
||||||
"server.go",
|
"server.go",
|
||||||
"server_linux.go",
|
"server_linux.go",
|
||||||
"server_unsupported.go",
|
"server_unsupported.go",
|
||||||
|
@ -23,13 +23,10 @@ import (
|
|||||||
_ "k8s.io/kubernetes/pkg/credentialprovider/azure"
|
_ "k8s.io/kubernetes/pkg/credentialprovider/azure"
|
||||||
_ "k8s.io/kubernetes/pkg/credentialprovider/gcp"
|
_ "k8s.io/kubernetes/pkg/credentialprovider/gcp"
|
||||||
"k8s.io/utils/exec"
|
"k8s.io/utils/exec"
|
||||||
|
|
||||||
// Volume plugins
|
// Volume plugins
|
||||||
"k8s.io/kubernetes/pkg/volume"
|
"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/cephfs"
|
||||||
"k8s.io/kubernetes/pkg/volume/cinder"
|
|
||||||
"k8s.io/kubernetes/pkg/volume/configmap"
|
"k8s.io/kubernetes/pkg/volume/configmap"
|
||||||
"k8s.io/kubernetes/pkg/volume/csi"
|
"k8s.io/kubernetes/pkg/volume/csi"
|
||||||
"k8s.io/kubernetes/pkg/volume/downwardapi"
|
"k8s.io/kubernetes/pkg/volume/downwardapi"
|
||||||
@ -37,7 +34,6 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/volume/fc"
|
"k8s.io/kubernetes/pkg/volume/fc"
|
||||||
"k8s.io/kubernetes/pkg/volume/flexvolume"
|
"k8s.io/kubernetes/pkg/volume/flexvolume"
|
||||||
"k8s.io/kubernetes/pkg/volume/flocker"
|
"k8s.io/kubernetes/pkg/volume/flocker"
|
||||||
"k8s.io/kubernetes/pkg/volume/gcepd"
|
|
||||||
"k8s.io/kubernetes/pkg/volume/git_repo"
|
"k8s.io/kubernetes/pkg/volume/git_repo"
|
||||||
"k8s.io/kubernetes/pkg/volume/glusterfs"
|
"k8s.io/kubernetes/pkg/volume/glusterfs"
|
||||||
"k8s.io/kubernetes/pkg/volume/hostpath"
|
"k8s.io/kubernetes/pkg/volume/hostpath"
|
||||||
@ -51,7 +47,6 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/volume/scaleio"
|
"k8s.io/kubernetes/pkg/volume/scaleio"
|
||||||
"k8s.io/kubernetes/pkg/volume/secret"
|
"k8s.io/kubernetes/pkg/volume/secret"
|
||||||
"k8s.io/kubernetes/pkg/volume/storageos"
|
"k8s.io/kubernetes/pkg/volume/storageos"
|
||||||
"k8s.io/kubernetes/pkg/volume/vsphere_volume"
|
|
||||||
|
|
||||||
// Cloud providers
|
// Cloud providers
|
||||||
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
||||||
@ -67,9 +62,8 @@ func ProbeVolumePlugins() []volume.VolumePlugin {
|
|||||||
//
|
//
|
||||||
// Kubelet does not currently need to configure volume plugins.
|
// 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
|
// 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, emptydir.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(volume.VolumeConfig{})...)
|
allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(volume.VolumeConfig{})...)
|
||||||
allPlugins = append(allPlugins, nfs.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, iscsi.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, quobyte.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, cephfs.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, cephfs.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, downwardapi.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, downwardapi.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, azure_file.ProbeVolumePlugins()...)
|
|
||||||
allPlugins = append(allPlugins, configmap.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, projected.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, portworx.ProbeVolumePlugins()...)
|
||||||
allPlugins = append(allPlugins, scaleio.ProbeVolumePlugins()...)
|
allPlugins = append(allPlugins, scaleio.ProbeVolumePlugins()...)
|
||||||
|
26
cmd/kubelet/app/plugins_providerless.go
Normal file
26
cmd/kubelet/app/plugins_providerless.go
Normal file
@ -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
|
||||||
|
}
|
39
cmd/kubelet/app/plugins_providers.go
Normal file
39
cmd/kubelet/app/plugins_providers.go
Normal file
@ -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
|
||||||
|
}
|
@ -4,7 +4,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = ["providers.go"],
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"providers.go",
|
||||||
|
],
|
||||||
importpath = "k8s.io/kubernetes/pkg/cloudprovider/providers",
|
importpath = "k8s.io/kubernetes/pkg/cloudprovider/providers",
|
||||||
visibility = [
|
visibility = [
|
||||||
"//cmd/cloud-controller-manager:__pkg__",
|
"//cmd/cloud-controller-manager:__pkg__",
|
||||||
|
17
pkg/cloudprovider/providers/doc.go
Normal file
17
pkg/cloudprovider/providers/doc.go
Normal file
@ -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
|
@ -9,6 +9,7 @@ load(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
"metadata.go",
|
"metadata.go",
|
||||||
"openstack.go",
|
"openstack.go",
|
||||||
"openstack_client.go",
|
"openstack_client.go",
|
||||||
|
17
pkg/cloudprovider/providers/openstack/doc.go
Normal file
17
pkg/cloudprovider/providers/openstack/doc.go
Normal file
@ -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
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -23,9 +25,9 @@ import (
|
|||||||
|
|
||||||
"github.com/gophercloud/gophercloud"
|
"github.com/gophercloud/gophercloud"
|
||||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
cloudprovider "k8s.io/cloud-provider"
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -39,7 +41,7 @@ import (
|
|||||||
"github.com/gophercloud/gophercloud/pagination"
|
"github.com/gophercloud/gophercloud/pagination"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -29,7 +31,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gophercloud/gophercloud"
|
"github.com/gophercloud/gophercloud"
|
||||||
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
|
"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"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors.
|
Copyright 2015 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ go_library(
|
|||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"doc.go",
|
"doc.go",
|
||||||
|
"legacyprovider.go",
|
||||||
"node_ipam_controller.go",
|
"node_ipam_controller.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/kubernetes/pkg/controller/nodeipam",
|
importpath = "k8s.io/kubernetes/pkg/controller/nodeipam",
|
||||||
|
@ -35,7 +35,7 @@ go_library(
|
|||||||
"adapter.go",
|
"adapter.go",
|
||||||
"cidr_allocator.go",
|
"cidr_allocator.go",
|
||||||
"cloud_cidr_allocator.go",
|
"cloud_cidr_allocator.go",
|
||||||
"controller.go",
|
"controller_legacyprovider.go",
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"range_allocator.go",
|
"range_allocator.go",
|
||||||
"timeout.go",
|
"timeout.go",
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -23,7 +25,7 @@ import (
|
|||||||
|
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ import (
|
|||||||
|
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
@ -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")
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/client-go/informers"
|
"k8s.io/client-go/informers"
|
||||||
"k8s.io/client-go/kubernetes/fake"
|
"k8s.io/client-go/kubernetes/fake"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
69
pkg/controller/nodeipam/legacyprovider.go
Normal file
69
pkg/controller/nodeipam/legacyprovider.go
Normal file
@ -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)
|
||||||
|
}
|
||||||
|
}
|
@ -28,14 +28,13 @@ import (
|
|||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
"k8s.io/client-go/tools/record"
|
"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"
|
coreinformers "k8s.io/client-go/informers/core/v1"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
corelisters "k8s.io/client-go/listers/core/v1"
|
corelisters "k8s.io/client-go/listers/core/v1"
|
||||||
cloudprovider "k8s.io/cloud-provider"
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
"k8s.io/kubernetes/pkg/controller"
|
"k8s.io/kubernetes/pkg/controller"
|
||||||
"k8s.io/kubernetes/pkg/controller/nodeipam/ipam"
|
"k8s.io/kubernetes/pkg/controller/nodeipam/ipam"
|
||||||
nodesync "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync"
|
|
||||||
"k8s.io/kubernetes/pkg/util/metrics"
|
"k8s.io/kubernetes/pkg/util/metrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -131,33 +130,7 @@ func NewNodeIpamController(
|
|||||||
|
|
||||||
// TODO: Abstract this check into a generic controller manager should run method.
|
// TODO: Abstract this check into a generic controller manager should run method.
|
||||||
if ic.allocatorType == ipam.IPAMFromClusterAllocatorType || ic.allocatorType == ipam.IPAMFromCloudAllocatorType {
|
if ic.allocatorType == ipam.IPAMFromClusterAllocatorType || ic.allocatorType == ipam.IPAMFromCloudAllocatorType {
|
||||||
cfg := &ipam.Config{
|
startLegacyIPAM(ic, nodeInformer, cloud, kubeClient, clusterCIDRs, serviceCIDR, nodeCIDRMaskSize)
|
||||||
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)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
var err error
|
var err error
|
||||||
ic.cidrAllocator, err = ipam.New(kubeClient, cloud, nodeInformer, ic.allocatorType, clusterCIDRs, ic.serviceCIDR, nodeCIDRMaskSize)
|
ic.cidrAllocator, err = ipam.New(kubeClient, cloud, nodeInformer, ic.allocatorType, clusterCIDRs, ic.serviceCIDR, nodeCIDRMaskSize)
|
||||||
|
40
pkg/controller/nodeipam/nolegacyprovider.go
Normal file
40
pkg/controller/nodeipam/nolegacyprovider.go
Normal file
@ -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")
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/kubernetes/pkg/volume"
|
"k8s.io/kubernetes/pkg/volume"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -28,7 +30,7 @@ import (
|
|||||||
|
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
"k8s.io/kubernetes/pkg/util/mount"
|
"k8s.io/kubernetes/pkg/util/mount"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
utiltesting "k8s.io/client-go/util/testing"
|
utiltesting "k8s.io/client-go/util/testing"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -26,10 +28,10 @@ import (
|
|||||||
|
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/cloud-provider"
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
volumehelpers "k8s.io/cloud-provider/volume/helpers"
|
volumehelpers "k8s.io/cloud-provider/volume/helpers"
|
||||||
"k8s.io/kubernetes/pkg/util/mount"
|
"k8s.io/kubernetes/pkg/util/mount"
|
||||||
"k8s.io/kubernetes/pkg/volume"
|
"k8s.io/kubernetes/pkg/volume"
|
||||||
|
@ -19,6 +19,7 @@ go_library(
|
|||||||
"azure_dd_max_disk_count.go",
|
"azure_dd_max_disk_count.go",
|
||||||
"azure_mounter.go",
|
"azure_mounter.go",
|
||||||
"azure_provision.go",
|
"azure_provision.go",
|
||||||
|
"doc.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/kubernetes/pkg/volume/azure_dd",
|
importpath = "k8s.io/kubernetes/pkg/volume/azure_dd",
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2019 The Kubernetes Authors.
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// +build !providerless
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// +build !providerless
|
||||||
// +build !linux,!windows
|
// +build !linux,!windows
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// +build !providerless
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2019 The Kubernetes Authors.
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors.
|
Copyright 2015 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
17
pkg/volume/azure_dd/doc.go
Normal file
17
pkg/volume/azure_dd/doc.go
Normal file
@ -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
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors.
|
Copyright 2015 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors.
|
Copyright 2015 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2015 The Kubernetes Authors.
|
Copyright 2015 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
cloudprovider "k8s.io/cloud-provider"
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
@ -29,9 +31,10 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/volume"
|
"k8s.io/kubernetes/pkg/volume"
|
||||||
volumetest "k8s.io/kubernetes/pkg/volume/testing"
|
volumetest "k8s.io/kubernetes/pkg/volume/testing"
|
||||||
|
|
||||||
|
"strings"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetDeviceName_Volume(t *testing.T) {
|
func TestGetDeviceName_Volume(t *testing.T) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
"k8s.io/kubernetes/pkg/util/mount"
|
"k8s.io/kubernetes/pkg/util/mount"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
utiltesting "k8s.io/client-go/util/testing"
|
utiltesting "k8s.io/client-go/util/testing"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/client-go/kubernetes/fake"
|
"k8s.io/client-go/kubernetes/fake"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
@ -23,7 +25,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
cloudprovider "k8s.io/cloud-provider"
|
cloudprovider "k8s.io/cloud-provider"
|
||||||
cloudvolume "k8s.io/cloud-provider/volume"
|
cloudvolume "k8s.io/cloud-provider/volume"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ go_library(
|
|||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"attacher.go",
|
"attacher.go",
|
||||||
|
"doc.go",
|
||||||
"vsphere_volume.go",
|
"vsphere_volume.go",
|
||||||
"vsphere_volume_block.go",
|
"vsphere_volume_block.go",
|
||||||
"vsphere_volume_util.go",
|
"vsphere_volume_util.go",
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
17
pkg/volume/vsphere_volume/doc.go
Normal file
17
pkg/volume/vsphere_volume/doc.go
Normal file
@ -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
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2018 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2016 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ go_library(
|
|||||||
"aws_routes.go",
|
"aws_routes.go",
|
||||||
"aws_utils.go",
|
"aws_utils.go",
|
||||||
"device_allocator.go",
|
"device_allocator.go",
|
||||||
|
"doc.go",
|
||||||
"instances.go",
|
"instances.go",
|
||||||
"log_handler.go",
|
"log_handler.go",
|
||||||
"retry_handler.go",
|
"retry_handler.go",
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2014 The Kubernetes Authors.
|
Copyright 2014 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build !providerless
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user