Raj Chaudhuri
c1d3107418
Changed module name, edited default manifests in prog/weave-kube
...
* Module name changed to `github.com/rajch/weave`
* Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
2024-03-01 18:05:19 +05:30
Raj Chaudhuri
1bb1f02b1d
libCNI upgraded to v1.1.2
...
This was all work done previously by @hswong3i in
https://github.com/weaveworks/weave/pull/3939
All credit to them
2023-03-29 12:10:13 +05:30
Bryan Boreham
ad621c807e
Move Kubernetes API calls into kube-utils program
...
This reduces the size of the 'weaver' binary.
2021-01-19 17:22:47 +00:00
Bryan Boreham
b3d387fb86
Update Kubernetes client packages to 0.18.6
...
Lots of functions need Context parameters added
2020-08-04 10:11:30 +00:00
Bryan Boreham
34dc4dabce
Clean up some lint warnings
...
I ran golangci-lint and it pointed out a few things to clean up.
2020-07-31 10:28:55 +00:00
Bryan Boreham
df52117bfa
Remove unused code
2020-07-31 09:03:27 +00:00
Michael Merrill
6a48da60ec
Handling concurrent updates to configmap and IP reclamation ( #3724 )
...
checking if peer to be removed has been removed by another pod
Signed-off-by: mmerrill3 <michael.merrill@vonage.com >
2019-10-24 20:01:02 +01:00
Bryan Boreham
62c1d28524
Merge pull request #3716 from weaveworks/870-flake
...
Randomise wait to reclaim IPs on node deletion, and fix flaky test 870
2019-10-15 09:17:04 +01:00
Bryan Boreham
821b787774
Move printing of node addresses after reclaim loop
...
Otherwise we see all the node addresses in the middle of the log.
2019-10-11 20:29:58 +00:00
Bryan Boreham
3ed7894e39
Debug log the node-deletion event
...
So we know when it came in, also which node.
2019-10-11 20:29:58 +00:00
Bryan Boreham
f5c2f51964
Use a different seed for random numbers each run
...
Without this, each run gets the same random numbers so all nodes are
racing to remove the deleted node.
2019-10-11 20:29:58 +00:00
Bryan Boreham
d1ed6c5747
Exclude myself when building a list of peers that may need deleted
...
We already avoid actually doing the delete, but adding this check
stops the program logging that it was thinking about it.
2019-10-10 13:22:20 +00:00
Bryan Boreham
27848992b1
Merge branch '2.5'
2019-05-07 13:32:55 +00:00
Bryan Boreham
8a4fc9c02a
Fix peer-list fuzz test to re-fetch list when it may be nil
2019-05-03 17:25:36 +00:00
Bryan Boreham
eb7ba691ee
Fetch storedPeerList after read from Kubernetes
...
This avoids a race condition where the peer has added itself to the
list and the annotation since we read storedPeerList.
2019-04-02 09:11:27 +00:00
Bryan Boreham
15b9b7416a
Re-read peers ConfigMap from Kubernetes at start of every reclaim
...
A previous reclaim may have left the map set to nil.
2019-03-26 17:25:34 +00:00
Bryan Boreham
5024270232
Avoid panic on nil map
...
It can be set to nil after a failed update; check rather than crashing.
2019-03-26 17:20:24 +00:00
Bryan Boreham
bd24dd7dae
Make test harness and comments match Kubernetes behaviour on conflict error
...
Kubernetes always returns nil on error; somehow I had the wrong idea
here.
2019-03-26 17:19:22 +00:00
Bryan Boreham
e1e4a7887a
Merge branch '2.5'
2019-01-18 11:20:25 +00:00
Bryan Boreham
27178b1c79
Check and report the error return from getKubePeers()
2019-01-15 11:15:36 +00:00
Murali Reddy
d2a9a51296
follow project conventions in ordering the imports
2018-12-04 10:58:43 +05:30
Murali Reddy
81b17469f4
prevent kubernetes node connecting to self by excluding the node IP from the list of the peers passed to weaver
...
Fixes #3398
2018-11-21 11:47:30 +05:30
Murali Reddy
c48c746791
replace peerlist with current set of Kubernetes nodes
2018-10-31 18:06:48 +05:30
Murali Reddy
f334575e69
perform weave connect replace on node delete with empty peer list
2018-10-30 11:54:59 +05:30
Murali Reddy
ea423755cc
review comment: removing unnessary verbose code
2018-10-30 10:56:05 +05:30
Murali Reddy
4a40380d0f
addressing review comments
2018-10-24 13:45:35 +05:30
Murali Reddy
df467be26e
watch for node delete events and call reclaimRemovedPeers
2018-10-24 13:45:35 +05:30
Murali Reddy
59c1abe9b9
addressing review comments
2018-10-04 14:08:56 +05:30
Murali Reddy
7a959df648
handles an edge case where peer claimed to own the action (to reclaim) but no longer
...
exists hence lock persists foever, fix makes a peer own the reclaim when nonexistent node found
Fixes #3386
2018-09-27 16:00:44 +05:30
Bryan Boreham
008eeb03ad
Improve comments and error checking
2018-09-12 14:11:09 +00:00
Bryan Boreham
41c48dc678
Update test to call reclaimPeer()
2018-09-12 14:11:09 +00:00
Bryan Boreham
09be35dee0
Fetch stored peer list every time round the retry loop
...
This ensures we take account of other peers' updates and closes a race
condition whereby another peer's changes can be overwritten.
2018-09-12 14:11:09 +00:00
Bryan Boreham
c3ad641d94
Refactor: extract reclaimPeer() function
2018-09-12 14:11:09 +00:00
Bryan Boreham
bacb3952a3
Fetch Kubernetes node list every time round reclaim loop
...
If we retain the Kubernetes list for a long time we might see a peer
appear in the Weave list and conclude it has been deleted. We must
always fetch the Kubernetes list after fetching the Weave list, during
deletion.
2018-09-12 14:10:59 +00:00
Bryan Boreham
70257a6c19
Add test for kube-utils peer list
...
- In parallel on several goroutines, randomly add and remove peers.
- Maintain the test's own idea of current state.
- Check that the test's state and kube-utils' state are consistent.
2018-09-12 12:37:16 +00:00
Bryan Boreham
bfe9f00e55
Fake kubernetes API which implements optimistic locking
...
Mostly copied from kubernetes/client-go files
2018-09-12 12:37:16 +00:00
Bryan Boreham
591be2d08f
Refactor: Introduce an interface so weave client can be mocked
2018-09-12 12:37:16 +00:00
Bryan Boreham
c3ce052cc5
Refactor: use Kubernetes.Interface instead of *Clientset
...
So we can call with a mock for testing
2018-09-12 12:35:34 +00:00
Bryan Boreham
7dcd4bdf47
Refactor: extract peerlist fns to new file
2018-09-12 12:35:34 +00:00
Martynas Pumputis
78e00f9a3a
Merge pull request #3397 from weaveworks/issues/3394-delete-old-me
...
Reclaim IPs when node name is re-used
2018-09-12 13:57:12 +03:00
Bryan Boreham
2ff0bbe150
Reclaim IPs when node name is re-used
...
Change the map used to reclaim peers so it is indexed by PeerName
which should be unique over time, rather than NodeName which can be
re-used. Create an auxilliary set of NodeNames to help.
This way, if we can see that a different peer was previously running
with the same node name, it can be included for reclaim.
2018-09-10 15:10:51 +00:00
Martynas Pumputis
acc24f1237
Do not exclude k8s node without any IP addr in reclaim
...
Otherwise, such node will be rmpeer'd which can lead to the IPAM
inconsistencies "Received update for IP range I own at <..>".
2018-09-06 14:49:20 +03:00
Martynas Pumputis
25c26519ed
Merge remote-tracking branch 'origin/2.3'
2018-06-12 14:47:42 +02:00
Bryan Boreham
2a04df1049
Rename "kube-peers" to "kube-utils"
...
It's now doing things like network status that are outside of the
scope of "peers".
2018-06-11 11:22:07 +00:00