Skip to content

Commit dc58d22

Browse files
committed
add max pods, simplify warm IP pool management
1 parent babd43f commit dc58d22

File tree

3 files changed

+145
-145
lines changed

3 files changed

+145
-145
lines changed

pkg/ipamd/datastore/data_store.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,7 @@ func (ds *DataStore) isRequiredForWarmIPTarget(warmIPTarget int, eni *ENI) bool
863863
return otherWarmIPs < warmIPTarget
864864
}
865865

866-
// IsRequiredForMinimumIPTarget determines if this ENI is necessary to fulfill whatever MINIMUM_IP_TARGET is
867-
// set to.
866+
// IsRequiredForMinimumIPTarget determines if this ENI is necessary to fulfill whatever MINIMUM_IP_TARGET is set to.
868867
func (ds *DataStore) isRequiredForMinimumIPTarget(minimumIPTarget int, eni *ENI) bool {
869868
otherIPs := 0
870869
for _, other := range ds.eniPool {
@@ -885,8 +884,7 @@ func (ds *DataStore) isRequiredForMinimumIPTarget(minimumIPTarget int, eni *ENI)
885884
return otherIPs < minimumIPTarget
886885
}
887886

888-
// IsRequiredForWarmPrefixTarget determines if this ENI is necessary to fulfill whatever WARM_PREFIX_TARGET is
889-
// set to.
887+
// IsRequiredForWarmPrefixTarget determines if this ENI is necessary to fulfill whatever WARM_PREFIX_TARGET is set to.
890888
func (ds *DataStore) isRequiredForWarmPrefixTarget(warmPrefixTarget int, eni *ENI) bool {
891889
freePrefixes := 0
892890
for _, other := range ds.eniPool {
@@ -1277,7 +1275,6 @@ func (ds *DataStore) GetFreePrefixes() int {
12771275
freePrefixes++
12781276
}
12791277
}
1280-
12811278
}
12821279
return freePrefixes
12831280
}

0 commit comments

Comments
 (0)