Added case on 'terminated-but-not-yet-deleted' for Admit.

This commit is contained in:
Klaus Ma
2017-07-01 14:00:31 +08:00
parent 956acc2bd8
commit ddfa04eaac
2 changed files with 12 additions and 2 deletions

View File

@@ -729,9 +729,8 @@ func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) []v1.Secret {
return pullSecrets
}
// Returns true if pod is in the terminated state ("Failed" or "Succeeded").
// podIsTerminated returns true if pod is in the terminated state ("Failed" or "Succeeded").
func (kl *Kubelet) podIsTerminated(pod *v1.Pod) bool {
var status v1.PodStatus
// Check the cached pod status which was set after the last sync.
status, ok := kl.statusManager.GetPodStatus(pod.UID)
if !ok {