979 Commits

Author SHA1 Message Date
u5surf
7c272c900d chore: Improve error messages if there is a network config overlap
It can be cleared the next steps for a new user.

Signed-off-by: u5surf <u5.horie@gmail.com>
2019-10-08 20:39:28 -07:00
Andrew Rynhard
89789fe0a6 fix: catch panics in boot go routine
The builtin recover func is scoped to the current go routine, and since
our boot sequence is kicked off in its' own go routine, we were failing
to recover from panics.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 19:57:39 -07:00
Andrew Rynhard
828675484d fix: set target if specified on command line
This overrides the target defined in the config if a target is
specified on the command line.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 19:48:13 -07:00
Andrew Rynhard
4454afef2f feat: default docker based cluster to 1 master
The goal with the docker based cluster is to provide developers with an
easy way to run Kubernetes on their local machines. Most of the time,
they won't need more than 1 master. This defaults cluster creation to 1
master.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 19:04:54 -07:00
Andrew Rynhard
9ff31cd5d9 fix: update bootkube fork to fix pod-checkpointer
This brings in an updated version of our fork so that pod-checkpointer
will run properly.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 18:39:04 -07:00
Seán C McCord
877c8a0b17 fix: ignore case in install platform check
Because `platform.Name()` returns the capitalized name but the baremetal
platform kernel commandline option expects the lowercase 'metal', we
ignore the case of the platform when doing the platform match checking
in `ostctl install`.

Fixes #1249

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-10-08 14:57:30 -07:00
Andrew Rynhard
ef86b3f367 fix: create etcd data directory
This ensures that the data directory for etcd is exists before starting
etcd.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 14:48:04 -07:00
Andrew Rynhard
04313bd48c feat: add CNI, and pod and service CIDR to configurator
This adds more methods to the Cluster interface that allows for more
granular control of the cluster network settings.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-08 07:53:27 -07:00
Andrew Rynhard
b29391f0be feat: use bootkube for cluster creation
This replaces kubeadm with bootkube.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-07 17:17:57 -07:00
Brad Beam
7069f97eb4 docs: Add machine config docs
Restructure configuration section to highlight v0/v1alpha1 differences.
Removed old configuration material.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-07 17:30:55 -05:00
Brad Beam
eb677124c3 chore: Add additional cert info to etcd peer cert.
Adds `CommonName` and additional DNS names ( hostname, localhost ) to the peer cert

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-05 09:58:28 -07:00
Andrew Rynhard
4ae8186107 feat: add configurator interface
This moves from translating a config into an internal config
representation, to using an interface. The idea is that an interface
gives us stronger compile time checks, and will prevent us from having to copy
from on struct to another. As long as a concrete type implements the
Configurator interface, it can be used to provide instructions to Talos.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-04 07:53:09 -07:00
Andrew Rynhard
86538e8124 chore: prepare release v0.2.0
This is the official v0.2.0 release.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-03 20:30:25 -07:00
Andrew Rynhard
e8dbf108e2 feat: add etcd service
This allows users to create an etcd service using the host init system.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-03 12:54:19 -07:00
Brad Beam
3ba04cb67b feat: Discover platform external addresses
This introduces the functionality for discovering external addresses configured on an intance.
This allows us to automatically append these external addresses to our certificate SANs so we can
access the machines from these addresses without having to know about them ahead of time.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-01 20:34:16 -05:00
Spencer Smith
0d694f88c3 chore: upgrade tools for go v1.13.1
This PR will upgrade the tools container used for building talos.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-01 17:15:53 -04:00
Spencer Smith
dfe429a8b3 chore: bump kernel to 5.2.18
This PR pulls in the latest kernel container, containing v5.2.18.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-01 17:00:52 -04:00
Brad Beam
6038c4efe0 feat: Add kubeadm flex on etcd if service is enabled
This allows us to dynamically set in the kubeadm configuration an external etcd instance.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-01 13:33:52 -07:00
Andrew Rynhard
eb8339bb0b feat: add etcd service to config
This adds a struct for configuring etcd.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-01 13:06:21 -07:00
Brad Beam
01426964f6 feat: Add etcd ca generation to userdata.Generate
Allow us to generate/manage tls assets external to kubeadm.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-01 09:44:31 -07:00
Andrew Rynhard
9e9154b8f5 feat: discover control plane endpoints via Kubernetes
This change allows for discovery of the control plane IPs. The
motivation behind this is to remove the static IP requirement. The
endpoints are discovered by machined, and passed into OSD as arguments
in order to avoid the need to mount /var/lib/kubelet/pki.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-30 11:39:24 -07:00
Seán C McCord
5686ba2db3 feat: Allow env override of hack/qemu image location
This fixes #1220

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-29 07:10:20 -07:00
Andrew Rynhard
c44f7669e5 feat: allow Kubernetes version to be configured
This allows for users to specifify which version of Kubernetes to use.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-27 17:12:27 -07:00
Andrew Rynhard
6ec5cb02cb refactor: decouple grpc client and userdata code
This detangles the gRPC client code from the userdata code. The
motivation behind this is to make creating clients more simple and not
dependent on our configuration format.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-26 14:18:53 -07:00
Andrew Rynhard
607d68008c feat: use kubeadm to distribute Kubernetes PKI
This removes the trustd-based PKI distribution method in favor of
kubeadm's method.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-25 11:13:07 -07:00
Andrew Rynhard
f244673856 feat: write audit policy instead of using trustd
This changes the controlplane logic to write the audit policy to disk
from a common template instead of using trustd to distribute it.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-25 10:12:31 -07:00
Andrew Rynhard
4ff8824182 feat: add aescbcEncryptionSecret field to machine config
This change allows us to generate the EncryptionConfig on each
controlplane node. The benefit is that we no longer need to distibute
the EncryptionConfig via trustd.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-25 09:41:20 -07:00
Andrew Rynhard
27adda4d9d chore: use the official Drone git plugin
The changes we needed in the clone plugin have been merged. We should
use the official plugin to minimize what we have to maintain.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-23 22:45:31 -07:00
Andrew Rynhard
d435280aeb chore: prepare release v0.3.0-alpha.0
This is the official v0.3.0-alpha.0 release.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.3.0-alpha.0
2019-09-23 18:45:36 -07:00
Andrew Rynhard
db05c65fc9 chore: prepare release v0.2.0-rc.0
This is the official v0.2.0-rc.0 release.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-23 17:56:55 -07:00
Andrew Rynhard
70eab14002 fix: generate CA certificates with 10 year expiration
This moves from 1 year to 10.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-23 16:59:31 -07:00
Andrew Rynhard
8f10647d3f fix: set extra kernel args for all platforms
This change ensures that the installer has access to the machine config
so that it can set the extra kernel arguments when installing.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-23 11:50:13 -07:00
Andrew Rynhard
79672fb251 chore: add version label to installer image
This adds a label to the installer image that indicates the version. We
can build automation around this in a number of different ways, but one
of the use cases we have immediately is to use this label to determine
which version of Talos is at a given channel. For example, if we were to
implement an "edge" channel, we could periodically check for an image
with the tag "edge" and use the version label to determine if a node is
running the current version of edge. Even if we don't use the labels for our
channel implementation, its' still useful information to have.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-23 02:30:22 -07:00
Andrew Rynhard
fe4fe0849e fix: generate CA certificates with 1 year expiration
This changes CA certificate generation from 24 hours to 1 year.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-22 11:22:46 -07:00
Andrew Rynhard
9ffa064a70 feat: return a struct for processes RPC
This makes working with the API much cleaner as a client. Using gob
doesn't give the client a well-known type to work with in the API
definition.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-20 16:18:05 -07:00
Andrew Rynhard
ead8ce22bd feat: default processes command to one shot
In general it is better if we default to single requests, and then gate
streams behind a flag. This makes the processes subcommand work in this
way and puts the streamed data behind a `--watch` flag.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-20 14:52:27 -07:00
Andrew Rynhard
3a92537a30 refactor: rename RPCs
The following RPCs have been renamed:

