17 Commits

Author SHA1 Message Date
Andrey Smirnov
a2efa44663 chore: enable gci linter
Fixes were applied automatically.

Import ordering might be questionable, but it's strict:

* stdlib
* other packages
* same package imports

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-11-09 08:09:48 -08:00
Andrey Smirnov
8560fb9662 chore: enable nlreturn linter
Most of the fixes were automatically applied.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-11-09 06:48:07 -08:00
Andrey Smirnov
ccba113809 fix: improve logging and errors for extra manifests by URL
Just more logging and error context.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-12 13:00:25 -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
Andrey Smirnov
14ad0674d3 feat: update Flannel to 0.12, support for arm64
This updates bootkube-plugin with PR
https://github.com/talos-systems/bootkube-plugin/pull/21.

Flannel image is chosen based on host architecture.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-09-15 08:04:29 -07:00
Andrey Smirnov
6a7cc02648 fix: handle bootkube recover correctly, support recovery from etcd
Bootkube recover process (and `talosctl recover`) was actually
regenerating assets each time `recover` runs forcing control plane to be
at the state when cluster got created. This PR fixes that by running
recover process correctly.

Recovery via etcd was fixed to handle encrypted etcd data:
it follows the way `apiserver` handles encryption at rest, and as at
the moment AES CBC is the only supported encryption method, code simply
follows the same path.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-18 14:24:14 -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
Andrey Smirnov
2697b99b7d refactor: extract pkg/net as github.com/talos-systems/net
This extracts common package as new module/repository.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-08-14 11:04:50 -07:00
Andrey Smirnov
47608fb874 refactor: make pkg/config not rely on machined/../internal/runtime
This makes `pkg/config` directly importable from other projects.

There should be no functional changes.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-07-29 12:40:12 -07:00
Andrey Smirnov
41d5f7859a chore: update golangci-lint to 1.28.3
Fixes #2272

`gofumpt` is now included into `golangci-lint`, but not the
`gofumports`, so we keep it using it as separate binary, but we keep
versions in sync with `golangci-lint`.

This contains fixes from:

* `gofumpt` (automated, mostly around octal constants)
* `exhaustive` in `switch` statements
* `noctx` (adding context with default timeout to http requests)

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-07-16 08:05:42 -07:00
Andrey Smirnov
81d1c2bfe7 chore: enable godot linter
Issues were fixed automatically.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-06-30 10:39:56 -07:00
Spencer Smith
90115bb3ef feat: update kubernetes to 1.19.0-beta.1
This PR brings in all changes necessary to deploy kubernetes 1.19.x.

It relies on an update to our bootkube-plugin project, as well as
implementation of some Image() functions for our various control plane
components, since they are all distinct images and not just hyperkube.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-06-10 15:01:11 -04:00
Seán C McCord
c1299d3ff0 feat: allow dual-stack support with bootkube wrapper
Handle dual-stack configurations with the bootkube wrapper.  This uses
the new PodCIDRs and ServiceCIDRs `asset.Config` parameters in bootkube.
It also relies on the bootkube-plugin features for manipulating
kube-proxy config and installing the dual-stack DNS service.

Fixes #2055

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2020-04-28 20:10:58 -07:00
Andrew Rynhard
49307d554d refactor: improve machined
This is a rewrite of machined. It addresses some of the limitations and
complexity in the implementation. This introduces the idea of a
controller. A controller is responsible for managing the runtime, the
sequencer, and a new state type introduced in this PR.

A few highlights are:

- no more event bus
- functional approach to tasks (no more types defined for each task)
  - the task function definition now offers a lot more context, like
    access to raw API requests, the current sequence, a logger, the new
    state interface, and the runtime interface.
- no more panics to handle reboots
- additional initialize and reboot sequences
- graceful gRPC server shutdown on critical errors
- config is now stored at install time to avoid having to download it at
  install time and at boot time
- upgrades now use the local config instead of downloading it
- the upgrade API's preserve option takes precedence over the config's
  install force option

Additionally, this pulls various packes in under machined to make the
code easier to navigate.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2020-04-28 08:20:55 -07:00
Andrew Rynhard
3791fb5cbc refactor: use upstream bootkube
This moves us off of our bootkube fork and makes us of our bootkube
plugin.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2020-04-21 10:27:01 -07:00
Niklas Wik
dba6de506e feat: add extra headers to fetch of extraManifests
Provides capability to add extra headers in cases where files can only be fetched with token based authenction.

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

feat: extra manifest headers for fetching manifests

- Changed config to map of key value pairs.

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

fix: added docs for new extra headers fetch

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

fix: fix linter issue

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
2020-04-15 06:51:39 -07:00
Andrey Smirnov
2294a65972 feat: move bootkube out as full service
This moves `bootkube start` into container which runs pretty much like
any other Talos service.

This resolves issues with bootkube log and provides better isolation.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-03-27 23:07:11 +03:00