Documentation ¶
Index ¶
- Constants
- Variables
- func AddNodeLabels(ctx context.Context, nodes corev1.NodeInterface, nodeName string, ...) (*apiv1.Node, error)
- func CreateLabelSelector(key string, selector *string) string
- func ExecCmdOnPod(ctx context.Context, clientset *kubernetes.Clientset, ...) ([]byte, error)
- func ExportLogsByLabelSelector(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func GetNodeList(ctx context.Context, clientset *kubernetes.Clientset) (*corev1.NodeList, error)
- func GetNodeListByLabelSelector(ctx context.Context, clientset *kubernetes.Clientset, labelSelector string) (*corev1.NodeList, error)
- func GetPodsByNode(ctx context.Context, clientset *kubernetes.Clientset, ...) (*corev1.PodList, error)
- func GetPodsIpsByNode(ctx context.Context, clientset *kubernetes.Clientset, ...) ([]string, error)
- func HasWindowsNodes(ctx context.Context, clientset *kubernetes.Clientset) (bool, error)
- func InstallCNSDaemonset(ctx context.Context, clientset *kubernetes.Clientset, logDir string) (func() error, error)
- func InstallIPMasqAgent(ctx context.Context, clientset *kubernetes.Clientset) error
- func Int32ToPtr(i int32) *int32
- func MustCreateDaemonset(ctx context.Context, daemonsets typedappsv1.DaemonSetInterface, ...)
- func MustCreateDeployment(ctx context.Context, deployments typedappsv1.DeploymentInterface, ...)
- func MustCreateNamespace(ctx context.Context, clienset *kubernetes.Clientset, namespace string)
- func MustDeleteDaemonset(ctx context.Context, daemonsets typedappsv1.DaemonSetInterface, ...)
- func MustDeleteDeployment(ctx context.Context, deployments typedappsv1.DeploymentInterface, ...)
- func MustDeleteNamespace(ctx context.Context, clienset *kubernetes.Clientset, namespace string)
- func MustDeletePod(ctx context.Context, podI typedcorev1.PodInterface, pod corev1.Pod)
- func MustGetClientset() *kubernetes.Clientset
- func MustGetRestConfig() *rest.Config
- func MustLabelSwiftNodes(ctx context.Context, clientset *kubernetes.Clientset, ...)
- func MustParseDaemonSet(path string) appsv1.DaemonSet
- func MustParseDeployment(path string) appsv1.Deployment
- func MustRestartDaemonset(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func MustScaleDeployment(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, ...)
- func MustSetUpClusterRBAC(ctx context.Context, clientset *kubernetes.Clientset, ...) func()
- func MustSetUpRBAC(ctx context.Context, clientset *kubernetes.Clientset, ...)
- func MustSetupConfigMap(ctx context.Context, clientset *kubernetes.Clientset, configMapPath string)
- func MustUpdateReplica(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, ...)
- func NamespaceExists(ctx context.Context, clientset *kubernetes.Clientset, namespace string) (bool, error)
- func RestartCNSDaemonset(ctx context.Context, clientset *kubernetes.Clientset) error
- func WaitForDeploymentToDelete(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, ...) error
- func WaitForPodDaemonset(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func WaitForPodDeployment(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func WaitForPodsDelete(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func WaitForPodsRunning(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- type CNSScenario
Constants ¶
View Source
const ( DelegatedSubnetIDLabel = "kubernetes.azure.com/podnetwork-delegationguid" SubnetNameLabel = "kubernetes.azure.com/podnetwork-subnet" // RetryAttempts is the number of times to retry a test. RetryAttempts = 90 RetryDelay = 10 * time.Second DeleteRetryAttempts = 12 DeleteRetryDelay = 5 * time.Second )
View Source
const (
EnvInstallCNS = "INSTALL_CNS"
)
Variables ¶
Functions ¶
func AddNodeLabels ¶
func AddNodeLabels(ctx context.Context, nodes corev1.NodeInterface, nodeName string, labels map[string]string) (*apiv1.Node, error)
AddNodeLabels adds or replaces labels on a node.
func CreateLabelSelector ¶
return a label selector
func ExecCmdOnPod ¶
func GetNodeList ¶
func GetPodsByNode ¶
func GetPodsIpsByNode ¶
func HasWindowsNodes ¶
func InstallCNSDaemonset ¶
func InstallIPMasqAgent ¶
func InstallIPMasqAgent(ctx context.Context, clientset *kubernetes.Clientset) error
func Int32ToPtr ¶
func MustCreateDaemonset ¶
func MustCreateDaemonset(ctx context.Context, daemonsets typedappsv1.DaemonSetInterface, ds appsv1.DaemonSet)
func MustCreateDeployment ¶
func MustCreateDeployment(ctx context.Context, deployments typedappsv1.DeploymentInterface, d appsv1.Deployment)
func MustCreateNamespace ¶
func MustCreateNamespace(ctx context.Context, clienset *kubernetes.Clientset, namespace string)
func MustDeleteDaemonset ¶
func MustDeleteDaemonset(ctx context.Context, daemonsets typedappsv1.DaemonSetInterface, ds appsv1.DaemonSet)
func MustDeleteDeployment ¶
func MustDeleteDeployment(ctx context.Context, deployments typedappsv1.DeploymentInterface, d appsv1.Deployment)
func MustDeleteNamespace ¶
func MustDeleteNamespace(ctx context.Context, clienset *kubernetes.Clientset, namespace string)
func MustDeletePod ¶
func MustDeletePod(ctx context.Context, podI typedcorev1.PodInterface, pod corev1.Pod)
func MustGetClientset ¶
func MustGetClientset() *kubernetes.Clientset
func MustGetRestConfig ¶
func MustLabelSwiftNodes ¶
func MustLabelSwiftNodes(ctx context.Context, clientset *kubernetes.Clientset, delegatedSubnetID, delegatedSubnetName string)
func MustParseDaemonSet ¶
func MustParseDeployment ¶
func MustParseDeployment(path string) appsv1.Deployment
func MustRestartDaemonset ¶
func MustScaleDeployment ¶
func MustScaleDeployment(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, deployment appsv1.Deployment, clientset *kubernetes.Clientset, namespace, podLabelSelector string, replicas int, skipWait bool, )
func MustSetUpClusterRBAC ¶
func MustSetUpClusterRBAC(ctx context.Context, clientset *kubernetes.Clientset, clusterRolePath, clusterRoleBindingPath, serviceAccountPath string) func()
func MustSetUpRBAC ¶
func MustSetUpRBAC(ctx context.Context, clientset *kubernetes.Clientset, rolePath, roleBindingPath string)
func MustSetupConfigMap ¶
func MustSetupConfigMap(ctx context.Context, clientset *kubernetes.Clientset, configMapPath string)
func MustUpdateReplica ¶
func MustUpdateReplica(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, deploymentName string, replicas int32)
func NamespaceExists ¶
func RestartCNSDaemonset ¶
func RestartCNSDaemonset(ctx context.Context, clientset *kubernetes.Clientset) error
func WaitForDeploymentToDelete ¶
func WaitForDeploymentToDelete(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, d appsv1.Deployment) error
func WaitForPodDaemonset ¶
func WaitForPodDeployment ¶
func WaitForPodsDelete ¶
func WaitForPodsRunning ¶
Types ¶
type CNSScenario ¶
type CNSScenario string
const ( EnvInstallAzilium CNSScenario = "INSTALL_AZILIUM" EnvInstallAzureVnet CNSScenario = "INSTALL_AZURE_VNET" EnvInstallOverlay CNSScenario = "INSTALL_OVERLAY" EnvInstallAzureCNIOverlay CNSScenario = "INSTALL_AZURE_CNI_OVERLAY" EnvInstallDualStackOverlay CNSScenario = "INSTALL_DUALSTACK_OVERLAY" )
Click to show internal directories.
Click to hide internal directories.