2289 Commits

Author SHA1 Message Date
Alexey Palazhchenko
9f7d67ac71 chore: fix typo
Actually share golangci-lint cache.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-25 15:14:30 -07:00
Andrey Smirnov
672c970739 fix: allow convert-k8s --remove-initialized-keys with K8s cp is down
The command `--remove-initialized-key` is the last resort to convert
control plane when control plane is down for whatever reason, so it
should work when control plane is not available.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-25 14:06:08 -07:00
Alexey Palazhchenko
fb605a0fc5 chore: tweak nolintlint settings
Copy from kres manually for now.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-25 13:56:16 -07:00
Alexey Palazhchenko
1f5a0c4065 fix: resolve the issue with Kubernetes upgrade
Add missing cases, refactoring.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-25 12:48:28 -07:00
Spencer Smith
74b2b5578c docs: update AWS docs to ensure instances are tagged
This PR updates our AWS docs so that we specify a tag when creating
instances. This makes it easier to know which VMs were created as part
of this process, as well as quickly spot the init node.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-03-25 11:55:19 -04:00
Alexey Palazhchenko
dc21d9b4b0 chore: remove old file
To prevent confusion.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-25 08:39:54 -07:00
Andrey Smirnov
966caf7a67 chore: remove unused module replace directives
They were required long time ago, doesn't look like we need it now.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-25 08:16:25 -07:00
Spencer Smith
98b22f1e0b feat: show short options in talosctl kubeconfig
This PR just fixes a teeny usability problem I saw yesterday with Steve,
where it's not immediately clear that you don't have to type the entire
word when you encounter an existing context when pulling kubeconfig.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-03-25 09:55:24 -04:00
Andrey Smirnov
51139d54d4 chore: cache go modules in the build
This does proper caching for Go modules so that when go.mod/go.sum are
changed, only updated modules are downloaded vs. all of them.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-25 06:54:57 -07:00
Artem Chernyshev
65701aa724 fix: resolve the issue with DHCP lease not being renewed
Very easily reproduced when you start a node with a Dynamic IP.
Normally it should renew lease after TTL/2, but that doesn't happen, so
the node starts to get next IP one after another.

After looking at packets sent by other clients, found out that they
have `Client IP address` equal to the IP given by the DHCP server.

Additionally, changed DHCP client to send Request packets directly to the DHCP server after getting an offer.
It looks like DHCP spec states that you should use unicast request directly to DHCP server, not broadcast.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-25 06:44:23 -07:00
Andrey Smirnov
711f5b23be fix: config validation: CNI should apply to cp nodes, encryption config
Encryption config should be checked for state partition as well.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-25 02:42:21 -07:00
Spencer Smith
5ff491d968 fix: allow empty list for CNI URLs
This PR fixes a bug where, only when init nodes were used, we were
throwing an error during validation if there were no URLs in the list
for custom CNIs. We actually allow this empty list now so folks can
BYO-CNI.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-03-24 11:48:09 -07:00
Spencer Smith
946e74f047 docs: update path for kernel downloads in qemu docs
This PR fixes a docs bug where the name of the kernel and init to
download were incorrect for qemu.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-03-24 09:48:12 -07:00
Alexey Palazhchenko
ed272e604e feat: update Kubernetes to 1.21.0-beta.0
See CHANGELOG:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md

Refs #3329.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-24 07:36:54 -07:00
Andrey Smirnov
b0209fd29d refactor: move networkd, timed APIs to machined, remove routerd
This moves implementation of the user-facing APIs to the machined, and
as now all the APIs are implemented by machined, remove routerd and
adjust apid to proxy to machined.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-24 00:00:28 -07:00
Artem Chernyshev
6ffabe5169 feat: add ability to find disk by disk properties
Fixes: https://github.com/talos-systems/talos/issues/3323

Not exactly matching with udevd generated `by-<id>` symlinks, but should
provide sufficient amount of property selectors to be able to pick
specific disks for any kind of disk: sd card, hdd, ssd, nvme.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-23 14:23:02 -07:00
Andrey Smirnov
ac8764702f refactor: move apid, routerd, timed and trustd to single executable
This removes container images for the aforementioned services, they are
now built into `machined` executable which launches one or another
service based on `argv[0]`.

