package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
AddNamespaceLabels adds a new label to a namespace.
AddPodLabels adds new labels to a running pod.
CreatePolicy creates a policy in the given namespace.
DeleteNamespaceLabel deletes a label from a namespace (if present).
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.
NewPodString instantiates a PodString from the given namespace and name.
NewReachability instantiates a reachability.
NewTruthTable creates a new truth table with froms and tos.
NewTruthTableFromItems creates a new truth table with items.
NewWindowsModel returns a model specific to windows testing.
ProbePodToPodConnectivity runs a series of probes in kube, and records the results in `testCase.Reachability`.
ResetPodLabels resets the labels for a deployment's template.
UpdatePolicy updates a networkpolicy.
ValidateOrFail validates connectivity.
# Structs
Container is the abstract representation of what matters to network policy tests for a container; i.e.
Model defines the namespaces, deployments, services, pods, containers and associated data for network policy test cases and provides the source of truth.
Namespace is the abstract representation of what matters to network policy tests for a namespace; i.e.
Peer is used for matching pods by either or both of the pod's namespace and name.
Pod is the abstract representation of what matters to network policy tests for a pod; i.e.
ProbeJob packages the data for the input of a pod->pod connectivity probe.
ProbeJobResults packages the data for the results of a pod->pod connectivity probe.
Reachability packages the data for a cluster-wide connectivity probe.
TestCase describes the data for a netpol test.
TestPod represents an actual running pod.
TruthTable takes in n items and maintains an n x n table of booleans for each ordered pair.
# Interfaces
decouple us from k8smanager.go.