Documentation
¶
Index ¶
- Constants
- Variables
- func CiliumBGPClusterConfigResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2.CiliumBGPClusterConfig], error)
- func CiliumBGPNodeConfigOverrideResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2.CiliumBGPNodeConfigOverride], error)
- func CiliumEndpointResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2.CiliumEndpoint], error)
- func CiliumEndpointSliceResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2alpha1.CiliumEndpointSlice], error)
- func CiliumNodeResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2.CiliumNode], error)
- func EndpointsResource(logger *slog.Logger, lc cell.Lifecycle, cfg k8s.ConfigParams, ...) (resource.Resource[*k8s.Endpoints], error)
- func HasCEWithIdentity(cepStore resource.Store[*cilium_api_v2.CiliumEndpoint], identity string) bool
- func LBIPPoolsResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*cilium_api_v2.CiliumLoadBalancerIPPool], error)
- func PodNodeNameIndexFunc(obj any) ([]string, error)
- func PodResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, ...) (resource.Resource[*slim_corev1.Pod], error)
- type Resources
Constants ¶
View Source
const ( CiliumEndpointIndexIdentity = "identity" PodNodeNameIndex = "pod-node" )
View Source
const ServiceIndex = "service"
Variables ¶
View Source
var ( // 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. ResourcesCell = cell.Module( "k8s-resources", "Operator Kubernetes resources", cell.Config(k8s.DefaultConfig), cell.Provide(k8s.DefaultServiceWatchConfig), cell.Provide( mcsapi.ServiceExportResource, EndpointsResource, LBIPPoolsResource, k8s.CiliumIdentityResource, k8s.CiliumPodIPPoolResource, CiliumBGPClusterConfigResource, k8s.CiliumBGPAdvertisementResource, k8s.CiliumBGPPeerConfigResource, k8s.CiliumBGPNodeConfigResource, CiliumBGPNodeConfigOverrideResource, CiliumEndpointResource, CiliumEndpointSliceResource, CiliumNodeResource, PodResource, k8s.NamespaceResource, k8s.CiliumNetworkPolicyResource, k8s.CiliumClusterwideNetworkPolicyResource, ), ) )
Functions ¶
func CiliumBGPClusterConfigResource ¶ added in v1.16.0
func CiliumBGPClusterConfigResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumBGPClusterConfig], error)
func CiliumBGPNodeConfigOverrideResource ¶ added in v1.16.0
func CiliumBGPNodeConfigOverrideResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumBGPNodeConfigOverride], error)
func CiliumEndpointResource ¶ added in v1.15.0
func CiliumEndpointResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumEndpoint], error)
func CiliumEndpointSliceResource ¶ added in v1.15.0
func CiliumEndpointSliceResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2alpha1.CiliumEndpointSlice], error)
func CiliumNodeResource ¶ added in v1.16.0
func CiliumNodeResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumNode], error)
func EndpointsResource ¶ added in v1.18.0
func HasCEWithIdentity ¶ added in v1.17.0
func HasCEWithIdentity(cepStore resource.Store[*cilium_api_v2.CiliumEndpoint], identity string) bool
HasCEWithIdentity returns true or false if the Cilium Endpoint store has the given identity.
func LBIPPoolsResource ¶ added in v1.18.0
func LBIPPoolsResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*cilium_api_v2.CiliumLoadBalancerIPPool], error)
func PodNodeNameIndexFunc ¶ added in v1.15.11
podNodeNameIndexFunc indexes pods by node name.
func PodResource ¶ added in v1.15.11
func PodResource(lc cell.Lifecycle, cs client.Clientset, mp workqueue.MetricsProvider, opts ...func(*metav1.ListOptions)) (resource.Resource[*slim_corev1.Pod], error)
Types ¶
type Resources ¶
type Resources struct {
cell.In
Services resource.Resource[*slim_corev1.Service]
ServiceExports resource.Resource[*mcsapiv1alpha1.ServiceExport]
Endpoints resource.Resource[*k8s.Endpoints]
LBIPPools resource.Resource[*cilium_api_v2.CiliumLoadBalancerIPPool]
Identities resource.Resource[*cilium_api_v2.CiliumIdentity]
CiliumPodIPPools resource.Resource[*cilium_api_v2alpha1.CiliumPodIPPool]
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]
Namespaces resource.Resource[*slim_corev1.Namespace]
}
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.