utils

package
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func GetNodeInternalIP(node corev1.Node) (string, error)

GetNodeInternalIP gets a node's internal IP address

func GetTestNodes

func GetTestNodes(f *framework.Framework, testerNodeName string) ([]corev1.Node, error)

GetTestNodes gets the nodes that are not running the tests TODO handle node status

func GetTesterPodNodeName

func GetTesterPodNodeName(f *framework.Framework, nsName string, podName string) (string, error)

GetTesterPodNodeName gets the node name in which the pod runs on

func NodeCoreDNSCount

func NodeCoreDNSCount(f *framework.Framework, nodeName string) (int, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL