2014-11-23 15:47:25 +00:00
|
|
|
/*
|
2015-05-01 16:19:44 +00:00
|
|
|
Copyright 2014 The Kubernetes Authors All rights reserved.
|
2014-11-23 15:47:25 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2015-02-07 21:30:53 +00:00
|
|
|
package app
|
2014-11-23 15:47:25 +00:00
|
|
|
|
|
|
|
// This file exists to force the desired plugin implementations to be linked.
|
|
|
|
import (
|
|
|
|
// Credential providers
|
2015-08-05 22:03:47 +00:00
|
|
|
_ "k8s.io/kubernetes/pkg/credentialprovider/gcp"
|
2015-03-19 23:14:13 +00:00
|
|
|
// Network plugins
|
2015-08-05 22:03:47 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/network"
|
2015-09-09 21:00:41 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/network/cni"
|
2015-08-05 22:03:47 +00:00
|
|
|
"k8s.io/kubernetes/pkg/kubelet/network/exec"
|
2014-11-23 15:47:25 +00:00
|
|
|
// Volume plugins
|
2015-08-05 22:03:47 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/aws_ebs"
|
2015-04-09 18:05:24 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/cephfs"
|
2015-04-10 16:54:01 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/cinder"
|
2015-02-20 05:36:23 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/downwardapi"
|
2015-08-05 22:03:47 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/empty_dir"
|
2015-08-11 15:19:29 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/fc"
|
2015-09-30 18:31:53 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/flexvolume"
|
2015-09-25 19:22:23 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/flocker"
|
2015-08-05 22:03:47 +00:00
|
|
|
"k8s.io/kubernetes/pkg/volume/gce_pd"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/git_repo"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/glusterfs"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/host_path"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/iscsi"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/nfs"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/persistent_claim"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/rbd"
|
|
|
|
"k8s.io/kubernetes/pkg/volume/secret"
|
2015-03-23 22:31:13 +00:00
|
|
|
//Cloud providers
|
2015-08-12 05:36:51 +00:00
|
|
|
_ "k8s.io/kubernetes/pkg/cloudprovider/providers"
|
2014-11-23 15:47:25 +00:00
|
|
|
)
|
|
|
|
|
2015-02-02 21:30:31 +00:00
|
|
|
// ProbeVolumePlugins collects all volume plugins into an easy to use list.
|
2015-09-30 18:31:53 +00:00
|
|
|
// PluginDir specifies the directory to search for additional third party
|
|
|
|
// volume plugins.
|
|
|
|
func ProbeVolumePlugins(pluginDir string) []volume.VolumePlugin {
|
2015-03-19 05:18:31 +00:00
|
|
|
allPlugins := []volume.VolumePlugin{}
|
2014-11-23 15:47:25 +00:00
|
|
|
|
|
|
|
// The list of plugins to probe is decided by the kubelet binary, not
|
|
|
|
// by dynamic linking or other "magic". Plugins will be analyzed and
|
|
|
|
// initialized later.
|
2015-08-31 13:44:37 +00:00
|
|
|
//
|
|
|
|
// 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
|
2015-04-09 13:40:48 +00:00
|
|
|
allPlugins = append(allPlugins, aws_ebs.ProbeVolumePlugins()...)
|
2014-11-23 15:47:25 +00:00
|
|
|
allPlugins = append(allPlugins, empty_dir.ProbeVolumePlugins()...)
|
|
|
|
allPlugins = append(allPlugins, gce_pd.ProbeVolumePlugins()...)
|
|
|
|
allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...)
|
2015-08-31 13:44:37 +00:00
|
|
|
allPlugins = append(allPlugins, host_path.ProbeVolumePlugins(volume.VolumeConfig{})...)
|
|
|
|
allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(volume.VolumeConfig{})...)
|
2015-03-19 05:18:31 +00:00
|
|
|
allPlugins = append(allPlugins, secret.ProbeVolumePlugins()...)
|
2015-03-13 21:31:13 +00:00
|
|
|
allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...)
|
2015-03-26 18:53:21 +00:00
|
|
|
allPlugins = append(allPlugins, glusterfs.ProbeVolumePlugins()...)
|
2015-04-14 20:15:42 +00:00
|
|
|
allPlugins = append(allPlugins, persistent_claim.ProbeVolumePlugins()...)
|
2015-04-07 17:22:23 +00:00
|
|
|
allPlugins = append(allPlugins, rbd.ProbeVolumePlugins()...)
|
2015-04-10 16:54:01 +00:00
|
|
|
allPlugins = append(allPlugins, cinder.ProbeVolumePlugins()...)
|
2015-04-09 18:05:24 +00:00
|
|
|
allPlugins = append(allPlugins, cephfs.ProbeVolumePlugins()...)
|
2015-02-20 05:36:23 +00:00
|
|
|
allPlugins = append(allPlugins, downwardapi.ProbeVolumePlugins()...)
|
2015-08-11 15:19:29 +00:00
|
|
|
allPlugins = append(allPlugins, fc.ProbeVolumePlugins()...)
|
2015-09-25 19:22:23 +00:00
|
|
|
allPlugins = append(allPlugins, flocker.ProbeVolumePlugins()...)
|
2015-09-30 18:31:53 +00:00
|
|
|
allPlugins = append(allPlugins, flexvolume.ProbeVolumePlugins(pluginDir)...)
|
|
|
|
|
2014-11-23 15:47:25 +00:00
|
|
|
return allPlugins
|
|
|
|
}
|
2015-03-19 23:14:13 +00:00
|
|
|
|
|
|
|
// ProbeNetworkPlugins collects all compiled-in plugins
|
2015-07-01 18:53:42 +00:00
|
|
|
func ProbeNetworkPlugins(pluginDir string) []network.NetworkPlugin {
|
2015-03-19 23:14:13 +00:00
|
|
|
allPlugins := []network.NetworkPlugin{}
|
|
|
|
|
|
|
|
// for each existing plugin, add to the list
|
2015-07-01 18:53:42 +00:00
|
|
|
allPlugins = append(allPlugins, exec.ProbeNetworkPlugins(pluginDir)...)
|
2015-09-09 21:00:41 +00:00
|
|
|
allPlugins = append(allPlugins, cni.ProbeNetworkPlugins(pluginDir)...)
|
2015-03-19 23:14:13 +00:00
|
|
|
|
|
|
|
return allPlugins
|
|
|
|
}
|