kubernetes/test/e2e/network/netpol/model.go

type Model

// NewWindowsModel returns a model specific to windows testing.
func NewWindowsModel(namespaceBaseNames []string, podNames []string, ports []int32) *Model {}

// NewModel instantiates a model based on:
// - namespaceBaseNames
// - pods
// - ports to listen on
// - protocols to listen on
// The total number of pods is the number of namespaces x the number of pods per namespace.
// The number of containers per pod is the number of ports x the number of protocols.
// The *total* number of containers is namespaces x pods x ports x protocols.
func NewModel(namespaceBaseNames []string, podNames []string, ports []int32, protocols []v1.Protocol) *Model {}

type Namespace

type Pod

// ContainerSpecs builds kubernetes container specs for the pod
func (p *Pod) ContainerSpecs() []v1.Container {}

func podNameLabelKey() string {}

// Labels returns the default labels that should be placed on a pod/deployment
// in order for it to be uniquely selectable by label selectors
func (p *Pod) Labels() map[string]string {}

// KubePod returns the kube pod (will add label selectors for windows if needed).
func (p *Pod) KubePod(namespace string) *v1.Pod {}

// QualifiedServiceAddress returns the address that can be used to access the service
func (p *Pod) QualifiedServiceAddress(namespace string, dnsDomain string) string {}

// ServiceName returns the unqualified service name
func (p *Pod) ServiceName(namespace string) string {}

// Service returns a kube service spec
func (p *Pod) Service(namespace string) *v1.Service {}

type Container

// Name returns the container name
func (c *Container) Name() string {}

// PortName returns the container port name
func (c *Container) PortName() string {}

// Spec returns the kube container spec
func (c *Container) Spec() v1.Container {}