forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
k8s: delete IPs from ipcache for no running Pods
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>
- Loading branch information
Showing
13 changed files
with
197 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.