Containers are started with rootfs directory which contains only a
single executable file for the service.

This creates rootfs on squashfs for each container in
`/opt/<container>`.

Service `networkd` is not touched as it's handled in #3350.

This removes all the image imports, snapshots and other things which
were associated with the existing way to run containers.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-23 09:48:11 -07:00
Andrey Smirnov
89a4b09fe8 refactor: run networkd as a goroutine in machined
This removes networkd as a separate container and image.

Reasons:

* `machined` becomes more and more bound into the core flow - now it
interacts with `etcd` for VIPs, so container has more and more
mounts/permissions
* it should be easier to COSIfy machined piece by piece if we have it
running in the same process
* initramfs size

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-23 06:22:49 -07:00
Alexey Palazhchenko
f4a6a19cd1 chore: update sonobuoy
To stay current.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-23 04:49:44 -07:00
Andrey Smirnov
dc294db16c chore: bump dependencies via dependabot
PRs #3336 #3337 #3338 #3339

Also bump proto tools via talos-systems/tools#133

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-22 13:58:08 -07:00
Andrey Smirnov
2b1641a3b5 docs: add AMIs for Talos 0.9.0
Not all the regions were able to process the request, so list is a bit
shorter than usual.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-22 11:58:28 -07:00
Andrew Rynhard
79ceb428d4 docs: make v0.9 the default docs
This makes the v0.9 release the default documentation.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2021-03-22 11:20:20 -07:00
Andrey Smirnov
a5b62f4dc2 docs: add documentation for Talos 0.10
Move default docs generation to 0.10 folder.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-22 06:24:39 -07:00
Andrey Smirnov
ce795f1cea fix: command etcd remove-member shouldn't remove etcd data directory
There are two APIs and `talosctl` commands:

* `etcd leave` removes the member from the cluster and removes etcd
data directory for the called node
* `etcd remove-member <node>` removes some other node from the etcd
cluster, but it doesn't affect called node state

This fixes confusing naming of the methods vs. what they're doing.

Fixes #3340

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-22 02:11:06 -07:00
Jorik Jonker
aab49a167b fix: repair zsh completion
Cobra does not hook the ZSH completion rules, as it appears. Tools with
working ZSH cobra completion (helm, kubectl) do so by printing the hook
(`compdef _<completion> <tool>`) themselves.

Fixes #3318

Signed-off-by: Jorik Jonker <jorik@kippendief.biz>
2021-03-21 13:57:42 -07:00
Artem Chernyshev
fc9c416a3c fix: build rockpi4 metal image as part of CI build
Added rockpi_4 to the list of sbcs targets in the Makefile.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-19 21:30:36 -07:00
Andrey Smirnov
125b86f4ef fix: upgrade-k8s bug with empty config values and provision script
First, if the config for some component image (e.g. `apiServer`) is empty,
Talos pushes default image which is unknown to the script, so verify
that change is not no-op, as otherwise script will hang forvever waiting
for k8s control plane config update.

Second, with bootkube bootstrap it was fine to omit explicit kubernetes
version in upgrade test, but with Talos-managed that means that after
Talos upgrade Kubernetes gets upgraded as well (as Talos config doesn't
contain K8s version, and defaults are used). This is not what we want to
test actually.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-19 12:05:31 -07:00
Alexey Palazhchenko
8b2d228dc4 chore: add script for starting registry proxies
To avoid copying and pasting it from the documentation every time.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-19 09:37:47 -07:00
Alexey Palazhchenko
f7d276b854 chore: remove old osctl reference
One place was missed.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-19 08:08:58 -07:00
Alexey Palazhchenko
5b14d6f2b8 chore: fix make help output
`e2e-%` was missing due to bad regex.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-19 06:08:43 -07:00
Andrey Smirnov
f0512dfce9 feat: update Kubernetes to 1.20.5
See CHANGELOG:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#changelog-since-v1204

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-19 03:14:46 -07:00
bzub
24cd0a2067 feat: publish talosctl container image
Creates a new container image and corresponding Makefile target.

