networkpolicy

package
v0.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Integration tests for network policies

You need to be in the directory of this README to execute this tests.

Preparation

STEWARD_TEST_NAMESPACE=$(kubectl create -f - -o name <<<'{ "apiVersion": "v1", "kind": "Namespace", "metadata": { "generateName": "steward-test-networkpolicies-" } }') && \
export STEWARD_TEST_NAMESPACE=${STEWARD_TEST_NAMESPACE#*/}

Run tests

Depending on the hyperscaler you need to use diffent policies to allow the connection.

Test on AWS
cp open_policy{_aws,}.yaml
./run_test.sh
Test on GCP
cp open_policy{_gcp,}.yaml
./run_test.sh

Cleanup

# delete client
kubectl delete namespace "$STEWARD_TEST_NAMESPACE"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipelineRunNetworkClosedPolicy

func PipelineRunNetworkClosedPolicy(Namespace string, runID *api.CustomJSON) f.PipelineRunTest

PipelineRunNetworkClosedPolicy is a PipelineRunTestBuilder to build a PipelineRunTest to check network policy

func PipelineRunNetworkOpenPolicy

func PipelineRunNetworkOpenPolicy(Namespace string, runID *api.CustomJSON) f.PipelineRunTest

PipelineRunNetworkOpenPolicy is a PipelineRunTestBuilder to build a PipelineRunTest to check network policy

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL