Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.8] Delete Cilium Endpoints for no longer running Pods #13592

Merged
merged 2 commits into from
Oct 20, 2020

Commits on Oct 20, 2020

  1. k8s/slim: add PodPhase as part of the slim structures

    [ upstream commit 2988760 ]
    
    This field is essential to understand if the pod is still running or
    not.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    5813937 View commit details
    Browse the repository at this point in the history
  2. k8s: delete IPs from ipcache for no running Pods

    [ upstream commit b3adc4d ]
    
    In Kubernetes, a Job creates a pod which will complete with either
    the "Succeeded" or "Failed" PodPhase. Kubernetes will leave these
    Pods around until the Job is deleted by the operator. As soon the pod
    enters either one of the previously described PodPhases, Kubelet will
    send a CNI delete event to Cilium agent which will then release the
    allocated IP addresses of that pod, making the IP address available
    again.
    
    If not disabled, Cilium will create a Cilium Endpoint for each Pod in
    the cluster that has its network managed by Cilium.
    
    Cilium agent populates the ipcache with the information retrieved from
    Pods and Cilium Endpoints events, in case of duplicated information,
    ipcache will be stored with the state from Cilium Endpoints.
    
    In a unlikely case of Cilium agent not running and the Pod enters the
    "Succeeded" state, it will mean the Cilium agent will not be available
    to delete the Cilium Endpoint created for that Pod.
    
    To complement this fix, Cilium agents will also prune Cilium Endpoints
    of not running pods on start up.
    
    Signed-off-by: André Martins <andre@cilium.io>
    aanm committed Oct 20, 2020
    Configuration menu
    Copy the full SHA
    65eeb0c View commit details
    Browse the repository at this point in the history