-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IP ranges cleanup #118
IP ranges cleanup #118
Commits on Jul 21, 2021
-
Extract the kubernetes connection related data to a struct
To preserve the existing code base, we embed the new type within the KubernetesIPAM (old type). In a follow-up commit, this new struct will be used on a separate golang binary (which doesn't require the KubernetesIPAM configuration), to provide a simple connection to the Kubernetes backend (does not support etcd). Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ffdb682 - Browse repository at this point
Copy the full SHA ffdb682View commit details -
Fow now, we only read the kubeconfig file, which is specified via the cmd line - as its only argument. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ac7507e - Browse repository at this point
Copy the full SHA ac7507eView commit details -
Generate the Kubernetes client object
Introduce a dedicated constructor in the storage pkg to create the newly created `KubernetesClient` struct. The existing `KubernetesIPAM` struct will re-use this new constructor. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7d70fb8 - Browse repository at this point
Copy the full SHA 7d70fb8View commit details -
Have IPReservation implement the Stringer interface
Follow-up commits will use this new method for debugging, which makes it simpler to track the IP to pod assignments. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for edf1bf5 - Browse repository at this point
Copy the full SHA edf1bf5View commit details -
Export find IPReservation matching ID to a func
Currently, matching the owner of the IP when deallocating the address happens only based on the containerID. In follow-up commits we will require this behavior to happen based on the pod reference attribute. This commit prepares the code base for that, by enabling the caller to inject the criteria for identifying the owner of an IP into the IP address de-allocation function. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 34acf15 - Browse repository at this point
Copy the full SHA 34acf15View commit details
Commits on Jul 22, 2021
-
ip-reconciler: find and remove orphaned IP addresses
This behavior will be encapsulated in a new struct named `ReconcileLooper`, which features methods for: - CancelContext; cancels the current execution context - FindOrphanedIPsPerPool; returns a list of the orphaned IP addresses, indexed by pool - ReconcileIPPool; receives a list of orphaned IP addresses, and cleans them up from the respective pools where they are currently allocated. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4e0aa2e - Browse repository at this point
Copy the full SHA 4e0aa2eView commit details -
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f73197 - Browse repository at this point
Copy the full SHA 8f73197View commit details -
ip-reconciler: fire up cronjob every 5 mins
The service account for whereabouts requires the ability of listing the pods on all namespaces, so it can check which ones feature orphaned IPs. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 94c6bd1 - Browse repository at this point
Copy the full SHA 94c6bd1View commit details -
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f3f64e - Browse repository at this point
Copy the full SHA 2f3f64eView commit details -
ip-reconciler: add plumbers network status entity
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 90c7617 - Browse repository at this point
Copy the full SHA 90c7617View commit details -
ip-reconciler: also account for the pods IP addresses
Only mark a pod as "alive" when the pod's annotations feature the IP being de-allocated. This makes the reconciler binary *dependent* on multus, which adds these `network-status` annotations into the pod. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8fc04e4 - Browse repository at this point
Copy the full SHA 8fc04e4View commit details -
ip-reconciler, docs: mention the reconciler in the README
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5ed98e5 - Browse repository at this point
Copy the full SHA 5ed98e5View commit details -
ip-reconciler: simplify ip looper code
By not returning an `IPReservation` entry - we now return an IP address instead - we simplify the code. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66b75ad - Browse repository at this point
Copy the full SHA 66b75adView commit details -
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0154617 - Browse repository at this point
Copy the full SHA 0154617View commit details -
Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5f160d8 - Browse repository at this point
Copy the full SHA 5f160d8View commit details -
ip-reconciler: improve efficiency
This commit changes the reconciler logic to only parse the network-status annotations of whereabouts pods - e.g. pods whose pod referecences (<namespace>/<pod name>) feature in any of the whereabouts IPPools. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d1b0bf0 - Browse repository at this point
Copy the full SHA d1b0bf0View commit details