Commit Graph

280 Commits

Author SHA1 Message Date
Spencer Smith
7bc3fcf77d feat: support metric values for DHCP
This PR adds a "DHCPOptions" field to the config. This field contains a
single subfield currently, "RouteMetric". Setting this well ensure that
any routes provided from the DHCP server are given this metric upon
injection into the routing table.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-10-16 08:29:04 -07:00
Artem Chernyshev
e7e99cf1b3 feat: support disk usage command in talosctl
Usage example:

```bash
talosctl du --nodes 10.5.0.2 /var -H -d 2
NODE       NAME
10.5.0.2   8.4 kB   etc
10.5.0.2   1.3 GB   lib
10.5.0.2   16 MB    log
10.5.0.2   25 kB    run
10.5.0.2   4.1 kB   tmp
10.5.0.2   1.3 GB   .
```

Supported flags:
- `-a` writes counts for all files, not just directories.
- `-d` recursion depth
- '-H' humanize size outputs.
- '-t' size threshold (skip files if < size or > size).

Fixes: https://github.com/talos-systems/talos/issues/2504

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2020-10-13 09:30:31 -07:00
Andrew Rynhard
17b6ce0a83 docs: fix latest tag
Latest release was tagged as "pre-release". It should be "latest".

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-10-12 15:10:10 -07:00
Andrew Rynhard
c3d6f60d36 docs: add link to latest docs
We need a way for users to get to the latest stable docs easily.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-10-12 14:21:38 -07:00
Artem Chernyshev
9c969a4be5 feat: allow disabling NoSchedule on master nodes
Add talosconfig parameter that allows to disable NoSchedule taint on
master nodes.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2020-10-06 10:52:37 -07:00
Andrey Smirnov
90d0efec48 feat: pull kubeconfig from the cluster on successful cluster create
Kubeconfig is merged into `~/.kube/config` with rename option
(existing configuration is never overwritten).

If endpoint was used, it is automatically put into the `kubeconfig`.

This should make OS X experience literally `talosctl cluster create`
followed by any `kubectl get ...`.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-06 05:45:28 -07:00
Andrey Smirnov
16eb47a1a3 feat: use kubeconfig merge in talosctl kubeconfig by default
Kubeconfig merge was completely rewritten to be "smarter":

* automatically apply renames done at previous stages to avoid asking
over and over again (in general should ask just once)

* skip checks if parts of the config match exactly

* allow overwrite as an option

* flexible way to control the output

* activating context in the end

* custom merged context name

Fixes #2578

Fixes #2587

Fixes #2577

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-03 05:36:15 -07:00
Andrey Smirnov
26aaf6af2c feat: support --registry-insecure-skip-verify for cluster create
Also fixes loading for CA certificate for the registry TLS auth.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-02 11:07:39 -07:00
Andrey Smirnov
c730378269 docs: small fixes for the config docs and air-gapped
Just small misprints.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-01 13:11:08 -07:00
Andrey Smirnov
b9bfe00b88 feat: support custom filename for talosctl kubeconfig
This also refactors much of the CLI code for the `talosctl kubeconfig`:

1. Do all the checks before fetching kubeconfig from the server: as
kubeconfig generation takes a few seconds, it doesn't make sense to
generate it if it's not going to be used.

2. Unify most of merge & write directly features.

3. Don't use ExtractTarGz method to be more flexible.

4. Allow custom paths for kubeconfig, whether it is a directory or full
path to the file to be created.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-30 12:05:50 -07:00
Niklas Wik
eb9ee06dbc feat: add support for disabling time
Adds the capability to diasable NTP when it cannot be provided in the deployed network

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>

add document update.

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
2020-09-30 06:58:33 -07:00
Andrey Smirnov
21f1bc6853 docs: add guide on setting up air-gapped environment with images
Fixes #2544

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-29 21:00:22 -07:00
Seán C McCord
ff92d2a14b feat: add ApplyConfiguration API
Adds the ability to apply (replace) an existing node configuration with
a new one via the Machine API.

Fixes #2345

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2020-09-29 14:44:06 -07:00
Andrew Rynhard
5c97482731 docs: add note on settings endpoints on MacOS
This adds an extra step to the getting started guide that applies to
MacOS users.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-28 11:33:23 -07:00
Spencer Smith
8c40848e79 docs: fix cluster name in docker docs
This PR fixes a docs bug where we were still referencing `talos_default`
as the cluster name. It should be `talos-default` instead.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-09-28 11:07:52 -07:00
Andrey Smirnov
ff0d4b305a feat: build Talos images/artifacts for amd64/arm64
By default, build outside of Drone works the same and builds only amd64
version, loads images back into dockerd, etc.

