You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/ipam-des.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,6 +212,23 @@ The above complete IP recovery algorithm can ensure the correct recovery of IP a
212
212
213
213
- For the **stateless** Pod in the `Running` phase, Spiderpool will not release its IP address when the Pod's `status.podIPs` is empty. This feature can be controlled by the environment variable `SPIDERPOOL_GC_ENABLE_STATELESS_RUNNING_POD_ON_EMPTY_POD_STATUS_IPS`.
214
214
215
+
### Clean Outdated SpiderEndpoint
216
+
217
+
Spiderpool periodically scans SpiderEndpoints. If it finds that the IP allocation record for a Pod in the IP pool no longer exists, but the corresponding SpiderEndpoint object still exists, Spiderpool will reclaim that SpiderEndpoint. This feature can be enabled or disabled via the spiderpool-conf ConfigMap, and is disabled (false) by default:
218
+
219
+
```yaml
220
+
apiVersion: v1
221
+
kind: ConfigMap
222
+
metadata:
223
+
name: spiderpool-conf
224
+
namespace: spiderpool
225
+
data:
226
+
conf.yml: |
227
+
...
228
+
enableCleanOutdatedEndpoint: true
229
+
...
230
+
```
231
+
215
232
### IP Conflict Detection and Gateway Reachability Detection
216
233
217
234
For Underlay networks, IP conflicts are unacceptable as they can cause serious issues. Spiderpool supports IP conflict detection and gateway reachability detection, which were previously implemented by the coordinator plugin but could cause some potential communication problems. Now, this is handled by IPAM.
// If the statefulset application quickly experiences scaling down and up,
55
-
// check whether `Status.PodIPs` is empty to determine whether the Pod in the current K8S has completed the normal IP release to avoid releasing the wrong IP.
tracingReason:=fmt.Sprintf("the graceful deletion period of pod '%s/%s' is over, get the current pod status in Kubernetes", podEntry.Namespace, podEntry.PodName)
// If the statefulset application quickly experiences scaling down and up,
56
+
// check whether `Status.PodIPs` is empty to determine whether the Pod in the current K8S has completed the normal IP release to avoid releasing the wrong IP.
tracingReason:=fmt.Sprintf("the graceful deletion period of pod '%s/%s' is over, get the current pod status in Kubernetes", podEntry.Namespace, podEntry.PodName)
Sugar().Infof("the graceful deletion period of pod '%s/%s' is over, try to release the IP address.", podEntry.Namespace, podEntry.PodName)
79
70
} else {
80
-
// not time out
81
-
return
71
+
iflen(currentPodYaml.Status.PodIPs) ==0 {
72
+
logger.Sugar().Infof("The IP address of the Pod %v that has exceeded the grace period has been released through cmdDel, to ensure the IP is released, trigger this pod entry to gc again.", podEntry.PodName)
0 commit comments