Documentation ¶
Overview ¶
Package egressgateway defines an internal representation of the Cilium Egress Policy. The structures are managed by the Manager.
Index ¶
- func ParseCEGPConfigID(cegp *v2.CiliumEgressGatewayPolicy) types.NamespacedName
- func ParseCENPConfigID(cenp *v2alpha1.CiliumEgressNATPolicy) types.NamespacedName
- type Manager
- func (manager *Manager) OnAddEgressPolicy(config PolicyConfig)
- func (manager *Manager) OnDeleteEgressPolicy(configID policyID)
- func (manager *Manager) OnDeleteEndpoint(endpoint *k8sTypes.CiliumEndpoint)
- func (manager *Manager) OnDeleteNode(node nodeTypes.Node)
- func (manager *Manager) OnUpdateEndpoint(endpoint *k8sTypes.CiliumEndpoint)
- func (manager *Manager) OnUpdateNode(node nodeTypes.Node)
- type PolicyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCEGPConfigID ¶
func ParseCEGPConfigID(cegp *v2.CiliumEgressGatewayPolicy) types.NamespacedName
ParseCEGPConfigID takes a CiliumEgressGatewayPolicy CR and returns only the config id
func ParseCENPConfigID ¶
func ParseCENPConfigID(cenp *v2alpha1.CiliumEgressNATPolicy) types.NamespacedName
ParseCENPConfigID takes a CiliumEgressNATPolicy CR and returns only the config id
Types ¶
type Manager ¶
The egressgateway manager stores the internal data tracking the node, policy, endpoint, and lease mappings. 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 ¶
func (manager *Manager) OnAddEgressPolicy(config PolicyConfig)
OnAddEgressPolicy parses the given policy config, and updates internal state with the config fields.
func (*Manager) OnDeleteEgressPolicy ¶
func (manager *Manager) OnDeleteEgressPolicy(configID policyID)
OnDeleteEgressPolicy 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) OnDeleteNode ¶
OnDeleteNode is the event handler for node deletions.
func (*Manager) OnUpdateEndpoint ¶
func (manager *Manager) OnUpdateEndpoint(endpoint *k8sTypes.CiliumEndpoint)
OnUpdateEndpoint is the event handler for endpoint additions and updates.
func (*Manager) OnUpdateNode ¶
OnUpdateNode is the event handler for node additions and updates.
type PolicyConfig ¶
type PolicyConfig struct {
// contains filtered or unexported fields
}
PolicyConfig is the internal representation of Cilium Egress NAT Policy.
func ParseCEGP ¶
func ParseCEGP(cegp *v2.CiliumEgressGatewayPolicy) (*PolicyConfig, error)
ParseCEGP takes a CiliumEgressGatewayPolicy CR and converts to PolicyConfig, the internal representation of the egress gateway policy
func ParseCENP ¶
func ParseCENP(cenp *v2alpha1.CiliumEgressNATPolicy) (*PolicyConfig, error)
ParseCENP takes a CiliumEgressNATPolicy CR and converts to PolicyConfig, the internal representation of the egress nat policy