Documentation ¶
Index ¶
- Constants
- Variables
- func CiliumEndpointResource(lc cell.Lifecycle, cs client.Clientset, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumEndpoint], error)
- func CiliumEndpointSliceResource(lc cell.Lifecycle, cs client.Clientset, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2alpha1.CiliumEndpointSlice], error)
- type Resources
Constants ¶
View Source
const (
CiliumEndpointIndexIdentity = "identity"
)
Variables ¶
View Source
var ErrNotACiliumEndpoint = errors.New("object is not a *cilium_api_v2.CiliumEndpoint")
View Source
var ResourcesCell = cell.Module( "k8s-resources", "Operator Kubernetes resources", cell.Config(k8s.DefaultConfig), cell.Provide( k8s.CiliumIdentityResource, CiliumEndpointResource, CiliumEndpointSliceResource, func() resource.Resource[*cilium_api_v2.CiliumNode] { return &fakeresource[*cilium_api_v2.CiliumNode]{} }, k8s.PodResource, k8s.NamespaceResource, ), )
ResourcesCell provides a set of handles to Kubernetes resources used throughout the operator. Each of the resources share a client-go informer and backing store so we only have one watch API call for each resource kind and that we maintain only one copy of each object.
See pkg/k8s/resource/resource.go for documentation on the Resource[T] type.
Functions ¶
func CiliumEndpointResource ¶
func CiliumEndpointResource(lc cell.Lifecycle, cs client.Clientset, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumEndpoint], error)
func CiliumEndpointSliceResource ¶
func CiliumEndpointSliceResource(lc cell.Lifecycle, cs client.Clientset, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2alpha1.CiliumEndpointSlice], error)
Types ¶
type Resources ¶
type Resources struct { cell.In Identities resource.Resource[*cilium_api_v2.CiliumIdentity] CiliumEndpoints resource.Resource[*cilium_api_v2.CiliumEndpoint] CiliumEndpointSlices resource.Resource[*cilium_api_v2alpha1.CiliumEndpointSlice] CiliumNodes resource.Resource[*cilium_api_v2.CiliumNode] Pods resource.Resource[*slim_corev1.Pod] }
Resources is a convenience struct to group all the operator k8s resources as cell constructor parameters.
Click to show internal directories.
Click to hide internal directories.