Commit Graph

401 Commits

Author SHA1 Message Date
Lucas Servén Marín
b6b5974fbe
docs: update multi-cluster-svcs 2019-07-30 15:09:12 +02:00
Lucas Servén Marín
1d5e3685e3
manifests: update API groups
This commit updates the API group for DaemonSets to apps/v1
and the API version for ClusterRoles to v1.
2019-07-16 23:41:20 +02:00
Lucas Servén Marín
d299a8875f
README: clarify and fix grammar 2019-07-16 23:31:27 +02:00
Lucas Servén Marín
8e755cf52e
pkg: allow overriding internal IP
This addresses the request for enhancement in
https://github.com/squat/kilo/issues/7.
2019-07-15 17:24:35 +02:00
Lucas Servén Marín
82fe418f89
Dockerfile: update alpine repo for wg 2019-05-22 10:26:20 +02:00
Lucas Servén Marín
7d77f87ba0
docs: fix links 2019-05-18 02:43:07 +02:00
Lucas Servén Marín
55280ab09b
manifests: default hostname to spec.nodeName
Not all K8s installs will correctly match the node's hostname to the
node's name in the API. We can get around this by setting the name Kilo
uses to the node name in the API.
2019-05-17 22:29:55 +02:00
Lucas Servén Marín
51df7fc4e3
pkg/mesh: don't let hostname resolution stop mesh
If the hostname fails to resolve, this should not be considered a
blocking error. Most likely, it means that the hostname is simply not
resolvable, which should not be a requirement to run Kilo. In this case,
simply try to find a valid IP from other sources.
2019-05-17 18:09:31 +02:00
Lucas Servén Marín
c9969f5be9
Makefile: improve tooling
This commit improves the tooling for the repo and makes all go binaries
managed with go mod. This ensures all tooling is vendored.
2019-05-17 00:23:56 +02:00
Lucas Servén Marín
ca70fec14f
vendor: revendor 2019-05-17 00:23:05 +02:00
Lucas Servén Marín
adb09ce620
Makefile,Dockerfile: add multi-arch images
This commit changes the build-system for Kilo to create container images
for multiple architectures. This will enable running Kilo on Arm
devices, e.g. Raspberry Pis. This is accomplished using Docker
manifests.
2019-05-16 22:53:43 +02:00
Lucas Servén Marín
81d6077fc2
manifests,pkg/encapsulation: Flannel compatibility
This commit adds basic support to run in compatibility mode with
Flannel. This allows clusters running Flannel as their principal
networking solution to leverage some advances Kilo features. In certain
Flannel setups, the clusters can even leverage muti-cloud. For this, the
cluster needs to either run in a full mesh, or Flannel needs to use the
API server's external IP address.
2019-05-14 01:01:58 +02:00
Lucas Servén Marín
cd6eeeb1e7
pkg/{encapsulation,mesh}: abstract encapsulation
This commit abstracts away encapsulation to more easily allow for
different types of encapsulation or compatibility with other networking
solutions.
2019-05-13 18:30:03 +02:00
Lucas Servén Marín
d7ad946ff4
pkg/mesh: ignore CNI IP from private IPs
We need to ignore the CNI IP address from the searched IPs, as this will
not be a routable IP address.
2019-05-13 17:35:08 +02:00
Lucas Servén Marín
8ed1b549d1
pkg/mesh: edge case external = internal
Add an exception to the route generation rules for when the external IP
of a node equals the internal IP. In this case, we cannot route traffic
through a tunnel.
2019-05-13 17:25:56 +02:00
Lucas Servén Marín
459262326e
README: fix k3s capitalization 2019-05-13 14:31:55 +02:00
Lucas Servén Marín
ad29121b27
Merge pull request #2 from fire/master
Add k3s.
2019-05-13 14:26:06 +02:00
K. S. Ernest (iFIre) Lee
0f87547a26
README: add instructions to use k3s. 2019-05-13 14:10:37 +02:00
K. S. Ernest (iFIre) Lee
81ce93dab7
manifests: add support for k3s 2019-05-13 14:10:13 +02:00
Lucas Servén Marín
e4ad7c29ec
manifests: keep private key between restarts
This commit ensures that the WireGuard private key is re-used between
container restarts. The result of this is that external peers can keep
using their configuration and don't need to be re-configured just
because the Kilo container restarted.
2019-05-10 22:21:56 +02:00
Lucas Servén Marín
bbbfc0548f
docs: update multi-cluster-services examples 2019-05-10 02:45:00 +02:00
Lucas Servén Marín
35390054ba
pkg: deduplicate peer IP addresses
We need to defensively deduplicate peer allowed IPs.
If two peers claim the same IP, the WireGuard configuration
could flap, causing the interface to churn.
2019-05-10 02:07:42 +02:00
Lucas Servén Marín
4d9c203603
pkg/mesh,cmd: add WireGuard IP to Nodes
This allows admins or users to have some easy visibility into the
configuration of the Kilo cluster.
2019-05-10 02:06:02 +02:00
Lucas Servén Marín
b04264ecc1
cmg/kgctl: fix peer as-peer 2019-05-09 17:18:45 +02:00
Lucas Servén Marín
47a7cebd35
docs: fix multi-cluster formatting 2019-05-08 23:06:17 +02:00
Lucas Servén Marín
034c27ab78
pkg: fix reconciling peer updates 2019-05-08 17:13:24 +02:00
Lucas Servén Marín
545bc4186f
docs,README: document multi-cluster services 2019-05-08 17:13:20 +02:00
Lucas Servén Marín
90e68c7735
cmd/kgctl: add output options for showconf
This commit adds several output options to the `showconf` command of the
`kgctl` binary:
* `--as-peer`: this can be used to generate a peer configuration, which
can be used to configure the selected resource as a peer of another
WireGuard interface
* `--output`: this can be used to select the desired output format of
the peer resource, available options are: WireGuard, YAML, and JSON.
2019-05-08 01:31:36 +02:00
Lucas Servén Marín
5914a9468f
docs: add topology docs and graphs 2019-05-07 16:36:02 +02:00
Lucas Servén Marín
9f30d8d1a1
pkg/mesh: rename mesh granularity types
This commit renames the mesh granularity types to make them more
intuitive. The functionality provided by them remains exactly the same.
2019-05-07 16:34:49 +02:00
Lucas Servén Marín
c65627dab0
pkg/route: account for interface churn
When interfaces on the host churn, the kernel will remove routes
associated with those interfaces. This could cause the Kilo route
controller to become out of sync with the routes that really exist. This
commit fixes this behavior.
2019-05-07 12:06:21 +02:00
Lucas Servén Marín
02bd5fa6c0
vendor: re-vendor 2019-05-07 01:53:14 +02:00
Lucas Servén Marín
b3a3c37e0a
*: add complete CNI support
This commit enables Kilo to work as an independent networking provider.
This is done by leveraging CNI. Kilo brings the necessary CNI plugins to
operate and takes care of all networking.

