Documentation ¶
Overview ¶
Package egresspolicy defines an internal representation of the Cilium Egress Policy. The structures are managed by the EgressPolicyManager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfigID ¶
func ParseConfigID(cenp *v2alpha1.CiliumEgressNATPolicy) types.NamespacedName
ParseConfigID takes a CiliumEgressNATPolicy CR and returns only the config id
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the internal representation of Cilium Egress NAT Policy.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
The egresspolicy manager stores the internal data tracking the policy and endpoint mappings. It also hooks up all the callbacks to update egress bpf map accordingly.
func NewEgressPolicyManager ¶
func NewEgressPolicyManager() *Manager
func (*Manager) AddEgressPolicy ¶
AddEgressPolicy parses the given policy config, and updates internal state with the config fields. returns bool indicates if policy is added, err inidates first encountered error
func (*Manager) DeleteEgressPolicy ¶
Deletes the internal state associated with the given policy, including egress eBPF map entries
func (*Manager) OnDeleteEndpoint ¶
func (manager *Manager) OnDeleteEndpoint(endpoint *k8sTypes.CiliumEndpoint)
OnDeleteEndpoint is the event handler for endpoint deletions.
func (*Manager) OnUpdateEndpoint ¶
func (manager *Manager) OnUpdateEndpoint(endpoint *k8sTypes.CiliumEndpoint)
OnUpdateEndpoint is the event handler for endpoint additions and updates.