Commit Graph

332 Commits

Author SHA1 Message Date
Lucas Servén Marín
b34e7f6c24
Dockerfile: remove unnecessary font
This commit leaves Noto as the only font package, as one font package is
sufficient for the container.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-08-18 13:18:45 +02:00
Steffen Vogel
8f7ab0b871 graph-handler: add missing font to Dockerfile 2021-08-09 21:37:20 +02:00
Steffen Vogel
4c0381b3aa
e2e: fix handlers tests
Co-authored-by: leonnicolas <60091705+leonnicolas@users.noreply.github.com>
2021-07-22 12:22:31 +02:00
Steffen Vogel
9cc5f05f8c use switch/case statements for validating formats / layouts 2021-07-18 23:57:26 +02:00
Steffen Vogel
ba5bf140a2 add missing mime-type header for graph handler 2021-07-18 23:56:13 +02:00
Steffen Vogel
0789b4f9fa e2s: use assert_fail instead of assert _not 2021-07-16 13:38:05 +02:00
Steffen Vogel
5f6507972a add should comments to assertions 2021-07-16 13:38:05 +02:00
Steffen Vogel
c2d92181c8 e2e: fix and simplify handler tests 2021-07-16 13:38:05 +02:00
Steffen Vogel
08bf9b1cb4 e2e: add tests for HTTP handlers 2021-07-16 13:38:05 +02:00
Steffen Vogel
5a6c878fb5 add option for selecting layout to graph handler and using circo as new default 2021-07-16 12:23:00 +02:00
Steffen Vogel
641bd6a9e9 register health handler with HandleFunc 2021-07-16 12:10:13 +02:00
Steffen Vogel
b41654f0ce use SVG as default format for graph handler 2021-07-16 12:08:28 +02:00
Steffen Vogel
bf0b637311 pass node hostname and subnet to graph handler 2021-07-16 12:08:13 +02:00
Steffen Vogel
02b1c5223b simplify error message about failed invocation of dot 2021-07-16 12:00:40 +02:00
Steffen Vogel
46542e44ec keep checks for errors in a single line 2021-07-16 11:57:11 +02:00
Steffen Vogel
ae4e4173c3 use http package for status codes 2021-07-16 11:55:21 +02:00
Steffen Vogel
cfb680e99a kg: do not export handlers 2021-07-16 11:54:00 +02:00
Steffen Vogel
cd96616a91 add missing license header 2021-07-15 18:54:08 +02:00
Steffen Vogel
aa93f89eae docker: add missing fonts for rasterized graphviz output formats 2021-07-15 17:57:04 +02:00
Steffen Vogel
0de2a988cc kg: add new handler for rendering the topology graph 2021-07-15 17:54:21 +02:00
Lucas Servén Marín
abecadf707
manifests,e2e: reduce cluster role permissions (#211)
Since Kilo now uses the `kilo.squat.ai/discovered-endpoints` annotation
for Peer discovery, Kilo no longer needs to update Peer resources, so we
can remove this permission from the ClusterRole. Note, the RBAC in the
manifests is not used today, but we eventually want to migrate to this.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-14 13:20:05 +02:00
Lucas Servén Marín
e9d1ba88a8 e2e: update adjacency tool
This commit updates the reference to the adjacency tool used in the e2e
tests.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-13 13:16:34 +02:00
Lucas Servén Marín
ad62f90e54
Merge pull request #205 from squat/test_multi_cluster
Test multi cluster
2021-07-08 14:41:02 +02:00
leonnicolas
6de6b37406
Merge pull request #206 from squat/consistent_notes
docs: use consistent notes
2021-07-08 12:44:31 +02:00
Lucas Servén Marín
7756b5ce04
docs: use consistent notes
This commit standardizes how we display a `note` in our docs.
Previously, we used a mix of `_Note_:`, `__Note:__`, `> Note`, and `>
**Note**:` among others. Now, all notes appear as `> **Note**:`.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-08 12:15:17 +02:00
Lucas Servén Marín
19b0797ae2
e2e: test multi-cluster connectivity
This commit adds a new test suite to the e2e tests that validates
multi-cluster connectivity in Kilo. This is really just an extension of
the testing of the Peers CRD and related tooling that also exercises the
`--allowed-ips` flag of the `kgctl` tool.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-08 11:59:32 +02:00
Lucas Servén Marín
8c7e58a231
Makefile: allow filtering e2e tests
This commit enables the filtering of e2e tests that should be run when
using the Makefile's `e2e` target through the specification of the
`BASH_UNIT_FLAGS` environment variable. The value of this variable will
be passed as arguments to the `bash_unit` command, enabling filtering of
tests.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-08 11:50:49 +02:00
leonnicolas
6b5001bf0e
Merge pull request #202 from squat/e2e_improvements
e2e test suite improvements
2021-07-07 11:11:31 +02:00
Julien Viard de Galbert
e12b5029d7
Use LatestHandshake to validate endpoint (#149)
* wireguard: `wg show iface dump` reader and parser

* mesh: use LatestHandshake to validate NAT Endpoints

* add skip on error

* switch to loop parsing

So the stop on error pattern can be used

* Add error handling to ParseDump
2021-07-06 14:14:59 +02:00
leonnicolas
86eea326db
e2e/lib.sh: print to stderr in retry
This way callers of retry can check against the returned value and not
the logged strings.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-07-06 10:59:50 +02:00
Lucas Servén Marín
f251ddda98
e2e: simplify check_adjacency helper
This commit simplifies the check_adjacency helper to us the curl_pod
helper rather than a re-written version of it. It also simplifies the
curl_pod helper slightly to avoid the need for an additional shell.
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-06 10:59:49 +02:00
Lucas Servén Marín
f81d19e692
e2e: allow parameterizing kind config
This commit allows the kind cluster configuration to be parameterized at
call time. This enables the test suite to build multiple clusters with
different configurations, e.g. different CIDRs, different numbers of
nodes, etc.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-06 10:59:44 +02:00
Lucas Servén Marín
c728870b49
e2e: check_adjacent accept node number
This commit modifies the logic of the check_adjacent helper so that
rather than expecting the argument to be n^2+n it expects simply n. This
makes it easier to update the caller when the number of nodes in the
cluster changes.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-06 10:58:14 +02:00
Lucas Servén Marín
1e1f8819bf
e2e: don't export KUBECONFIG
This commit modifies the e2e shell scripts so that the KUBECONFIG
variable does not need to be exported. This will become important once
we allow the e2e test suite to launch multiple clusters, e.g. to test
multi-cluster connectivity.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-06 10:58:13 +02:00
leonnicolas
0733c83a0a
Merge pull request #201 from squat/reuse_kind_clusters
e2e: reuse kind cluster across suites
2021-07-05 22:03:56 +02:00
Lucas Servén Marín
c9e4786893
e2e: reuse kind cluster across suites
Currently, each test suite spins up its own kind cluster, which results
in longer e2e test times as each test suite needs to wait for the
cluster to be ready and for images to download. This commit creates two
new virtual test suites that are run before and after the actual e2e
tests and are responsible for creating and destroying a kind cluster
respectively. Any test suite that needs a fresh cluster can still spin
up its own using the `create_cluster` helper in the lib.sh file.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-05 19:43:18 +02:00
leonnicolas
8c4cb7238c
Merge pull request #204 from squat/fix_e2e
Makefile: fix e2e tests
2021-07-05 19:35:38 +02:00
Lucas Servén Marín
821180bdf1
Makefile: fix e2e tests
We seem to be running into
https://github.com/kubernetes-sigs/kind/issues/2240: kube-proxy is
crashlooping, which in turn causes CoreDNS to fail to connect to the API
server over the Service CIDR, which in turn cases DNS resolution to fail
in the cluster, which in turn causes the e2e tests to fail.
To address this,
this commit bumps the kind version to 0.11.1.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-07-05 19:16:30 +02:00
Lucas Servén Marín
d2fa4cc0b8
Merge pull request #199 from Ehco1996/ci
ci: add docker push in release ci
2021-06-29 15:00:54 +02:00
ehco1996
046e018c80 ci: add docker push in release ci 2021-06-29 20:29:35 +08:00
Lucas Servén Marín
9f23e39fca
Merge pull request #197 from squat/autodetect_granularity
pkg/ cmd/: kgctl autodetect mesh granularity
2021-06-18 16:45:49 +02:00
leonnicolas
088578b055
pkg/ cmd/: kgctl autodetect mesh granularity
Addes granularity annotation to auto detect the mesh granularity when
using kubectl

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-06-18 15:59:25 +02:00
Lucas Servén Marín
0d1d4fa052
Merge pull request #196 from squat/e2e_split
e2e: split e2e tests into different suites
2021-06-17 16:53:52 +02:00
dependabot[bot]
ac0574a377
Merge pull request #185 from squat/dependabot/npm_and_yarn/website/normalize-url-4.5.1 2021-06-17 12:17:56 +00:00
dependabot[bot]
35ce0c5049
build(deps): bump normalize-url from 4.5.0 to 4.5.1 in /website
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 09:51:32 +00:00
leonnicolas
489f322514
Merge pull request #184 from squat/dependabot/npm_and_yarn/website/ws-6.2.2
build(deps): bump ws from 6.2.1 to 6.2.2 in /website
2021-06-17 11:49:49 +02:00
Lucas Servén Marín
f3eac80675
e2e: split e2e tests into different suites
This commit splits the e2e tests into different suites that all reuse
helper functions from the lib.sh file. This split ensures that the tests
within a suite can all have the same setup, e.g. all tests depending on
a full-mesh will be set up with a full-mesh, and is resilient against
changes in test ordering.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-17 11:48:35 +02:00
dependabot[bot]
f21fd951ef
build(deps): bump ws from 6.2.1 to 6.2.2 in /website
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 09:38:25 +00:00
dependabot[bot]
99b3b40342
Merge pull request #180 from squat/dependabot/npm_and_yarn/website/dns-packet-1.3.4 2021-06-17 09:37:15 +00:00
dependabot[bot]
24fcef14ef
build(deps): bump dns-packet from 1.3.1 to 1.3.4 in /website
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 09:16:52 +00:00