Add-on compatibility for Calico, Flannel, etc, will be re-introduced
shortly.
2019-05-07 01:49:59 +02:00
Lucas Servén Marín
72991949ac
cmd/kgctl: use KUBECONFIG from env 2019-05-03 14:25:20 +02:00
Lucas Servén Marín
5865cefbfa
README: fix setconf example 2019-05-03 14:25:20 +02:00
Lucas Servén Marín
85180a80cc
pkg/k8s/apis: make more fields optional 2019-05-03 14:08:13 +02:00
Lucas Servén Marín
cd9c83b3bc
pkg/wireguard: simplify returns 2019-05-03 13:49:55 +02:00
Lucas Servén Marín
160e0bb3e8
Makefile: fix go modules 2019-05-03 13:49:50 +02:00
Lucas Servén Marín
e0278f7bee
README,docs: document VPN 2019-05-03 12:55:01 +02:00
Lucas Servén Marín
2425a06cd8
*: add peer VPN support
This commit adds support for defining arbitrary peers that should have
access to the VPN. In k8s, this is accomplished using the new Peer CRD.
2019-05-03 12:53:44 +02:00
Lucas Servén Marín
46f55c337b
vendor: revendor 2019-05-03 12:50:21 +02:00
Lucas Servén Marín
4cbc24128d
pkg/mesh: metric for reconcile attempts
This commit exposes a new Prometheus to track the number of
reconciliation attempts. This is important, as without this, the number
of errors it not too helpful. A more valuable statistic is the
proportion of reconciliations that result in an error.
2019-04-30 13:51:46 +02:00
Lucas Servén Marín
cf6ded1ae3
cmg/kg/main: small cleanup 2019-04-14 15:05:57 +02:00
Lucas Servén Marín
72bfb762b9
pkg/{k8s,mesh}: introduce liveness checks
This commit introduces liveness checks to Kilo. This allows the Kilo
daemons to take nodes with inactive or dead Kilo deamons out of the
topology until they are alive again.
2019-04-02 18:28:27 +02:00
Lucas Servén Marín
a8467f779e
cmd/kgctl: fix possible nil pointer dereference 2019-04-02 18:23:51 +02:00
Lucas Servén Marín
614f2e1c5d
cmd/kg: listen on all stacks without localhost
Today, net.Listen will only listen on 127.0.0.1 if localhost is passed
[0]. Listening on `:8080` will open a dualstack socket on OSs that
support it.
[0] https://github.com/golang/go/issues/9334
2019-04-02 18:17:51 +02:00
Lucas Servén Marín
d7bfa38796
Makefile: bump go version 2019-03-21 00:55:07 +01:00
Lucas Serven
25958f0131
.travis.yml: bump go version to 1.11.5 2019-02-06 18:09:37 +01:00
Lucas Serven
465ae73370
manifests: add RBAC resources 2019-01-21 19:55:30 +01:00
Lucas Serven
630bced657
pkg/iproute: ignore error if tunnel exists 2019-01-21 19:54:09 +01:00