Documentation ¶
Overview ¶
Package egressgateway defines an internal representation of the Cilium Egress Policy. The structures are managed by the Manager.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePolicyConfigID ¶ added in v1.10.6
func ParsePolicyConfigID(cenp *v2alpha1.CiliumEgressNATPolicy) types.NamespacedName
ParsePolicyConfigID takes a CiliumEgressNATPolicy CR and returns only the config id
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
The egressgateway manager stores the internal data tracking policies and endpoints. It also hooks up all the callbacks to update egress bpf policy map accordingly.
func NewEgressGatewayManager ¶
func NewEgressGatewayManager(k8sCacheSyncedChecker k8sCacheSyncedChecker, identityAlocator identityCache.IdentityAllocator) *Manager
NewEgressGatewayManager returns a new Egress Gateway Manager.
func (*Manager) OnAddEgressPolicy ¶ added in v1.10.6
func (manager *Manager) OnAddEgressPolicy(config PolicyConfig)
OnAddEgressPolicy and updates the manager internal state with the policy config fields.
func (*Manager) OnDeleteEgressPolicy ¶ added in v1.10.6
func (manager *Manager) OnDeleteEgressPolicy(configID policyID)
OnDeleteEgressPolicy deletes the internal state associated with the given policy.
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.
type PolicyConfig ¶
type PolicyConfig struct {
// contains filtered or unexported fields
}
PolicyConfig is the internal representation of Cilium Egress NAT Policy.
func ParsePolicy ¶ added in v1.10.6
func ParsePolicy(cenp *v2alpha1.CiliumEgressNATPolicy) (*PolicyConfig, error)
ParsePolicy takes a CiliumEgressNATPolicy CR and converts to PolicyConfig, the internal representation of the egress nat policy