54 Commits

Author SHA1 Message Date
Spencer Smith
aed8c06730 chore: rename v1 node configs to v1alpha1
This PR moves to using v1alpha1 as the inital node config version, so
we can graduate these configs a little more cleanly later on.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-09-09 13:03:49 -04:00
Seán C McCord
3c41770478 fix: translate machine.network to networking.os
Add translation for v1 to v0 machine networking.  Also adds "Ignore"
property to v1 network interfaces.

Fixes #1134

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-08 18:20:10 -07:00
Seán C McCord
beecb70374 feat: Allow spec of canonical controlplane addr
Broke the binding between the discrete IP addresses of the control plane
elements and the ControlPlaneEndpoint.  This allows the specification of
a canonical controlplane address which may optionally be a DNS name.

Fixes #1131

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-08 17:18:52 -07:00
Seán C McCord
f7ad24ec4f feat: allow network interface to be ignored
Added a property to userdata to allow a network interface to be ignored,
such that Talos will perform no operations on it (including DHCP).

Also added kernel commandline parameter (talos.network.interface.ignore)
to specify a network interface should be ignored.

Also allows chaining of kernel cmdline parameter Contains() where the
parameter in question does not exist.

Fixes #1124

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-07 16:33:52 -07:00
Andrew Rynhard
2e8f393fc5 chore: remove unused init token
This removes a token that we never used. Right now its just noise, so
let's remove it.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-27 21:36:52 -07:00
Andrew Rynhard
d4770d41ad feat: run installs via container
This moves to performing installs via a container.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-27 15:01:20 -05:00
Spencer Smith
739e232896 feat: upgrade kubernetes to v1.16.0-beta.1
This PR will upgrade to the latest beta of v1.16 in order to get us
closer to catching the v1.16.0 release as soon as it drops.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-27 13:25:33 -04:00
Spencer Smith
f85750cdca feat: generate and use v1 machine configs
This PR will implement the v1 machine config proposal. This will allow
for a streamlined config for talos nodes.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-26 19:36:14 -04:00
Spencer Smith
6f8e089271 chore: use kubeadm v1beta2 structs everywhere
This PR will move to using the external kubeadm v1beta2 structs for our
code base. This will hopefully allow for more stable integrations with
kubeadm in the long term, as well as solve some needs we have in the
machine config rewrite.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-08-26 12:07:36 -04:00
Seán C McCord
7b217c79d7 feat: allow specification of additional API SANs
Adds handler for specification of additional subjet alt names (SANs) for
the API Server when generating a new cluster configuration using
`osctl`.

Fixes #800

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-08-21 16:25:54 -07:00
Brad Beam
313c118ad0 refactor(networkd): Replace networkd with a standalone app
This is a major rewrite of our network subsystem.

- This changes networkd to run as a standalone app versus internal goroutine
- This changes out the netlink package with the more idiomatic netlink/rtnetlink
  packages
- This changes the initial network bootstrap/discovery from using a single
  interface to attempting to bring up all interfaces
- This moves us back on to the upstream dhcp library

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-21 13:24:51 -05:00
Seán C McCord
cb1210719a fix: enclose target in quotes
Fixes issue #1049

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-08-17 21:19:10 -07:00
Brad Beam
801db9b9b9 chore: Add log message for userdata backoff.
This should make it clearer when the download failed what is going on.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-16 10:02:24 -07:00
Andrew Rynhard
a116145c1b feat: rename DATA partition to EPHEMERAL
This changes the data partition name to something more appropriate. We
chose ephemeral to make it very clear that the disk should not be used
for application data.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-15 08:00:22 -07:00
Brad Beam
249acda74a feat: Allow hostname to be specified in userdata
This sets up the ability to define hostname via userdata. I dont expect
this will get used publicly much, but provides a mechanism to convey
the hostname from various sources internally.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-08-14 22:41:27 -05:00
Andrew Rynhard
09693a26c9 chore: update go modules to use Kubernetes v1.16.0-alpha.3
This is not ideal, but it works. We essentially need to start using
replace statements in order to pull in the modules we need.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-14 15:34:09 -07:00
Seán C McCord
ae77d6e053 fix: format IPv6 host entries properly
This reworks a bunch of the formatting for the userdata generation to
output a cleaner talos config when using IPv6 masters and `osctl config
generate`.

Please note that this changes the scope of concern for master indexing,
keeping `osctl` blissfully unaware of the master-reference chaining.
All it does is report the index of the master it is trying to generate.
The generator itself handles the reference chaining.

Fixes #916, fixes #917, and fixes #918

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-08-12 11:35:38 -07:00
Andrew Rynhard
90c91807bd refactor: restructure the project layout
This change moves packages into more appropriate places.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-08-01 22:19:42 -07:00
Andrew Rynhard
e63c882b89 refactor: split machined into phases
This change aims to standardize the boot process. It introduces the
concept of a phase, which is comprised of tasks. Phases are ran in serial and
the tasks that make up a phase are ran concurrently.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-29 12:40:03 -07:00
Andrew Rynhard
0ec17e4169 feat: run rootfs from squashfs
This change moves the rootfs to a squashfs image.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-25 08:38:31 -07:00
Seán C McCord
8884b85905 fix(trustd): allow hostnames for trustd endpoints
Fixes #666

