Skip to content

Commit

Permalink
Reduce the wait time when checking for pods without IPs
Browse files Browse the repository at this point in the history
Related to aws#525
  • Loading branch information
Claes Mogren committed Jul 31, 2019
1 parent 3060e96 commit 6aae8a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const (
eniAttachTime = 10 * time.Second
nodeIPPoolReconcileInterval = 60 * time.Second
decreaseIPPoolInterval = 30 * time.Second
maxK8SRetries = 12
retryK8SInterval = 5 * time.Second
maxK8SRetries = 5
retryK8SInterval = 3 * time.Second

// ipReconcileCooldown is the amount of time that an IP address must wait until it can be added to the data store
// during reconciliation after being discovered on the EC2 instance metadata.
Expand Down Expand Up @@ -315,6 +315,7 @@ func (c *IPAMContext) nodeInit() error {
}

usedIPs, err := c.getLocalPodsWithRetry()
log.Debugf("getLocalPodsWithRetry() found %d used IPs.", len(usedIPs))
if err != nil {
log.Warnf("During ipamd init, failed to get Pod information from kubelet %v", err)
ipamdErrInc("nodeInitK8SGetLocalPodIPsFailed")
Expand Down

0 comments on commit 6aae8a0

Please sign in to comment.