// GetPersistentVolumeList returns a list of all Persistent Volumes in the cluster.
func GetPersistentVolumeList(client *client.Client, dsQuery *dataselect.DataSelectQuery) (*PersistentVolumeList, error) {
	log.Printf("Getting list persistent volumes")
	channels := &common.ResourceChannels{
		PersistentVolumeList: common.GetPersistentVolumeListChannel(client, 1),
	}

	return GetPersistentVolumeListFromChannels(channels, dsQuery)
}
Ejemplo n.º 2
0
// GetAdmin returns a list of all admin resources in the cluster.
func GetAdmin(client *k8sClient.Clientset) (*Admin, error) {

	log.Print("Getting admin category")
	channels := &common.ResourceChannels{
		NamespaceList:        common.GetNamespaceListChannel(client, 1),
		NodeList:             common.GetNodeListChannel(client, 1),
		PersistentVolumeList: common.GetPersistentVolumeListChannel(client, 1),
	}

	return GetAdminFromChannels(channels)
}