Documentation ¶
Index ¶
- func CreateKubeClientSet() (clientset.Interface, error)
- func CreateTestingNamespace(baseName string, cs clientset.Interface) (*v1.Namespace, error)
- func DeleteNamespace(cs clientset.Interface, namespace string) error
- func DeleteNodes(cs clientset.Interface, names []string) error
- func DeletePod(cs clientset.Interface, ns string, podName string) error
- func DeletePodsInNamespace(cs clientset.Interface, ns string) error
- func DeleteService(cs clientset.Interface, ns string, serviceName string) error
- func DeleteServiceIfExists(cs clientset.Interface, ns string, serviceName string) error
- func ExtractDNSPrefix() string
- func GetAgentNodes(cs clientset.Interface) ([]v1.Node, error)
- func GetAvailableNodeCapacity(cs clientset.Interface) (resource.Quantity, error)
- func GetNextSubnetCIDR(vnet aznetwork.VirtualNetwork) (string, error)
- func GetServiceDomainName(prefix string) (ret string)
- func IsRetryableAPIError(err error) bool
- func LogPodStatus(cs clientset.Interface, ns string) error
- func Logf(format string, args ...interface{})
- func ValidateIPInCIDR(ip, cidr string) (bool, error)
- func WaitAutoScaleNodes(cs clientset.Interface, targetNodeCount int) error
- func WaitServiceExposure(cs clientset.Interface, namespace string, name string) (string, error)
- type AzureAuthConfig
- type AzureTestClient
- func (tc *AzureTestClient) CreateSecurityGroupsClient() *aznetwork.SecurityGroupsClient
- func (azureTestClient *AzureTestClient) CreateSubnet(vnet aznetwork.VirtualNetwork, subnetName *string, prefix *string) error
- func (azureTestClient *AzureTestClient) DeleteSubnet(vnetName string, subnetName string) error
- func (azureTestClient *AzureTestClient) GetClusterSecurityGroup() (ret *aznetwork.SecurityGroup, err error)
- func (azureTestClient *AzureTestClient) GetClusterVirtualNetwork() (ret aznetwork.VirtualNetwork, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKubeClientSet ¶
CreateKubeClientSet obtains the client set interface from Kubeconfig
func CreateTestingNamespace ¶
CreateTestingNamespace builds namespace for each test baseName and labels determine name of the space
func DeleteNamespace ¶
DeleteNamespace deletes the provided namespace, waits for it to be completely deleted, and then checks whether there are any pods remaining in a non-terminating state.
func DeleteNodes ¶
DeleteNodes ensures a list of nodes to be deleted
func DeletePodsInNamespace ¶
DeletePodsInNamespace deletes all pods in the namespace
func DeleteService ¶
DeleteService deletes a service
func DeleteServiceIfExists ¶
DeleteServiceIfExists deletes a service if it exists, return nil if not exists
func ExtractDNSPrefix ¶
func ExtractDNSPrefix() string
ExtractDNSPrefix obtains the cluster DNS prefix
func GetAgentNodes ¶
GetAgentNodes obtains the list of agent nodes
func GetAvailableNodeCapacity ¶
GetAvailableNodeCapacity will calculate the overall quantity of cpu requested by all running pods in all namespaces
func GetNextSubnetCIDR ¶
func GetNextSubnetCIDR(vnet aznetwork.VirtualNetwork) (string, error)
GetNextSubnetCIDR obatins a new ip address which has no overlapping with other subnet
func GetServiceDomainName ¶
GetServiceDomainName cat prefix and azure suffix
func IsRetryableAPIError ¶
IsRetryableAPIError will judge whether an error retrable or not
func LogPodStatus ¶
LogPodStatus logs the rate of pending
func ValidateIPInCIDR ¶
ValidateIPInCIDR validates whether certain ip fits CIDR
func WaitAutoScaleNodes ¶
WaitAutoScaleNodes returns nodes count after autoscaling in 30 minutes
Types ¶
type AzureAuthConfig ¶
type AzureAuthConfig struct { // The AAD Tenant ID for the Subscription that the cluster is deployed in TenantID string // The ClientID for an AAD application with RBAC access to talk to Azure RM APIs AADClientID string // The ClientSecret for an AAD application with RBAC access to talk to Azure RM APIs AADClientSecret string // The ID of the Azure Subscription that the cluster is deployed in SubscriptionID string // The Environment represents a set of endpoints for each of Azure's Clouds. Environment azure.Environment }
AzureAuthConfig holds auth related part of cloud config Only consider servicePrinciple now
type AzureTestClient ¶
type AzureTestClient struct {
// contains filtered or unexported fields
}
AzureTestClient configs Azure specific clients
func CreateAzureTestClient ¶
func CreateAzureTestClient() (*AzureTestClient, error)
CreateAzureTestClient makes a new AzureTestClient Only consider PublicCloud Environment
func (*AzureTestClient) CreateSecurityGroupsClient ¶
func (tc *AzureTestClient) CreateSecurityGroupsClient() *aznetwork.SecurityGroupsClient
CreateSecurityGroupsClient generates security group client with the same baseclient as azure test client
func (*AzureTestClient) CreateSubnet ¶
func (azureTestClient *AzureTestClient) CreateSubnet(vnet aznetwork.VirtualNetwork, subnetName *string, prefix *string) error
CreateSubnet will create a new subnet in certain virtual network
func (*AzureTestClient) DeleteSubnet ¶
func (azureTestClient *AzureTestClient) DeleteSubnet(vnetName string, subnetName string) error
DeleteSubnet delete a subnet with retry
func (*AzureTestClient) GetClusterSecurityGroup ¶
func (azureTestClient *AzureTestClient) GetClusterSecurityGroup() (ret *aznetwork.SecurityGroup, err error)
GetClusterSecurityGroup gets the only vnet of the cluster
func (*AzureTestClient) GetClusterVirtualNetwork ¶
func (azureTestClient *AzureTestClient) GetClusterVirtualNetwork() (ret aznetwork.VirtualNetwork, err error)
GetClusterVirtualNetwork gets the only vnet of the cluster