Created
October 28, 2019 02:19
-
-
Save cofyc/10d881fd2a508433303a4a556a525c92 to your computer and use it in GitHub Desktop.
kubernetes volume plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"k8s.io/kubernetes/cmd/kubelet/app" | |
"k8s.io/kubernetes/pkg/volume" | |
) | |
func main() { | |
plugins := app.ProbeVolumePlugins() | |
for _, plugin := range plugins { | |
if _, ok := plugin.(volume.AttachableVolumePlugin); ok { | |
fmt.Printf("%q implements AttachableVolumePlugin\n", plugin.GetPluginName()) | |
} else { | |
if _, ok := plugin.(volume.DeviceMountableVolumePlugin); ok { | |
fmt.Printf("%q does not implement AttachableVolumePlugin but implements DeviceMountableVolumePlugin\n", plugin.GetPluginName()) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment