kubernetes: k8s.io/kubernetes/test/e2e/network Index | Files | Directories

package network

import "k8s.io/kubernetes/test/e2e/network"

Package network are the end-to-end tests for Kubernetes networking.

Index

Package Files

dns.go dns_common.go dns_configmap.go dns_scale_records.go doc.go dual_stack.go endpointslice.go example_cluster_dns.go firewall.go fixture.go framework.go ingress.go ingress_scale.go kube_proxy.go network_policy.go network_tiers.go networking.go networking_perf.go no_snat.go proxy.go service.go service_latency.go util.go util_iperf.go

Constants

const (

    // KubeProxyLagTimeout is the maximum time a kube-proxy daemon on a node is allowed
    // to not notice a Service update, such as type=NodePort.
    // TODO: This timeout should be O(10s), observed values are O(1m), 5m is very
    // liberal. Fix tracked in #20567.
    KubeProxyLagTimeout = 5 * time.Minute

    // LoadBalancerPollTimeout is the time required by the loadbalancer to poll.
    // On average it takes ~6 minutes for a single backend to come online in GCE.
    LoadBalancerPollTimeout = 22 * time.Minute

    // AffinityTimeout is the maximum time that CheckAffinity is allowed to take; this
    // needs to be more than long enough for AffinityConfirmCount HTTP requests to
    // complete in a busy CI cluster, but shouldn't be too long since we will end up
    // waiting the entire time in the tests where affinity is not expected.
    AffinityTimeout = 2 * time.Minute

    // AffinityConfirmCount is the number of needed continuous requests to confirm that
    // affinity is enabled.
    AffinityConfirmCount = 15
)
const (

    // RespondingTimeout is how long to wait for a service to be responding.
    RespondingTimeout = 2 * time.Minute
)

func DescribeSvc Uses

func DescribeSvc(ns string)

DescribeSvc logs the output of kubectl describe svc for the given namespace

func GetHTTPContent Uses

func GetHTTPContent(host string, port int, timeout time.Duration, url string) bytes.Buffer

GetHTTPContent returns the content of the given url by HTTP.

func SIGDescribe Uses

func SIGDescribe(text string, body func()) bool

SIGDescribe annotates the test with the SIG label.

func StartServeHostnameService Uses

func StartServeHostnameService(c clientset.Interface, svc *v1.Service, ns string, replicas int) ([]string, string, error)

StartServeHostnameService creates a replication controller that serves its hostname and a service on top of it.

func StopServeHostnameService Uses

func StopServeHostnameService(clientset clientset.Interface, ns, name string) error

StopServeHostnameService stops the given service.

func TestHTTPHealthCheckNodePort Uses

func TestHTTPHealthCheckNodePort(host string, port int, request string, timeout time.Duration, expectSucceed bool, threshold int) error

TestHTTPHealthCheckNodePort tests a HTTP connection by the given request to the given host and port.

type IPerfResult Uses

type IPerfResult struct {
    // contains filtered or unexported fields
}

IPerfResult struct modelling an iperf record.... 20160314154239,172.17.0.3,34152,172.17.0.2,5001,3,0.0-10.0,33843707904,27074774092

func NewIPerf Uses

func NewIPerf(csvLine string) *IPerfResult

NewIPerf parses an IPerf CSV output line into an IPerfResult.

type IPerfResults Uses

type IPerfResults struct {
    BandwidthMap map[string]int64
}

IPerfResults is a struct that stores some IPerfResult

func (*IPerfResults) Add Uses

func (i *IPerfResults) Add(ipr *IPerfResult)

Add adds a new result to the Results struct.

func (*IPerfResults) ToTSV Uses

func (i *IPerfResults) ToTSV() string

ToTSV exports an easily readable tab delimited format of all IPerfResults.

type StrSlice Uses

type StrSlice []string

StrSlice represents a string slice

type TestFixture Uses

type TestFixture struct {
    ServiceName string
    Namespace   string
    Client      clientset.Interface

    TestID string
    Labels map[string]string

    Name  string
    Image string
    // contains filtered or unexported fields
}

TestFixture is a simple helper class to avoid too much boilerplate in tests

func NewServerTest Uses

func NewServerTest(client clientset.Interface, namespace string, serviceName string) *TestFixture

NewServerTest creates a new TestFixture for the tests.

func (*TestFixture) BuildServiceSpec Uses

func (t *TestFixture) BuildServiceSpec() *v1.Service

BuildServiceSpec builds default config for a service (which can then be changed)

func (*TestFixture) Cleanup Uses

func (t *TestFixture) Cleanup() []error

Cleanup cleans all ReplicationControllers and Services which this object holds.

func (*TestFixture) CreateRC Uses

func (t *TestFixture) CreateRC(rc *v1.ReplicationController) (*v1.ReplicationController, error)

CreateRC creates a replication controller and records it for cleanup.

func (*TestFixture) CreateService Uses

func (t *TestFixture) CreateService(service *v1.Service) (*v1.Service, error)

CreateService creates a service, and record it for cleanup

func (*TestFixture) DeleteService Uses

func (t *TestFixture) DeleteService(serviceName string) error

DeleteService deletes a service, and remove it from the cleanup list

type UDPPokeParams Uses

type UDPPokeParams struct {
    Timeout  time.Duration
    Response string
}

UDPPokeParams is a struct for UDP poke parameters.

type UDPPokeResult Uses

type UDPPokeResult struct {
    Status   UDPPokeStatus
    Error    error  // if there was any error
    Response []byte // if code != 0
}

UDPPokeResult is a struct for UDP poke result.

type UDPPokeStatus Uses

type UDPPokeStatus string

UDPPokeStatus is string for representing UDP poke status.

const (
    // UDPSuccess is UDP poke status which is success.
    UDPSuccess UDPPokeStatus = "Success"
    // UDPError is UDP poke status which is error.
    UDPError UDPPokeStatus = "UnknownError"
    // UDPTimeout is UDP poke status which is timeout.
    UDPTimeout UDPPokeStatus = "TimedOut"
    // UDPRefused is UDP poke status which is connection refused.
    UDPRefused UDPPokeStatus = "ConnectionRefused"
    // UDPBadResponse is UDP poke status which is bad response.
    UDPBadResponse UDPPokeStatus = "BadResponse"
)

Directories

PathSynopsis
scale
scale/localrun

Package network imports 69 packages (graph) and is imported by 10 packages. Updated 2020-01-27. Refresh now. Tools for package owners.