Raj Chaudhuri
664e361ab4
In alpine base image, changed default iptables backend to legacy for backward compatibility
2024-03-17 09:23:53 +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
fe61992c06
Make launch.sh compatible with older k8s manifests
2021-01-12 15:53:12 +00:00
Bryan Boreham
8eeb3ca4f2
Kubernetes: move part of launch to init container
...
This allows the main container to run without write access to the host
filesystem, except for two specific areas, thus trimming the attack
surface.
We lose the behaviour that the CNI plugin is only installed if Weave Net
gets up and running at least once, so the error reports from kubelet
will be slightly different in the case that it never manages to run.
2021-01-11 17:54:43 +00:00
Murali Reddy
fca23f805a
modify launch.sh to launch weaver with --no-masq-local by default
2020-08-04 16:21:30 +00:00
Nesc58
f4009c39d8
wait added to iptables commands
2020-07-28 10:46:49 +02:00
Murali Reddy
83024b946f
use softlinks to link iptables to backend specific commands and update docs
2020-01-08 15:44:22 +05:30
Murali Reddy
4f48670345
set iptables backend to use if specified explicitly or auto-detect
2020-01-08 15:44:10 +05:30
Bryan Boreham
b0d05f5e37
Increase default connection limit to 200
...
Improvements in resource consumption in larger clusters mean we can
raise this limit.
2019-11-05 14:21:24 +00:00
Murali Reddy
17b45d9efa
handle single node case where return peer list from kube-utils is empty
...
fixes side affet introduced in #3454
2019-01-18 01:06:37 +05:30
Murali Reddy
df467be26e
watch for node delete events and call reclaimRemovedPeers
2018-10-24 13:45:35 +05:30
Martynas Pumputis
49216ce365
Merge pull request #3307 from weaveworks/set-kube-netstatus
...
Set Kubernetes NodeNetworkUnavailable to false when starting
2018-06-11 15:20:14 +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
Martynas Pumputis
6dbe95a0b5
Add NO_MASQ_LOCAL to weave-kube/launch.sh
...
One can enable the feature by setting NO_MASQ_LOCAL=1 among
env vars of the weave-kube DaemonSet.
2018-06-04 14:08:24 +02:00
Bryan Boreham
9b0d1bd054
Set Kubernetes NodeNetworkUnavailable to false when starting
2018-05-26 14:06:57 +00:00
Bryan Boreham
f6fdaf6492
Only expose metrics by default in weave-kube
2018-04-04 15:00:53 +01:00
Bryan Boreham
a439288765
Raise weave-kube default connection limit from 30 to 100
...
This was missed from 265bfcf
2018-03-27 21:06:41 +00:00
Bryan Boreham
3b499ce27c
Rearrange peer reclaim checks in weave-kube launch script
...
This is to make it behave better on fresh start, and in the case where
the manifest has not been updated to give it permissions.
2017-11-16 14:14:54 +00:00
Bryan Boreham
570ab0b10b
Avoid deleting persisted data on weave-kube upgrade
...
Add a feature to weaveutil to get and set flags, then use this feature
to mark the DB when this version runs
2017-11-15 11:26:43 +00:00
Bryan Boreham
214cf6cb2e
Flip result code when checking for new peer
...
This avoids mistaking an error condition for the result we should act on
2017-11-15 10:11:02 +00:00
Bryan Boreham
c67bc704e1
Temporarily raise kube-peers log level to debug
2017-11-14 14:16:01 +00:00
Bryan Boreham
3501ad45e6
Cope with a Kubernetes node being deleted and coming back
...
Add features to weaver and kube-peers to find the peer name and check
if it is in the list, then in launch.sh delete persisted data if not.
2017-11-14 14:15:31 +00:00
Bryan Boreham
71b39489da
Maintain a list of peers in a Kubernetes annotation
...
This is prework for a feature which will remove 'dead' peers
2017-11-14 14:06:33 +00:00
Bryan Boreham
bebaa48520
Change weavedb from an emptyDir to a hostPath volume
...
EmptyDir has the same lifetime as the pod, whereas we want our
persistence to extend past that, e.g. when Weave Net is upgraded.
`weave reset` cleans out the file.
We assume that /var/lib is writable.
2017-05-17 12:38:24 +00:00
Bryan Boreham
c85fff8f23
Fix outdated comment
2017-05-09 14:27:24 +00:00
Bryan Boreham
ad4fe86285
Merge branch '1.9'
2017-05-09 09:05:38 +00:00
Mike Bryant
9419ad16bf
Clean up xt_set_exists components in advance
...
If this function dies in the middle, the leftover weave-kube-test set
causes this function and weave-npc to break. In particular
this means we can never restart weave with the launch script.
Here we clean up in advance, in case there's leftovers from a previous run
Fixes #2934
2017-05-08 12:15:23 +01:00
Bryan Boreham
9fd1a43769
Put back some weave bridge options
...
ability to set MTU was lost in an earlier change
2017-04-24 14:55:53 +00:00
Bryan Boreham
ef9f95f653
Let weaver create the bridge in weave-kube
2017-04-17 19:41:47 +00:00
Marc CARRE
21a0fc30e8
Run weaver without exec.
...
This:
1. prevents from generating defunct (a.k.a. zombie) processes, and therefore fixes #2836 ; but also
2. reintroduces #2684/#2688 as shells do not forward signals and we are still running more than one process.
A proper fix would leverage something like tini.
See also:
- github.com/krallin/tini
- github.com/krallin/tini/issues/8
- github.com/docker-library/official-images#init
Sample output:
- during initialisation:
```
$ ps auxf
[...]
root 1380 0.4 1.9 879660 74660 ? Ssl Mar13 6:02 /usr/bin/docker daemon -H fd:// -H unix:///
root 1664 0.0 0.4 502116 18528 ? Ssl Mar13 0:06 \_ docker-containerd -l /var/run/docker/li
root 15482 0.0 0.0 200496 3364 ? Sl 15:04 0:00 \_ docker-containerd-shim 3d1f5eb6e090
root 15496 0.0 0.0 1524 996 ? Ss 15:04 0:00 | \_ /bin/sh /home/weave/launch.sh
root 15780 0.0 0.0 1524 64 ? S 15:04 0:00 | \_ /bin/sh /home/weave/launch.
root 15872 0.0 0.0 1772 1272 ? S 15:04 0:00 | | \_ /bin/sh /home/weave/wea
root 15897 0.0 0.0 1772 324 ? S 15:04 0:00 | | \_ /bin/sh /home/weave
root 15898 0.0 0.0 14656 2948 ? S 15:04 0:00 | | \_ curl -o /tmp/we
root 15781 10.0 1.5 484556 60296 ? Sl 15:04 0:00 | \_ /home/weave/weaver --port=6
[...]
```
- after initialisation:
```
$ ps auxf
[...]
root 1380 0.4 1.9 879660 74660 ? Ssl Mar13 6:02 /usr/bin/docker daemon -H fd:// -H unix:///
root 1664 0.0 0.4 502116 18592 ? Ssl Mar13 0:06 \_ docker-containerd -l /var/run/docker/li
root 15482 0.0 0.0 200496 3364 ? Sl 15:04 0:00 \_ docker-containerd-shim 3d1f5eb6e090
root 15496 0.0 0.0 1524 996 ? Ss 15:04 0:00 | \_ /bin/sh /home/weave/launch.sh
root 15781 2.3 1.6 503064 64320 ? Sl 15:04 0:00 | \_ /home/weave/weaver --port=6[...]
```
2017-03-14 15:34:47 +00:00
Martynas Pumputis
3607cf2d7a
Add check for xt_set module
...
The check is based on actually trying to install an iptables rule
which uses the module.
2017-03-01 10:37:43 +00:00
Martynas Pumputis
a57cf4bc83
Ignore modprobe errors in weave-kube/launch.sh
...
weave-kube is run by alpine image which uses busybox. modprobe of
busybox will return the "module not found" error [1], if a module is
built-in, which is an opposite behavior to modprobe distributed in
mainstream distros (e.g. ubuntu).
[1]: https://bugs.busybox.net/show_bug.cgi?id=5270
2017-02-28 11:26:40 +00:00
Bryan Boreham
cb73cf3f51
Ensure we have the kernel modules loaded for weave-npc
2017-02-27 12:32:57 +00:00
Bryan Boreham
f7c0da3ae1
Merge pull request #2781 from keontang/luanch-update
...
Add CONN_LIMIT environment var for running container
2017-02-23 12:40:01 +00:00
Bryan Boreham
e26dbf11e9
Stop collecting addresses in launch script now we do it in Go
2017-02-10 15:11:14 +00:00
Jiyuan Tang
bee031ad70
Add CONN_LIMIT environment for running container
2017-02-09 19:34:16 +08:00
Bryan Boreham
7d308a4ac5
Wire weaveutil unique-id into weave script
...
Also ensure the right host directories are mounted when create-bridge
is called from either the weave script or weave-kube.
2017-01-11 13:14:35 +00:00
Bryan Boreham
bf59a003bb
Exec weaver from weave-kube launch rather than running in background
...
So we only have one process running inside the container after all
set-up is finished
2017-01-04 15:00:52 +00:00
Adam Harrison
eb3bbff883
Merge pull request #2708 from weaveworks/weave-kube-mounts
...
Mount /etc under a different path for weave-kube
2017-01-04 10:15:54 +00:00
Bryan Boreham
a4ad66f1c8
Mount /etc under a different path for weave-kube
...
So we don't accidentally read or write the hosts's /etc.
Also move the other volumes under /host to be more consistent with
what the weave script expects.
2016-12-22 10:35:47 +00:00
Bryan Boreham
bbd631f08f
weave-kube no longer needs to supply the peer address
2016-12-09 15:34:31 +00:00
Adam Harrison
e1d8992ec5
Merge branch '1.8'
...
Fixes #2673 .
2016-12-07 11:24:13 +00:00
Bryan Boreham
d1712e9589
Re-add expose to ensure it gets run on all nodes
...
Previous change in a07e3301b1 meant that if there are no pods on
this node then the 'expose' never gets run.
2016-12-06 14:58:31 +00:00
Bryan Boreham
ec21afb426
Unify weave and launch.sh CNI setup
...
Test 830 has to run CNI plugin under sudo now
2016-12-06 11:52:09 +00:00
Bryan Boreham
d501c78795
Merge pull request #2659 from weaveworks/issues/2581-optional-bridge-nf
...
Optional bridge-nf detection
2016-11-28 18:09:40 -08:00
Bryan Boreham
d6544302d3
Check whether Weave's IP range overlaps something on the host already
2016-11-25 14:43:23 +00:00
Adam Harrison
28bf4e6e95
Optional bridge-nf detection
2016-11-25 12:40:20 +00:00
Adam Harrison
01c436ae15
Merge pull request #2642 from weaveworks/fix-launch-version
...
Fix weave-kube launch.sh version usage
2016-11-23 10:36:16 +00:00
Bryan Boreham
47cdf2b755
Simplify version sed
2016-11-22 15:42:53 +00:00
Bryan Boreham
15d91c558b
Quote version string which may contain spaces, etc
2016-11-14 12:49:00 +00:00