Commit Graph

390 Commits

Author SHA1 Message Date
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
Lucas Servén Marín
f7d4658cf1
Merge pull request #195 from squat/e2e_test_allowed_location_ips
e2e: add test for allowed location IPs
2021-06-16 20:47:29 +02:00
Lucas Servén Marín
6ab338cf58
e2e: add test for allowed location IPs
This commit adds a new e2e test fot the recently introduced
allowed-location-ips annotation. This test annotates the control-plane
node with an allowed IP and then ensures this IPs is reachable from
the curl helper Pod, which is now guaranteed to be scheduled on a
worker node.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-16 17:01:58 +02:00
Lucas Servén Marín
9a75468a32
Merge pull request #194 from squat/fix_adjacency_retries
e2e test improvements
2021-06-16 12:27:56 +02:00
Lucas Servén Marín
6193210d85
e2e: test Peer validation
This commit adds an e2e test that ensures that invalid Kilo Peers are
rejected thanks to the improved OpenAPI v3 validation.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-16 10:46:22 +02:00
Lucas Servén Marín
941eabb605
e2e: correctly retry failed adjacency checks
The recent test refactor wrapped the adjacency check in a `retry`,
however, the `check_adjacent` function had an `assert` in it, which
meant that the test would fail immediately and not be retried. This
commit moves the assertion out of the check, which also allows for
improved code reuse.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-16 10:37:17 +02:00
Lucas Servén Marín
311414e63a
Merge pull request #179 from squat/location_allowed_ips
pkg/: FEATURE: support allowed IPs outside a cluster
2021-06-15 23:07:22 +02:00
Lucas Servén Marín
3ca08c4f12
Merge pull request #192 from squat/kgctl_kubeconfig_default
cmd/kgctl: improve default kubeconfig
2021-06-15 22:34:15 +02:00
Lucas Servén Marín
ab19e7258f
Merge pull request #191 from squat/test_peers
e2e: test VPN in e2e tests
2021-06-15 22:33:53 +02:00
leonnicolas
0255214d97
docs/annotations.md: docs for allowed-location-ips
Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-06-15 22:17:36 +02:00
leonnicolas
31ffaa0e71
pkg/: FEATURE: support allowed IPs outside a cluster
Users can specify IPs with the annotation "allowed-location-ips".
It makes no difference which node of a location is annotated.
The IP should be routable from the particular location, e.g. a printer in
the same LAN.
This way these IPs become routable from other location.

Signed-off-by: leonnicolas <leonloechner@gmx.de>