If multiple platforms are used, multi-arch images are built which can't
be exported to docker or to `.tar` image, they're always pushed to the
registry (even for PR builds to our internal CI registry).

Artifacts as files (initramfs, kernel) now have `-arch` suffix:
`vmlinuz-amd64`, `initramfs-amd64.xz`. "Magic" script normalizes output
paths depending on whether single platform or multiple platforms were
given.

VM provisioners accept magic `${ARCH}` in initramfs/kernel paths which
gets replaced by cluster architecture.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-27 10:32:07 -07:00
Andrey Smirnov
3d9a174fae fix: update the docs to fix the lint-markdown
Just one-liner.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-25 09:13:42 -07:00
Spencer Smith
25a65efb2e docs: add note around link-local addressing
This PR adds a small note to the config docs to detail how to do link
local networking like SLAAC.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-09-25 08:37:16 -07:00
Andrey Smirnov
c2ad9be9ba docs: add ghcr.io to the registry cache docs
Fixed some small nits on the way, replaced firecracker with qemu.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-25 06:00:08 -07:00
Andrey Smirnov
b9ce630842 feat: bump default resource limits for talosctl cluster create
Our defaults were too low today, and for Docker they're purely limits,
not pre-allocations. For QEMU we need more memory by default, and QEMU
doesn't support fractional CPU resource anyways.

Disk is a sparse file, so it's not allocated unless being used.

Fixes #2561

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-24 13:36:40 -07:00
Andrew Rynhard
7d2741fc4b chore: migrate to ghcr.io
Move to GHCR.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-23 15:06:30 -07:00
Spencer Smith
fe1a4e4810 docs: add v0.7 docs
This PR adds the 0.7 docs into the mix so we can start creating docs for
things specific to that version.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-09-22 07:10:14 -07:00
Andrew Rynhard
c693e556d2 feat: add images command
This adds a command that lists all of the images used by Talos. This is
useful in the case of airgap installs, so that users will know which images
to pull.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-18 12:55:08 -07:00
Andrew Rynhard
4df21e2c35 fix: address node package update
This updates packages to address security issues.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-17 16:43:54 -07:00
Patatman
85ddb123be docs: add recommneded settings in overview
Every infrastructure is different, and we can't enforce DNS endpoints
but we can recommend it.

Signed-off-by: Patatman <git@jeursen.nl>
2020-09-17 06:48:37 -07:00
Andrey Smirnov
30be180ab7 docs: update upgrade guide with talosctl upgrade-k8s
This offers automated upgrades for Kubernetes control plane.

Fixes #2520

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-16 08:40:46 -07:00
Andrey Smirnov
15181aeade feat: use architecture-specific image for core k8s components
This is one step towards running Talos on non-amd64 architectures (e.g. arm64).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-16 01:11:40 -07:00
Andrey Smirnov
b4341d8780 feat: upgrade kubernetes to 1.19.1
Release notes: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#v1191

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-11 06:58:12 -07:00
Andrey Smirnov
117c5c3075 feat: implement command talosctl upgrade-k8s
This command handles upgrading Kubernetes control plane from 1.18.x and
1.19.x to 1.19.x.

There's automatic handling of pod-checkpointer to speed up
kube-apiserver upgrades.

Separate PR will add K8s upgrade to integration tests.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-10 14:08:49 -07:00
Andrey Smirnov
788cd15c29 test: add e2e test to the provision (upgrade) tests
Add sonobuoy runner code with log fetching on failure. Use hand-picked
set of e2e tests to run: verify basic pod functionality, verify service
connectivity.

Add option `--run-e2e` to the `talosctl health` to run quick e2e test to
verify cluster health.

Add option to run provision tests with custom CNI, run one track of
provision tests with Cilium.

Bump Cilium to 1.8.2.

Talos 0.6 won't uncordon node automatically after upgrade from 0.5, as
0.5 doesn't put annotation. Workaround that in upgrade tests.