Signed-off-by: bzub <Bryan.Zubrod@target.com>
2021-03-18 13:25:32 -07:00
Alexey Palazhchenko
6e17102c21 chore: remove unused code
Leftovers of the old blockdevice library.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-18 06:43:01 -07:00
Andrey Smirnov
8810440744 docs: add control plane in-depth guide
Add FAQ on initial time sync.

Add 0.9 new videos.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-17 11:23:59 -07:00
Alexey Palazhchenko
ecf034496e chore: bump Go to 1.16.2
Bump tools, pkgs, and extras.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-17 10:35:37 -07:00
Andrey Smirnov
cbc38418d8 release(v0.10.0-alpha.0): prepare release
This is the official v0.10.0-alpha.0 release.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-17 08:40:09 -07:00
Andrey Smirnov
3455a8e818 chore: use new release tool for changelogs and release notes
This replaces `git-chglog` with the `talos-systems/release-tool`.

We need to make sure we update `hack/release.toml` as we do PRs to make
sure we highlight any important feature or update as we go.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-17 07:17:38 -07:00
Alexey Palazhchenko
08271ba931 chore: use Go 1.16 language version
It affects some languages features and go subcommands.
https://golang.org/ref/mod#go-mod-file-go

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-17 06:20:39 -07:00
Alexey Palazhchenko
7662d033bf fix: talosctl health should not check kube-proxy when it is disabled
Fixes #3299.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-16 13:21:36 -07:00
Alexey Palazhchenko
0dbaeb9e65 chore: update tools, use new generators
To stay current.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-16 11:17:15 -07:00
Artem Chernyshev
e31790f6f5 fix: properly format spec comments in the resources
`os-runtime` now writes `yaml` block as raw yaml bytes instead of
decoding it into `yaml.Node` and encoding that `yaml.Node` back to YAML.
The reason is that `go-yaml` comments decoder can't really handle
comment placement properly, so it messes up indents here and there.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-15 14:21:57 -07:00
Spencer Smith
78d384ebb6 test: update aws cloud provider version
This PR makes sure we set a cloud provider version, which will make our
AWS tests pass again.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-03-15 13:45:50 -07:00
Andrey Smirnov
3c5bfbb473 fix: don't touch any partitions on upgrade with --preserve
This fixes a case of upgrade from 0.9.0-alpha.4 to 0.9.0-beta.0. With
introduced proper partition alignment and physical block size != 512,
partitions before ephemeral will be moved around a bit (due to the
alignment), and `STATE` partition size might change a bit.

If encryption is enabled, contents are preserved as raw bytes, so
partition size should be exactly same during restore.

Drop code (mostly tests) which handled 0.6 to 0.7 upgrades.

On upgrade with preserve don't touch any partitions, at least for 0.8 ->
0.9 layout hasn't changed.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-15 12:25:53 -07:00
Alexey Palazhchenko
891f90fee9 chore: update Linux to 5.10.23
Update pkgs.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-03-15 09:52:02 -07:00
Andrey Smirnov
d4d77882e3 chore: update dependencies via dependabot
See #3301 #3302

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-15 06:12:03 -07:00
Seán C McCord
2e22f20bd8 docs: minor fixes to getting started
Fixes a few minor errors in the Getting Started doc.

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2021-03-12 13:06:47 -08:00
Andrey Smirnov
ca8a5596c7 chore: fix provision tests after changes to build-container
CNI was removed from build-container which works fine for
`talosctl cluster create` clusters as it installs its own CNI, but fails
for upgrade tests as they were never updated for the CNI bundle.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-12 09:59:15 -08:00
Andrey Smirnov
4aae924c68 refactor: provide explicit logger for networkd
This changes will make easier running networkd as a goroutine in machined.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-03-12 09:54:09 -08:00
Artem Chernyshev
22f375300c chore: update golanci-lint to 1.38.0
Fix all discovered issues.
Detected couple bugs, fixed them as well.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-12 06:50:02 -08:00
Artem Chernyshev
83b4e7f744 feat: add Rock pi 4 support
Another nice addition to the list of supported SBCs.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-12 05:08:29 -08:00