Commit Graph

401 Commits

Author SHA1 Message Date
Alexey Palazhchenko
032e7c6b86
chore: import yaml.v3 consistently
Do not use yaml.v2.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-26 11:36:50 +00:00
Andrey Smirnov
57a77696ef
feat: update Kubernetes to 1.22.1
See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.22.md#changelog-since-v1220

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-23 09:58:02 +00:00
Alexey Palazhchenko
244b08cc19
chore: bump dependencies
Also downgrade some indirect dependencies that don't have a good reason to be updated.

Closes #4111.
Closes #4112.
Closes #4116.
Closes #4117.
Closes #4121.
Closes #4122.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-23 08:49:38 +00:00
Artem Chernyshev
2b614e430e
feat: check if cluster has deprecated resources versions
Fixes: https://github.com/talos-systems/talos/issues/4026

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2021-08-18 23:26:36 +03:00
Andrey Smirnov
0ef8f83acf
chore: bump dependencies via dependabot
PRs #4079 #4080 #4081 #4082 #4083 #4084 #4085

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-16 16:33:52 +03:00
Andrey Smirnov
228b376163
chore: run etcd as non-root user
etcd has two mounts from the host, both of them are chowned to be
accessible by the etcd user:

* data directory
* secrets directory

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-13 18:17:02 +03:00
Andrey Smirnov
33d1c3e425
chore: run apid and trustd services as non-root user
For the `trustd`, this change is simple as it doesn't access any files
on the host filesystem.

For the `apid`, there are more things involved:

* `apid.sock` used for internal API calls should be createable by `apid`
* `runtime.sock` used for apid to COSI communication should be
accessible for `apid`
* `machined.sock` used for proxying calls to machined should be as well
made available to the `apid`.

Plus fixes default permissions for `tmpfs` mountpoints.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-13 16:50:44 +03:00
Andrey Smirnov
e6fa401b66
fix: enable seccomp default profile by default
This enable seccomp profile for all containers launched by Talos: apid,
trustd, etcd and kubelet.

Also by default disallow gaining more privileges in the container
(basically disables setuid). As containers are running as root this is
no-op, but soon we'll have running as non-root users and this becomes
important.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-12 21:26:58 +03:00
Artem Chernyshev
8ddbcc9643
feat: validate if extra fields present in the decoder
This should address issues when the config is a valid yaml but contains
extra fields which may appear there if the indents got messed up somehow
for example.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2021-08-12 20:32:59 +03:00
Andrey Smirnov
5b57a98008
chore: update Go to 1.16.7, Linux to 5.10.57
See:

* https://github.com/talos-systems/tools/pull/144
* https://github.com/talos-systems/pkgs/pull/319
* https://github.com/talos-systems/extras/pull/24

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-12 18:31:03 +03:00
Andrey Smirnov
eefe1c21c3
feat: add new etcd members in learner mode
Fixes #3714

This provides more safe way to join new members to the etcd cluster.

See https://etcd.io/docs/v3.4/learning/design-learner/

With learner mode join there are few differences:

* new nodes are joined one by one, because etcd enforces a single
learner member in the cluster
* learner members are not counted in quorum calculations, so while
learner catches up with the master node, quorum is not affected and
cluster is still operational

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-12 17:56:57 +03:00
Andrey Smirnov
b1c66fbad1
feat: implement Equinix Metal support for virtual (shared) IP
Talos supports automatic virtual IP for the control plane with pure
layer 2 connectivity. Equinix Metal API supports assigning shared IPs to
the nodes, this PR combines existing virtual IP functionality with calls
to EM API to move the IP address on EM side to the leader node.

The only thing which should be supplied in the machine configuration is
the Equinix Metal API token, every other setting is automatically
discovered automatically by Talos.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-12 17:26:59 +03:00
Andrey Smirnov
887c2326a4 release(v0.12.0-alpha.0): prepare release
This is the official v0.12.0-alpha.0 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-11 08:49:34 -07:00
Alexey Palazhchenko
e030b2e8bb chore: use k8s 1.21.3 in CAPI tests for now
Refs #4046.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-10 13:28:37 -07:00
Artem Chernyshev
e08b4f8f9e feat: implement sysctl controllers
Fixed: https://github.com/talos-systems/talos/issues/3686

Replaced sequencer tasks for KSPP and Kubernetes required sysctl props
by the ones set by controllers.