Bump upgrade test version to 0.6.0 release.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-08 13:26:31 -07:00
Spencer Smith
36a935821b docs: update 0.6 links
This PR fixes a few small links that were still pointing to 0.5
resources.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-09-04 11:47:04 -07:00
Andrey Smirnov
2085e9220c fix: change apid container image name to expected value
This is what happens when massive find-replace goes wrong...

Change should be cosmetic though, it doesn't affect operations.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-02 14:40:55 -07:00
Andrew Rynhard
60bd78422b docs: graduate v0.6 docs
This promotes the v0.6 docs from pre-release status to stable, and make v0.6
the default docs.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-02 13:30:03 -07:00
Andrew Rynhard
1bb8fdf1c1 docs: add Kubernetes upgrade guide
This adds docs on how to upgrade Kubernetes.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-09-02 11:30:04 -07:00
Spencer Smith
9e6eb90203 docs: add reset doc
This PR adds a simple doc on how to do a talos machine reset. This
command was introduced all the way back on v0.4 so the docs are added
everywhere.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-08-31 11:53:47 -07:00
Andrey Smirnov
59adf7315d feat: provide option to run Talos under UEFI in QEMU
This also adds integration pipeline tests for UEFI.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-28 12:51:10 -07:00
Spencer Smith
4238d4428b feat: update kubernetes to v1.19.0
This PR version bumps all of the kubnernetes version defaults to the
v1.19.0 release.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-08-26 15:30:36 -07:00
Andrey Smirnov
40c49c4c62 docs: add QEMU provisioner documentation
Mostly copy-paste from Firecracker docs with small fixes.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-24 12:17:47 -07:00
Andrey Smirnov
9531635b6c feat: make boostrap via API default choice in talosctl cluster create
As we're going to make API bootstrapping a preferred method of
bootstrapping Talos clusters, our defaults should reflect that.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-19 13:38:32 -07:00
Andrey Smirnov
7fac9d33d7 chore: update node.js dependencies
This fixes all the deps which have the fix ready, but two deps don't
have updated version yet.

See https://www.npmjs.com/advisories/1548

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-18 13:18:27 -07:00
Andrey Smirnov
bddd4f1bf6 refactor: move external API packages into machinery/
This moves `pkg/config`, `pkg/client` and `pkg/constants`
under `pkg/machinery` umbrella.

And `pkg/machinery` is published as Go module inside Talos repository.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-17 09:56:14 -07:00
Andrew Rynhard
c76237bfb3 docs: fix download link
Fixes a bad link.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-08-16 08:13:58 -07:00
Andrey Smirnov
f755fc2e98 chore: update node dependencies
See https://github.com/advisories/GHSA-wvhm-4hhf-97x9

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-10 16:25:23 -07:00
Andrew Rynhard
92523bc422 refactor: remove structs from config provider
This make the config provider a pure interface definition by removing
all concrete internal types, and making them an interface.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-08-06 13:21:41 -07:00
Spencer Smith
4bb4ea8998 feat: add persist flag to gen config
This PR adds a flag to tweak the persistence value for talosctl gen
config.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-08-06 09:19:58 -07:00
Steve Francis
97c90b259e fix: update AMI link to latest
Update download example to reference latest release
Signed-off-by: Steve Francis <steverfancis@gmail.com>
2020-08-03 11:41:56 -07:00
dependabot[bot]
1b574a0a99 chore: bump elliptic from 6.5.2 to 6.5.3 in /docs/website
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-07-31 06:43:28 -07:00
Andrey Smirnov
50c2eabe3d chore: add aliases to some talosctl commands
Aliases are close to regular UNIX commands.

Fixes #2195

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-07-30 14:58:59 -07:00
Andrey Smirnov
a5d64d97c1 test: update qemu/firecracker provisioners
Fixes #2363 #2364 #2370 #2371

Several changes packed together:

* use compressed `vmlinuz` everywhere, firecracker provisioner
uncompresses it before first use, drop `vmlinux`

* handle reboots in qemu launcher to support reset API case, update
empty disk check to handle reset behavior (erasing partition table)

* make bootloader support default in provisioners, and flag to disable
that

* early support for target architecture for qemu provisioner

This should allow us to use `qemu` in CI/CD (not included into this PR):
integration test passes with qemu.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-07-30 21:17:25 +03:00
Andrew Rynhard
1b491d0a66 feat: upgrade Kubernetes to v1.19.0-rc.3
This brings in the latest version of Kubernetes.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2020-07-29 11:04:50 -07:00