Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "policy-k8s-watcher", "Watches K8s policy related objects", cell.Invoke(startK8sPolicyWatcher), )
Cell starts the K8s policy watcher. The K8s policy watcher watches all policy related K8s resources (Kubernetes NetworkPolicy (KNP), CiliumNetworkPolicy (CNP), ClusterwideCiliumNetworkPolicy (CCNP), and CiliumCIDRGroup (CCG)), translates them to Cilium's own policy representation (api.Rules) and updates the policy repository (via PolicyManager) accordingly.
Functions ¶
This section is empty.
Types ¶
type CNPMetrics ¶ added in v1.16.6
type CNPMetrics interface { AddCNP(cec *cilium_v2.CiliumNetworkPolicy) DelCNP(cec *cilium_v2.CiliumNetworkPolicy) AddCCNP(spec *cilium_v2.CiliumNetworkPolicy) DelCCNP(spec *cilium_v2.CiliumNetworkPolicy) }
func NewCNPMetricsNoop ¶ added in v1.16.6
func NewCNPMetricsNoop() CNPMetrics
type PolicyManager ¶
type PolicyManager interface { PolicyAdd(rules api.Rules, opts *policy.AddOptions) (newRev uint64, err error) PolicyDelete(labels labels.LabelArray, opts *policy.DeleteOptions) (newRev uint64, err error) }
type PolicyWatcherParams ¶
type PolicyWatcherParams struct { cell.In Lifecycle cell.Lifecycle ClientSet client.Clientset Config *option.DaemonConfig Logger logrus.FieldLogger K8sResourceSynced *synced.Resources K8sAPIGroups *synced.APIGroups PolicyManager promise.Promise[PolicyManager] ServiceCache *k8s.ServiceCache CiliumNetworkPolicies resource.Resource[*cilium_v2.CiliumNetworkPolicy] CiliumClusterwideNetworkPolicies resource.Resource[*cilium_v2.CiliumClusterwideNetworkPolicy] CiliumCIDRGroups resource.Resource[*cilium_v2_alpha1.CiliumCIDRGroup] NetworkPolicies resource.Resource[*slim_networking_v1.NetworkPolicy] MetricsManager CNPMetrics }
Click to show internal directories.
Click to hide internal directories.