Add independent cache for CSINode in scheduler

This commit is contained in:
Fabio Bertinatto
2019-07-17 09:55:06 +02:00
parent 86ebaaa023
commit 09d2cdf384
7 changed files with 31 additions and 52 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
package cache
import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
"k8s.io/kubernetes/pkg/scheduler/algorithm"
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
@@ -115,6 +115,9 @@ type Cache interface {
// GetNodeInfo returns the node object with node string.
GetNodeInfo(nodeName string) (*v1.Node, error)
// GetCSINodeInfo returns the csinode object with the given name.
GetCSINodeInfo(nodeName string) (*storagev1beta1.CSINode, error)
// Snapshot takes a snapshot on current cache
Snapshot() *Snapshot