Co-authored-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-15 22:17:35 +02:00
Lucas Servén Marín
61b52ce4ae
cmd/kgctl: improve default kubeconfig
This commit adds better handling of the default kubeconfig location in
the kgctl binary for cases where the `$KUBECONFIG` environment variable
is not set. In these cases, kgctl will default to
`$HOME/.kube/config`, putting it in line with tools like `kubectl` and
`kind`.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-15 20:53:02 +02:00
Lucas Servén Marín
d10b40acb0
e2e: test VPN in e2e tests
This commit adds testing of the VPN feature of Kilo to the e2e tests.
Also, in order to make the tests less flaky, this commit ensures that
the Kilo Pods use the "root" kubeconfig to connect to the API rather
than the Kubernetes API's cluster IP, which can become unavailable when
networking is reconfigured.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-15 20:41:25 +02:00
Lucas Servén Marín
6542c2ee94
Merge pull request #190 from squat/refactor_e2e
e2e: refactor the end to end tests
2021-06-15 16:58:37 +02:00
Lucas Servén Marín
9f088b87ee
e2e: refactor the end to end tests
This commit refactors the e2e tests in the following ways:
* bump the version of `bash_unit` to 1.7.2: the previous version was
from 2018;
* remove the unused `block` function;
* fix the order of `block_unitil_ready_by_name` and `check_ping`: we
should not attempt to interact with pods before they are considered
ready;
* extract the retry logic into a reusable function called `retry`; and
* retry the `check_adjacent` function for robustness.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-15 13:09:20 +02:00
Lucas Servén Marín
e513e6ca59
Merge pull request #187 from squat/support_mac_m1
Makefile: bump golang toolchain for M1 support
2021-06-14 13:42:49 +02:00
Lucas Servén Marín
6261f507a3
Merge pull request #186 from squat/crd_validation
Use apiextension v1
2021-06-14 13:42:32 +02:00
Lucas Servén Marín
0ab16e11b8
Makefile: bump golang toolchain for M1 support
This commit bumps the Golang toolchain version used to build Kilo to go
1.16 to support builing kgctl for the arm64 M1 macs.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-06-14 13:00:24 +02:00
leonnicolas
36643b77b4
Use apiextension v1
- upgrade from apiextension v1beta1 to v1
 - generate yaml manifest for crd intead of applying it at runtime
  - users will have to apply the manifest with kubectl
 - kg and kgctl log an error if the crd is not present
 - now validation should actually work

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-06-14 12:59:33 +02:00
leonnicolas
e272d725a5
docs/building.md: add docs for building Kilo and the website (#177)
* docs/building.md: add docs for building Kilo and the website

Signed-off-by: leonnicolas <leonloechner@gmx.de>

Update docs/building_kilo.md

Co-authored-by: Lucas Servén Marín <lserven@gmail.com>

* Apply suggestions from code review

Co-authored-by: Lucas Servén Marín <lserven@gmail.com>

Co-authored-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-28 13:01:17 +02:00
Lucas Servén Marín
a8f4143f53
Merge pull request #147 from JulienVdG/private-registry
Makefile: handle a private registry
2021-05-27 15:40:28 +02:00
Lucas Servén Marín
28d93fba90
Merge pull request #175 from squat/fix_markdown_link
Makefile: workaround to fix broken markdown link in website
2021-05-21 19:08:22 +02:00
leonnicolas
1ab8523d8a
Makefile: workaround to fix broken markdown link in website
Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-21 14:23:10 +02:00
Lucas Servén Marín
5614d9158b
Merge pull request #174 from squat/consistent_indentation
e2e/kind.sh: make indentation consistent
2021-05-21 13:09:27 +02:00
Lucas Servén Marín
305dc6ce91
e2e/kind.sh: make indentation consistent
This file uses tabs everywhere instead of spaces, so fix the lines that
I added in the last PR.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-21 11:09:14 +02:00
Lucas Servén Marín
cc7e94b07c
Merge pull request #173 from squat/lint_bash
e2e/kind.sh: lint bash script
2021-05-21 11:06:15 +02:00
Lucas Servén Marín
259959c0a5
e2e/kind.sh: lint bash script
This commit fixes lint warnings produced by shellcheck. This simplifies
some of the `if`s and protects against variables with spaces. We may
want to consider shellchecking all scripts in the repo.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-21 10:33:47 +02:00
leonnicolas
3422e8a40c
Merge pull request #171 from squat/e2e
Makefile, e2e/*: Add end to end tests
2021-05-20 19:40:36 +02:00
leonnicolas
d806fb9126
Makefile, e2e/*: Add end to end tests
Tests are using kind, adjacency and bash_unit.

A kind cluster is spun up and the previously build container image of
Kilo is loaded into it.
Adjacency and a curl container is started.

From the curl container a http request is send to the adjacency service.

The test fails if curl returns an unexpected result.

Two test are run. One with `mesh-granularity=full` and `location`.

The e2e test is only run for pull request because it is a bit flaky for
automatic nightly runs.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-20 17:34:17 +02:00
Lucas Servén Marín
a25ab90e05
Merge pull request #172 from squat/docs_cleanup
docs,README.md: clean up documentation
2021-05-20 13:03:14 +02:00
Lucas Servén Marín
845df22a32
docs,README.md: clean up documentation
This commit cleans up some typos in the documentation, clarifies some
explanations, fixes a bash script that would not expand a variable, and
renames the API documentation generator command from gen-docs to
docs-gen to match the output binary name.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-20 12:45:02 +02:00
Lucas Servén Marín
9f37a93859
Merge pull request #169 from squat/generate_CRD
cmd/gen-docs/main.go: auto generate docs for CRD
2021-05-17 17:30:27 +02:00
leonnicolas
3b898042cd
Merge pull request #170 from squat/update_readme
README.md: add slack badge
2021-05-17 17:27:46 +02:00
leonnicolas
01ce79c453
README.md: add slack badge
Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-17 14:29:33 +02:00
leonnicolas
51f1ae94ef
cmd/gen-docs/main.go: auto generate docs for CRD
The new make command `make gen-docs` is introduced.
It will build a markdown file from the CRD introduced by Kilo.

The generation of the docs is a requirement for building the website.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-17 13:54:56 +02:00
Lucas Servén Marín
5d33c94d04
Merge pull request #168 from squat/bump_dependecies
go.mod: bump client-go and api machinery
2021-05-15 12:34:15 +02:00
leonnicolas
a3bf13711c
go.mod: bump client-go and api machinerie
I had to run `make generate`.
Some API functions got additional parameters `Options` and `Context`.
I used empty options and `context.TODO()` for now.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-15 12:12:50 +02:00
Lucas Servén Marín
f2c37b9de6
Merge pull request #167 from squat/bump_docusaurus
website/package.json: bump node_modules and update yarn.lock
2021-05-15 11:22:50 +02:00
leonnicolas
b59bc960f2
website/package.json: bump node_modules and update yarn.lock
bump react, react-dom, docusaurus, classnames and dependencies (yarn.lock)

Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-15 00:45:18 +02:00
leonnicolas
0263c985cf
Merge pull request #161 from squat/prometheus_podmonitor
manifests/*: add example podMonitor
2021-05-13 20:28:58 +02:00
leonnicolas
3f0404d9e3
manifests/*: add example podMonitor
Signed-off-by: leonnicolas <leonloechner@gmx.de>
2021-05-13 16:25:29 +02:00
Lucas Servén Marín
58721e0c20
Merge pull request #160 from squat/code_block
docs/peer-validation: fix code-block
2021-05-12 18:17:35 +02:00
Lucas Servén Marín
743fbb1da4
docs/peer-validation: fix code-block
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-05-12 14:35:16 +02:00