Also adds IPv6 to tests for trustd endpoints

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-07-24 15:28:03 -07:00
Spencer Smith
4a31b66850 feat: allow mtu specification for network devices
This PR is needed so we can specify an MTU of 1460 for GCE VMs

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-07-17 13:51:23 -07:00
Andrew Rynhard
d197d5c6cd feat: add install flag for extra kernel args
In addition to adding a flag, this adds a field to the user data that allows
for extra kernel arguments to be specified.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-07-12 13:27:44 -07:00
Brad Beam
40d3484469
refactor: Userdata.download supports functional args (#819)
This also adds in support for downloading userdata that is initially encoded in
base64.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-07-03 10:05:20 -05:00
Spencer Smith
18f59d8f0b
fix: move to crypto/rand for token gen (#794)
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-06-27 18:08:39 -04:00
Andrew Rynhard
ebc725afa6
feat: add support for upgrading init nodes (#761)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-06-24 15:25:32 -07:00
Spencer Smith
8a89ecd679
fix: we don't need no stinkin' localapiendpoint (#741)
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-06-19 20:36:47 -04:00
Brad Beam
8537e7eeb6
feat(init): Add support for control plane join config (#700)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-31 12:21:00 -05:00
Spencer Smith
313a988292
fix: ensure shebang at top of userdata (#695)
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-05-31 09:02:55 -04:00
Brad Beam
6cf260c5af fix(osctl): Generate correct config with master IPs (#681)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-27 18:59:41 -07:00
Brad Beam
d8249c8779
refactor(init): Allow kubeadm init on controlplane (#658)
* refactor(init): Allow kubeadm init on controlplane

This shifts the cluster formation from init(bootstrap) and join(control plane)
to init(control plane).

This makes use of the previously implemented initToken to provide a TTL for
cluster initialization to take place and allows us to mostly treat all control
plane nodes equal. This also sets up the path for us to handle master upgrades
and not be concerned with odd behavior when upgrading the previously defined
init node.

To facilitate kubeadm init across all control plane nodes, we make use of the
initToken to run `kubeadm init phase certs` command to generate any missing
certificates once. All other control plane nodes will attempt to sync the
necessary certs/files via all defined trustd endpoints and being the startup
process.

* feat(init): Add service runner context to PreFunc

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-24 16:05:49 -05:00
Brad Beam
a64de7ed51
feat(init): Add initToken parameter to userdata (#664)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-20 14:23:38 -05:00
Andrew Rynhard
d36d4404bd
fix(osctl): output config without localAPIEndpoint (#665)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-16 21:18:42 -07:00
Andrew Rynhard
ea4d3c4f66
feat: add bootstrap token package (#657)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 14:54:20 -07:00
Andrew Rynhard
265a94f40e
fix: allow no trustd endpoints to be specified (#634)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 11:11:05 -07:00
Andrew Rynhard
9b5b2f0c7c
fix(osctl): output talosconfig on generate (#627)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-08 20:27:50 -07:00
Brad Beam
2c0ec43a0b
feat: Add additional kubernetes certs (#619)
Add support for supplying all of the necessary CA cert and key pairs for
kubeadm use.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-07 11:30:10 -05:00
Brad Beam
1e3381da7b
chore: Fix kubeadm warnings (#612)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-03 20:59:31 -05:00
Brad Beam
a5d31d97ff
feat: Validate userdata (#593)
* feat: Validate userdata

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-02 13:10:16 -05:00
Andrew Rynhard
f045b10dd4
fix: add support for trustd username and password auth back in (#604)
We should still support username and password for backwards compatibility.
This also sets us up for for implementing auth for users using something like LDAP in the future.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-30 17:50:30 -07:00
Andrew Rynhard
6e555c4559
feat(osctl): expose osd and api server ports on master-1 (#592)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-29 11:51:39 -07:00
Andrew Rynhard
ea99788ef1
feat(trustd): use a token instead of username and password (#586)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 12:18:56 -07:00
Andrew Rynhard
9b4fec0fa8
feat(osctl): add ability to create docker based clusters (#584)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-28 12:06:03 -07:00
Andrew Rynhard
20662217a2
feat: add ability to generate userdata secrets (#581)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 20:56:40 -07:00
Andrew Rynhard
2f6d5e0260
feat: add package for generating userdata (#574)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-26 12:48:26 -07:00
Andrew Rynhard
a817e744c7
feat: remove blockd (#536)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-14 16:57:37 -07:00
Andrew Rynhard
ae9e6ac282
feat: upgrade Kubernetes to v1.14.1 (#530)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-14 07:20:34 -07:00
Andrew Rynhard
2faf36bd67
feat: add support for extra disk management (#524)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-13 22:41:03 -07:00
Andrew Rynhard
7688de6a3a
chore: upgrade golangci-lint to v1.16.0 (#515)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-04-09 21:53:35 -07:00
Brad Beam
3151f9d7a3 feat(initramfs): Add support for specifying static routes (#513)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-04-09 20:21:05 -07:00