testutils

package
v1.30.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KubeControllersUserSecret = corev1.Secret{
	TypeMeta: metav1.TypeMeta{
		Kind:       "Secret",
		APIVersion: "v1",
	},
	ObjectMeta: metav1.ObjectMeta{
		Name:      "tigera-ee-kube-controllers-elasticsearch-access",
		Namespace: common.OperatorNamespace(),
	},
	Data: map[string][]byte{
		"username": []byte("password"),
		"password": []byte("password"),
	},
}

Functions

func GetAllowTigeraGlobalPolicyFromResources added in v1.30.0

func GetAllowTigeraGlobalPolicyFromResources(name string, resources []client.Object) *v3.GlobalNetworkPolicy

func GetAllowTigeraPolicyFromResources added in v1.28.0

func GetAllowTigeraPolicyFromResources(name types.NamespacedName, resources []client.Object) *v3.NetworkPolicy

func GetExpectedGlobalPolicyFromFile added in v1.30.0

func GetExpectedGlobalPolicyFromFile(name string) *v3.GlobalNetworkPolicy

func GetExpectedPolicyFromFile added in v1.28.0

func GetExpectedPolicyFromFile(name string) *v3.NetworkPolicy

func SelectPolicyByClusterTypeAndProvider added in v1.28.0

func SelectPolicyByClusterTypeAndProvider(scenario AllowTigeraScenario,
	unmanagedNoProviderPolicy *v3.NetworkPolicy,
	unmanagedOpenshiftPolicy *v3.NetworkPolicy,
	managedNoProviderPolicy *v3.NetworkPolicy,
	managedOpenshiftPolicy *v3.NetworkPolicy,
) *v3.NetworkPolicy

SelectPolicyByClusterTypeAndProvider simply selects a variant of a policy that varies depending on cluster and provider type.

func SelectPolicyByProvider added in v1.28.0

func SelectPolicyByProvider(scenario AllowTigeraScenario, noProviderPolicy *v3.NetworkPolicy, openshiftProviderPolicy *v3.NetworkPolicy) *v3.NetworkPolicy

SelectPolicyByProvider simply selects a variant of a policy that varies depending on provider type only.

Types

type AllowTigeraScenario added in v1.28.0

type AllowTigeraScenario struct {
	ManagedCluster bool
	Openshift      bool
	DPIEnabled     bool
}

AllowTigeraScenario represents valid render cases for allow-tigera policies. Render components should test that their allow-tigera policies correctly adapt for each relevant potential case. Update if new scenarios arise.

type IPMode added in v1.30.0

type IPMode string
const (
	IPV4      IPMode = "IPV4"
	IPV6      IPMode = "IPV6"
	DualStack IPMode = "Dual-stack"
)

Jump to

Keyboard shortcuts

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