Documentation ¶
Overview ¶
Package utils implements Kubernetes utilities. Used for CSI EBS driver testing.
Index ¶
- func AddAnnotationsToDaemonSet(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ...) error
- func GetExpectedNodeENIs(ctx context.Context, f *framework.Framework, internalIP string, ...) []*ec2.NetworkInterface
- func GetNodeInternalIP(node corev1.Node) (string, error)
- func GetTestNodes(f *framework.Framework, testerNodeName string) ([]corev1.Node, error)
- func GetTesterPodNodeName(f *framework.Framework, nsName string, podName string) (string, error)
- func NodeCoreDNSCount(f *framework.Framework, nodeName string) (int, error)
- func ReplaceNodeASGInstances(ctx context.Context, f *framework.Framework, nodes []corev1.Node) error
- func UpdateDaemonSetEnvVars(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ...)
- func UpdateDaemonSetLabels(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ...)
- func WaitForASGDesiredCapacity(ctx context.Context, f *framework.Framework, nodes []corev1.Node, ...) error
- func WaitForASGInstancesAndNodesReady(ctx context.Context, f *framework.Framework, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAnnotationsToDaemonSet ¶
func AddAnnotationsToDaemonSet(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ds *appsv1.DaemonSet, annotations map[string]string) error
AddAnnotationsToDaemonSet adds annotations to a daemonset
func GetExpectedNodeENIs ¶
func GetExpectedNodeENIs(ctx context.Context, f *framework.Framework, internalIP string, expectedENICount int) []*ec2.NetworkInterface
GetExpectedNodeENIs takes in the node's internal IP and waits until the expected number of ENIs are ready and returns them
func GetNodeInternalIP ¶
GetNodeInternalIP gets a node's internal IP address
func GetTestNodes ¶
GetTestNodes gets the nodes that are not running the tests TODO handle node status
func GetTesterPodNodeName ¶
GetTesterPodNodeName gets the node name in which the pod runs on
func NodeCoreDNSCount ¶
NodeCoreDNSCount returns the number of KubeDNS or CoreDNS pods running on the node
func ReplaceNodeASGInstances ¶
func ReplaceNodeASGInstances(ctx context.Context, f *framework.Framework, nodes []corev1.Node) error
ReplaceNodeASGInstances terminates instances for given nodes, waits for new instances to be ready in their autoscaling groups, and waits for the new nodes to be ready This requires an IAM policy with EC2 autoscaling:TerminateInstanceInAutoScalingGroup
func UpdateDaemonSetEnvVars ¶
func UpdateDaemonSetEnvVars(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ds *appsv1.DaemonSet, envs []corev1.EnvVar)
UpdateDaemonSetEnvVars updates a daemonset with updated environment variables
func UpdateDaemonSetLabels ¶
func UpdateDaemonSetLabels(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ds *appsv1.DaemonSet, labels map[string]string)
UpdateDaemonSetLabels updates labels for a daemonset
func WaitForASGDesiredCapacity ¶
func WaitForASGDesiredCapacity(ctx context.Context, f *framework.Framework, nodes []corev1.Node, desiredCapacity int) error
WaitForASGDesiredCapacity ensures the autoscaling groups have the requested desired capacity and the nodes become ready This requires an IAM policy with EC2 autoscaling:UpdateAutoScalingGroup to update the max size
func WaitForASGInstancesAndNodesReady ¶
func WaitForASGInstancesAndNodesReady(ctx context.Context, f *framework.Framework, describeASGsInput *autoscaling.DescribeAutoScalingGroupsInput) error
WaitForASGInstancesAndNodesReady waits for ASG instances and nodes to be ready
Types ¶
This section is empty.