KernelParam flow includes of 3 controllers and 2 resources:
- `KernelParamConfigController` - handles user sysctls coming from v1alpha1
config.
- `KernelParamDefaultsController` - handles our built-in KSPP and K8s
required sysctls.
- `KernelParamSpecController` - consumes `KernelParamSpec`s created by the
previous two controllers, applies them and updates the corresponding
`KernelParamStatus`.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-08-10 13:21:49 -07:00
Artem Chernyshev
585f633710 fix: correctly handle nodoc for struct fields
Also fix the const for `docgen:nodoc` for skipped the whole struct.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2021-08-10 06:24:29 -07:00
Andrey Smirnov
7ca5749ad4 chore: bump dependencies via dependabot
PRs #4033 #4034 #4035 #4036 #4037 #4038 #4039 #4040

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-08-09 08:32:02 -07:00
Andrey Smirnov
571f7db1bb chore: workaround GitHub new release notes limit
GitHub recently introduced limit of 25000 byte for the release notes,
which breaks our release process, as our notes are over the limit.

PR https://github.com/talos-systems/talos/pull/4021 introduced support
for GFM release notes, which are at least 50% smaller.

This PR enables GFM, adds a check for release notes size and pushes
release-notes step to every build so that we known in advance if release
notes are over the limit (vs. the moment we push the release).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-06 11:56:26 -07:00
Alexey Palazhchenko
09d70b7eaf feat: update Kubernetes to v1.22.0
Closes #3967.
Closes #3997.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
2021-08-06 09:06:32 -07:00
Andrey Smirnov
539f42090e chore: bump dependencies via dependabot
Fixes #3993

Fixes #3994

Fixes #3995

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 10:25:17 -07:00
Andrey Smirnov
0c7ce1cd81 feat: remove remnants of bootkube support
Fixes #3951

Bootkube support was removed in Talos 0.9. Talos versions 0.9-0.11
support conversion of self-hosted bootkube-based control plane to the
new style control plane running as static pods managed by Talos.

This commit removes all backwards compatibility and removes conversion
code.

For the k8s controllers, `BootstrapStatus` is removed and a dependency
on `etcd` service status is added (as it was implicitly there via
`BootstrapStatus`).

Remove control plane conversion code.

In k8s upgrade code, remove self-hosted part.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-08-03 07:55:42 -07:00
Alexey Palazhchenko
585152a0be chore: bump dependencies
Closes #3983.
Closes #3984.
Closes #3985.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-26 04:37:25 -07:00
Artem Chernyshev
55e17ccdd1 chore: bump dependencies
Fixes: https://github.com/talos-systems/talos/pull/3954 https://github.com/talos-systems/talos/pull/3955 https://github.com/talos-systems/talos/pull/3956 https://github.com/talos-systems/talos/pull/3957 https://github.com/talos-systems/talos/pull/3958 https://github.com/talos-systems/talos/pull/3959 https://github.com/talos-systems/talos/pull/3960 https://github.com/talos-systems/talos/pull/3961 https://github.com/talos-systems/talos/pull/3962 https://github.com/talos-systems/talos/pull/3963 https://github.com/talos-systems/talos/pull/3964

And update kubelet to 1.21.3.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-07-19 06:06:01 -07:00
dependabot[bot]
33e9d6c984 chore: bump github.com/aws/aws-sdk-go in /hack/cloud-image-uploader
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.39.0 to 1.39.4.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.39.0...v1.39.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 05:06:06 -07:00
Alexey Palazhchenko
eea750de2c chore: rename "join" type to "worker"
Closes #3413.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-09 07:10:45 -07:00
Andrey Smirnov
d930a26502 chore: implement DeepCopy for machine configuration
Resources code extensively uses DeepCopy to prevent in-memory copy of
the resource to be mutated outside of the resource model.

Previous implementation relied on YAML serialization to copy the
machine configuration which was slow, potentially might lead to panics
and it generates pressure on garbage collection.

This implementation uses k8s code generator to generate DeepCopy methods
with some manual helpers when code generator can't handle it.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-07-08 07:21:24 -07:00
Alexey Palazhchenko
71c6f7004e chore: bump go.mod dependencies
Closes #3879, #3880, #3881, #3882, #3883, #3884, #3885, #3886.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-07-05 06:59:14 -07:00
Serge Logvinov
d8602025c8 chore: update containerd config version 2
* Rename key cri -> io.containerd.grpc.v1.cri
* Disable plugins aufs,zfs,devmapper,btrfs (less warning messages on
  boot time)

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2021-07-01 09:08:54 -07:00
Alexey Palazhchenko
f228af4061 chore: bump go.mod dependencies
Closes #3848, #3849, #3850, #3851.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-06-28 02:25:43 -07:00
Spencer Smith
2060ceaa0b chore: add CAPI version to CI setup
This PR makes sure we pin to a known CAPI version because with the new
v0.4.x released, we'll fail until we support the v1alpha4 APIs.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-06-25 10:44:07 -04:00
Spencer Smith
0731be908b feat: add cloud images to releases
This PR updates our CI so that when we release talos, a json file
containing our cloud images for AWS will be published as a release
asset.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-06-23 16:40:54 -04:00
Spencer Smith
898673e8d3 chore: update e2e tests to use latest capi releases
This PR version bumps cacppt, cabpt, capa, capg, and cluster api itself

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2021-06-22 12:37:22 -07:00
Andrey Smirnov
004885a379 feat: update Linux kernel to 5.10.45, etcd to 3.4.16
This also pulls in HP ILO driver, dmesg restrict mode by default and
dm-crypt options.

