Documentation ¶
Overview ¶
Package redirectpolicy defines an internal representation of the Cilium Local Redirect Policy. The structures are managed by the RedirectPolicyManager.
Index ¶
- type LRPConfig
- type Manager
- func (rpm *Manager) AddRedirectPolicy(config LRPConfig) (bool, error)
- func (rpm *Manager) DeleteRedirectPolicy(config LRPConfig) error
- func (rpm *Manager) GetLRPs() []*LRPConfig
- func (rpm *Manager) OnAddPod(pod *slimcorev1.Pod)
- func (rpm *Manager) OnAddService(svcID k8s.ServiceID)
- func (rpm *Manager) OnDeletePod(pod *slimcorev1.Pod)
- func (rpm *Manager) OnDeleteService(svcID k8s.ServiceID)
- func (rpm *Manager) OnUpdatePod(pod *slimcorev1.Pod, needsReassign bool, ready bool)
- func (rpm *Manager) OnUpdatePodLocked(pod *slimcorev1.Pod, removeOld bool, upsertNew bool)
- func (rpm *Manager) RegisterGetStores(sg StoreGetter)
- func (rpm *Manager) RegisterSvcCache(cache svcCache)
- type StoreGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRPConfig ¶
type LRPConfig struct {
// contains filtered or unexported fields
}
LRPConfig is the internal representation of Cilium Local Redirect Policy.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages configurations related to Local Redirect Policies that enable redirecting traffic from the specified frontend to a set of node-local backend pods selected based on the backend configuration. To do that, it keeps track of add/delete events for resources like LRP, Pod and Service. For every local redirect policy configuration, it creates a new lb.SVCTypeLocalRedirect service with a frontend that has at least one node-local backend.
func NewRedirectPolicyManager ¶
func NewRedirectPolicyManager(svc svcManager) *Manager
func (*Manager) AddRedirectPolicy ¶
AddRedirectPolicy parses the given local redirect policy config, and updates internal state with the config fields.
func (*Manager) DeleteRedirectPolicy ¶
DeleteRedirectPolicy deletes the internal state associated with the given policy.
func (*Manager) OnAddPod ¶
func (rpm *Manager) OnAddPod(pod *slimcorev1.Pod)
func (*Manager) OnAddService ¶
OnAddService handles Kubernetes service (clusterIP type) add events, and updates the internal state for the policy config associated with the service.
func (*Manager) OnDeletePod ¶
func (rpm *Manager) OnDeletePod(pod *slimcorev1.Pod)
func (*Manager) OnDeleteService ¶
OnDeleteService handles Kubernetes service deletes, and deletes the internal state for the policy config that might be associated with the service.
func (*Manager) OnUpdatePod ¶
func (rpm *Manager) OnUpdatePod(pod *slimcorev1.Pod, needsReassign bool, ready bool)
func (*Manager) OnUpdatePodLocked ¶
func (rpm *Manager) OnUpdatePodLocked(pod *slimcorev1.Pod, removeOld bool, upsertNew bool)
func (*Manager) RegisterGetStores ¶
func (rpm *Manager) RegisterGetStores(sg StoreGetter)
func (*Manager) RegisterSvcCache ¶
func (rpm *Manager) RegisterSvcCache(cache svcCache)