Documentation ¶
Index ¶
- func FromSourceRegionZone(ctx context.Context, m Mapper, kubeCli kubernetes.Interface, ...) ([]string, error)
- func GetReadySchedulableNodes(cli kubernetes.Interface) ([]corev1.Node, error)
- func NodeZonesAndRegion(ctx context.Context, cli kubernetes.Interface) (map[string]struct{}, string, error)
- func SanitizeAvailableZones(availableZones map[string]struct{}, validZoneNames []string) map[string]struct{}
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromSourceRegionZone ¶
func FromSourceRegionZone(ctx context.Context, m Mapper, kubeCli kubernetes.Interface, sourceRegion string, sourceZones ...string) ([]string, error)
FromSourceRegionZone gets the zones from the given region and sourceZones It will return a minimum of 1 and a maximum of zones equal to the length of sourceZones If no zones are found it will return an error. Depending on the length of the slice returned, the blockstorage providers will decide if a regional volume or a zonal volume should be created.
func GetReadySchedulableNodes ¶
func GetReadySchedulableNodes(cli kubernetes.Interface) ([]corev1.Node, error)
GetReadySchedulableNodes addresses the common use case of getting nodes you can do work on. 1) Needs to be schedulable. 2) Needs to be ready. Derived from "k8s.io/kubernetes/test/e2e/framework/node" TODO: check for taints as well
func NodeZonesAndRegion ¶
func NodeZonesAndRegion(ctx context.Context, cli kubernetes.Interface) (map[string]struct{}, string, error)
NodeZonesAndRegion returns cloud provider failure-domain region and zones as reported by K8s
func SanitizeAvailableZones ¶
func SanitizeAvailableZones(availableZones map[string]struct{}, validZoneNames []string) map[string]struct{}
SanitizeAvailableZones validates and updates a map of zones against a list of valid zone names