- ps to containers
- top to processes
- df to mounts

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-20 14:33:51 -07:00
Andrew Rynhard
d4260f6918 fix: add kerenel config required by Cilium
This adds CONFIG_NETFILTER_XT_TARGET_CT=y to the kernel.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-20 09:58:48 -07:00
Andrew Rynhard
82c706a0fb feat: upgrade Kubernetes to v1.16.0
Brings in Kubernetes v1.16.0.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 20:19:29 -07:00
Andrew Rynhard
9230ff4e35 feat: return a data structure in version RPC
A byte slice is not very useful. Having a struct with fields makes for a
better experience.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 16:58:07 -07:00
Seán C McCord
1a64ece04f fix(machined): add nil checks to metal initializer
Check that the userdata has an Install section before trying to use it

Fixes #1186

Signed-off-by: Seán C McCord <ulexus@gmail.com>
2019-09-19 12:35:11 -07:00
Andrew Rynhard
6efd6fbe08 chore: move gRPC API to public
In order for other projects to make use of our APIs, they must not
reside underneath the internal directory. This moves the protobuf
definitions to a top-level "api" directory and scopes them according to
their domain. This change also removes generated code from the gitignore
file so that users don't have to generate the code themseleves.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 08:55:13 -07:00
Andrew Rynhard
20302eb8f6 chore: fix AWS image dependency
We no longer need to wait for the installer image to be pushed before
creating the AWS image.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-17 21:12:03 -07:00
Andrew Rynhard
c2e71bd2bc chore: prepare release v0.2.0-beta.0
This is the official v0.2.0-beta.0 release.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.2.0-beta.0
2019-09-17 20:17:41 -07:00
Andrew Rynhard
472f1aa6e8 chore: upgrade Sonobuoy to v0.15.4
This version has a fix for a bug that is affecting us.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-17 14:52:10 -07:00
Andrew Rynhard
21670978ca fix: log system services to /run/system/log
Writing system logs to /var/log breaks upgrades. The system disk unmount
fails with EBUSY. For now we can log to /run/system/log to avoid this.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-17 07:54:01 -07:00
Andrew Rynhard
db80688c5e chore: remove dead code
This code is never used.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-16 21:24:46 -07:00
Andrew Rynhard
b7755b3154 fix: conditionally set log path
This is not the best solution to this, but it stops the bleeding. We can
conditionally build the log base path based on the service logs
requested.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-16 18:29:30 -07:00
Andrew Rynhard
3e62973b2c chore: upgrade conformange image
This upgrade the kube-conformance image used by sonobouy to
v1.16.0-rc.2.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-16 16:05:24 -07:00
Andrew Rynhard
4912d71389 fix: generate client admin cert with 1 year expiry
The default of 24 hours is much too short for the admin credentials.
This makes them expire in a year.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-16 15:52:22 -07:00