Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright Authors of Cilium

Index

Constants

This section is empty.

Variables

View Source
var (
	TestLbsA = map[string]string{
		"k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name": "ns",
		"k8s:io.cilium.k8s.policy.cluster":                               defaults.ClusterName,
		"k8s:io.kubernetes.pod.namespace":                                "ns",
		"key-a":                                                          "val-1"}
	TestLbsB = map[string]string{
		"k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name": "ns",
		"k8s:io.cilium.k8s.policy.cluster":                               defaults.ClusterName,
		"k8s:io.kubernetes.pod.namespace":                                "ns",
		"key-b":                                                          "val-2"}
	TestLbsC = map[string]string{
		"k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name": "ns",
		"k8s:io.cilium.k8s.policy.cluster":                               defaults.ClusterName,
		"k8s:io.kubernetes.pod.namespace":                                "ns",
		"key-c":                                                          "val-3"}
)

SanitizePodLabels adds a bare io.cilium.k8s.policy.cluster that Map2Labels folds into the prefixed key below, so both must carry the cluster name.

View Source
var (
	NodeIPs = map[string]string{
		"node1": "10.0.0.0",
		"node2": "10.0.0.1",
		"node3": "10.0.0.2",
	}
)

Functions

func CreateCESWithIDs

func CreateCESWithIDs(cesName string, ids []int64) *capi_v2a1.CiliumEndpointSlice

func CreateManagerEndpoint

func CreateManagerEndpoint(name string, identity int64, node string) capi_v2a1.CoreCiliumEndpoint

func CreateStoreEndpoint

func CreateStoreEndpoint(name string, namespace string, identity int64) *v2.CiliumEndpoint

func CreateStoreEndpointSlice

func CreateStoreEndpointSlice(name string, namespace string, endpoints []capi_v2a1.CoreCiliumEndpoint) *capi_v2a1.CiliumEndpointSlice

func CreateStoreNode added in v1.20.0

func CreateStoreNode(name string) *v2.CiliumNode

Types

This section is empty.

Jump to

Keyboard shortcuts

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