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 DeploymentExists(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, ...) (bool, error)
- func ExecCmdOnPod(ctx context.Context, clientset *kubernetes.Clientset, ...) ([]byte, error)
- func ExportLogsByLabelSelector(ctx context.Context, clientset *kubernetes.Clientset, ...) error
- func GetDeploymentAvailableReplicas(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, ...) (int32, error)
- func GetKubeconfig() *string
- 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 GetRESTClientForMultitenantCRD(kubeconfig string) (*rest.RESTClient, error)
- func GetRESTClientForMultitenantCRDFromConfig(config *rest.Config) (*rest.RESTClient, 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, waitForReady bool) error
- func RestartKubeProxyService(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 ShortRetryAttempts = 8 ShortRetryDelay = 250 * time.Millisecond PrivilegedDaemonSetPath = "../manifests/load/privileged-daemonset-windows.yaml" PrivilegedLabelSelector = "app=privileged-daemonset" PrivilegedNamespace = "kube-system" )
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 DeploymentExists ¶ added in v1.5.18
func DeploymentExists(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, deploymentName string) (bool, error)
func ExecCmdOnPod ¶
func GetDeploymentAvailableReplicas ¶ added in v1.5.18
func GetDeploymentAvailableReplicas(ctx context.Context, deploymentsClient typedappsv1.DeploymentInterface, deploymentName string) (int32, error)
func GetKubeconfig ¶ added in v1.5.29
func GetKubeconfig() *string
func GetNodeList ¶
func GetPodsByNode ¶
func GetPodsIpsByNode ¶
func GetRESTClientForMultitenantCRD ¶ added in v1.5.29
func GetRESTClientForMultitenantCRD(kubeconfig string) (*rest.RESTClient, error)
func GetRESTClientForMultitenantCRDFromConfig ¶ added in v1.5.29
func GetRESTClientForMultitenantCRDFromConfig(config *rest.Config) (*rest.RESTClient, error)
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 RestartKubeProxyService ¶ added in v1.5.20
func RestartKubeProxyService(ctx context.Context, clientset *kubernetes.Clientset, privilegedNamespace, privilegedLabelSelector string, config *rest.Config) error
Restarts kubeproxy on windows nodes from an existing privileged daemonset
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.