Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ResourcesCell provides a set of handles to Kubernetes resources used throughout the // agent. 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. ResourcesCell = cell.Module( "k8s-resources", "Agent Kubernetes resources", cell.Provide( k8s.ServiceResource, k8s.EndpointsResource, func(lc hive.Lifecycle, cs client.Clientset) (LocalNodeResource, error) { return k8s.NodeResource( lc, cs, func(opts *metav1.ListOptions) { opts.FieldSelector = fields.ParseSelectorOrDie("metadata.name=" + nodeTypes.GetName()).String() }, ) }, func(lc hive.Lifecycle, cs client.Clientset) (LocalCiliumNodeResource, error) { return k8s.CiliumNodeResource( lc, cs, func(opts *metav1.ListOptions) { opts.FieldSelector = fields.ParseSelectorOrDie("metadata.name=" + nodeTypes.GetName()).String() }, ) }, func(lc hive.Lifecycle, cs client.Clientset) (LocalPodResource, error) { return k8s.PodResource( lc, cs, func(opts *metav1.ListOptions) { opts.FieldSelector = fields.ParseSelectorOrDie("spec.nodeName=" + nodeTypes.GetName()).String() }, ) }, k8s.NamespaceResource, k8s.CiliumNetworkPolicyResource, k8s.CiliumClusterwideNetworkPolicyResource, k8s.CiliumCIDRGroupResource, ), ) )
Functions ¶
This section is empty.
Types ¶
type LocalCiliumNodeResource ¶
type LocalCiliumNodeResource resource.Resource[*cilium_api_v2.CiliumNode]
LocalCiliumNodeResource is a resource.Resource[*cilium_api_v2.Node] but one which will only stream updates for the CiliumNode object associated with the node we are currently running on.
type LocalNodeResource ¶
type LocalNodeResource resource.Resource[*slim_corev1.Node]
LocalNodeResource is a resource.Resource[*corev1.Node] but one which will only stream updates for the node object associated with the node we are currently running on.
type LocalPodResource ¶
type LocalPodResource resource.Resource[*slim_corev1.Pod]
LocalPodResource is a resource.Resource[*slim_corev1.Pod] but one which will only stream updates for pod objects scheduled on the node we are currently running on.
type Resources ¶
type Resources struct { cell.In Services resource.Resource[*slim_corev1.Service] Endpoints resource.Resource[*k8s.Endpoints] LocalNode LocalNodeResource LocalCiliumNode LocalCiliumNodeResource LocalPods LocalPodResource Namespaces resource.Resource[*slim_corev1.Namespace] CiliumNetworkPolicies resource.Resource[*cilium_api_v2.CiliumNetworkPolicy] CiliumClusterwideNetworkPolicies resource.Resource[*cilium_api_v2.CiliumClusterwideNetworkPolicy] CIDRGroups resource.Resource[*cilium_api_v2alpha1.CiliumCIDRGroup] }
Resources is a convenience struct to group all the agent k8s resources as cell constructor parameters.
Click to show internal directories.
Click to hide internal directories.