Documentation ¶
Index ¶
- func CreateNetworksAnnotation(namespace string, nads []string) (map[string]string, error)
- func GetNADWithName(ctx context.Context, h *helper.Helper, name string, namespace string) (*networkv1.NetworkAttachmentDefinition, error)
- func GetNetworkIFName(nad string) string
- func GetNetworkStatusFromAnnotation(annotations map[string]string) ([]networkv1.NetworkStatus, error)
- func VerifyNetworkStatusFromAnnotation(ctx context.Context, helper *helper.Helper, networkAttachments []string, ...) (bool, map[string][]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNetworksAnnotation ¶
CreateNetworksAnnotation returns pod annotation for network-attachment-definition list e.g. k8s.v1.cni.cncf.io/networks: '[{"name": "internalapi", "namespace": "openstack"},{"name": "storage", "namespace": "openstack"}]'
func GetNADWithName ¶
func GetNADWithName( ctx context.Context, h *helper.Helper, name string, namespace string, ) (*networkv1.NetworkAttachmentDefinition, error)
GetNADWithName - Get network-attachment-definition with name in namespace
func GetNetworkIFName ¶
GetNetworkIFName returns the interface name base on the NAD name the interface name in Linux must not be longer then 15 chars.
func GetNetworkStatusFromAnnotation ¶
func GetNetworkStatusFromAnnotation(annotations map[string]string) ([]networkv1.NetworkStatus, error)
GetNetworkStatusFromAnnotation returns NetworkStatus list with networking details the pods are attached to
func VerifyNetworkStatusFromAnnotation ¶
func VerifyNetworkStatusFromAnnotation( ctx context.Context, helper *helper.Helper, networkAttachments []string, serviceLabels map[string]string, readyCount int32, ) (bool, map[string][]string, error)
VerifyNetworkStatusFromAnnotation - verifies if NetworkStatus annotation for the pods of a deployment, pods identified via the service label selector, matches the passed in network attachments and the number of per network IPs the ready count of the deployment. Return true if count matches with the list of IPs per network.
Types ¶
This section is empty.