NodeStorage#
- class controller.storage.kubernetes.node.NodeStorage(api_client, logger)#
Bases:
objectStorage layer for Kubernetes node objects.
- Parameters:
api_client (
ApiClient) – Kubernetes API client.logger (
BoundLogger) – Logger to use.
Methods Summary
get_cached_images(nodes)Build map of what images are cached on each node.
is_tolerated(node, tolerations)Determine whether a pod can be placed on a node.
list(node_selector, timeout)Get data about Kubernetes nodes.
Methods Documentation
- get_cached_images(nodes)#
Build map of what images are cached on each node.
- is_tolerated(node, tolerations)#
Determine whether a pod can be placed on a node.
Evaluates the node taints against the provided tolerations and determines whether an image with those tolerations can be placed on that node. Nodes with a
PreferNoScheduletaint are still tolerated.- Parameters:
node (
V1Node) – Kubernetes node.tolerations (
list[Toleration]) – List of tolerations that the pod will have.
- Returns:
Information about whether that image can be placed on that node.
- Return type:
- async list(node_selector, timeout)#
Get data about Kubernetes nodes.