See talos-systems/pkgs#289, talos-systems/pkgs#290,
talos-systems/pkgs#287

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-22 02:42:09 -07:00
Alexey Palazhchenko
42c16f67f4 chore: bump dependencies
Update k8s to 1.21.2.

See #3787 #3788 #3789 #3790 #3791 #3792 #3793 #3794 #3795 #3796 #3798.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-06-21 07:05:41 -07:00
Andrey Smirnov
e13d905c2e release(v0.11.0-alpha.1): prepare release
This is the official v0.11.0-alpha.1 release.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-18 14:07:24 -07:00
Alexey Palazhchenko
06209bba28 chore: update RBAC rules, remove old APIs
Refs #3421.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-06-18 09:54:49 -07:00
Andrey Smirnov
654dcad475 chore: bump dependencies via dependabot
See #3751 #3752 #3753 #3754 #3755 #3756 #3756 #3757

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-16 07:28:17 -07:00
Andrey Smirnov
f2ae9cd0c1 feat: replace networkd with new network implementation
This removes networkd, updates network ready condition, enables all the
controllers which were previously disabled.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-15 17:37:28 -07:00
Alexey Palazhchenko
0f168a8801 feat: add configuration for enabling RBAC
Refs #3421.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-06-08 09:30:41 -07:00
Andrey Smirnov
8b0763f6a2 chore: bump dependencies via dependabot
PRs #3720 #3721 #3722 #3723 #3724 #3725 #3726
    #3727 #3728 #3729

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-07 06:28:51 -07:00
Andrew Rynhard
a71053fcd8 feat: default to bootstrap workflow
Changes `gen config` to output `controlplane` and `join` machine config
types only. Users can manually set the `type` to `init` if they need to.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
2021-06-03 11:29:56 -07:00
Andrey Smirnov
5811f4dda1 feat: implement link (interface) controllers
The structure of the controllers is really similar to addresses and
routes:

* `LinkSpec` resource describes desired link state
* `LinkConfig` controller generates `LinkSpecs` based on machine
configuration and kernel cmdline
* `LinkMerge` controller merges multiple configuration sources into a
single `LinkSpec` paying attention to the config layer priority
* `LinkSpec` controller applies the specs to the kernel state

Controller `LinkStatus` (which was implemented before) watches the
kernel state and publishes current link status.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-06-01 09:36:25 -07:00
Alexey Palazhchenko
c036b94948 chore: bump dependencies
Closes #3699, #3668, #3698, #3697, #3696, #3695, #3694, #3693, #3692.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-05-31 06:12:06 -07:00
Artem Chernyshev
a4d67a0182 feat: add the ability to disable CoreDNS
Fixes: https://github.com/talos-systems/talos/issues/3556

Introduce `coredns.disabled` flag to the machine config that allows
turning off coredns deployment during cluster bootstrap.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-05-28 10:33:14 -07:00
Artem Chernyshev
76dbfb3699 feat: add ability to mark MBR partition bootable
Fixes: https://github.com/talos-systems/talos/issues/3532

Machine install section now has `markMBRBootable` option.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-05-27 12:44:50 -07:00
Andrey Smirnov
c096294663 chore: prepare for 0.11 release series
Remove `parsebool.sh` script as it's causing issues when the
release-tool is running `Makefile` commands to extract variable values.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-05-26 08:49:22 -07:00
Andrey Smirnov
59cfd312c1 chore: bump dependencies via dependabot
There were some upstream code changes in etcd, some code got moved
around.

PRs #3651 #3652 #3653 #3654 #3655 #3655 #3656 #3657 #3658
    #3659 #3660 #3661 #3662 #3663

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-05-24 12:15:15 -07:00
Alexey Palazhchenko
4fe6912143 test: better talosctl ls tests
Refs #3018.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2021-05-20 03:29:21 -07:00
Andrey Smirnov
c6567fae9c chore: dependabot updates
PRs #3622 #3623 #3624 #3625 #3627 #3628

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-05-17 07:46:24 -07:00
Andrey Smirnov
76e38b7b82 feat: update Kubernetes to 1.21.1
See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2021-05-13 08:05:08 -07:00