1091 Commits

Author SHA1 Message Date
Tim Gerla
fec434aee9 docs: some docs improvements based on community feedback (try 2)
Signed-off-by: Tim Gerla <tim@gerla.net>

docs: fix unbalanced header

Signed-off-by: Tim Gerla <tim@gerla.net>
2019-10-10 15:25:00 -07:00
Spencer Smith
313ca2cb23 chore: re-enable end to end tests
This PR will add the bits necessary to make use of changes to our
v1alpha1 cluster api provider for CI testing. This is needed since we've
had machine config changes.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-10 17:32:44 -04:00
Spencer Smith
ee1b256e0f feat: add external IP discovery for azure
This PR will add the ability to query metadata servers in azure to fetch
external IPs. Needed to ensure certs get generated with proper cert SANs

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-10 16:57:44 -04:00
Andrew Rynhard
92de30715e feat: add retry package
This package provides a consistent way for us to retry arbitrary logic.
It provides the following backoff algorithms:

- exponential
- linear
- constant

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-10 13:11:02 -07:00
Andrew Rynhard
a799b05012 fix: always write the config to disk
Since some applications read the config from disk on startup, we need to
write the config to disk just before starting them in order to relay any
data that has been added to the config during bootup.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-10 11:53:39 -07:00
Andrew Rynhard
bf59264228 fix: marshal v1alpha1 config in String() method
This implements the String() method.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-10 11:35:56 -07:00
Andrew Rynhard
e1a50d36a9 fix: update platform task to set hostname and cert SANs
This adds a setter for the certificate SANs and sets the hostname based
on info from the platform.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-09 18:11:05 -07:00
Andrey Smirnov
c2cb0f9778 chore: enable 'wsl' linter and fix all the issues
I wish there were less of them :)

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-10-10 01:16:29 +03:00
Andrew Rynhard
edc21ea910 fix: set --cluster-dns kubelet flag properly
This removes the hardcoded IP and replaces it with the calculated IP.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-09 13:17:11 -07:00
Spencer Smith
e36133b3d3 feat: output cluster network info for all node types
This PR will push the cluster network node configs for all nodes. This
is needed so that non-init nodes can know the service address range to
use for determining the IP of services like coredns.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-09 16:08:08 -04:00
Andrey Smirnov
bb5f5cc754 chore: bump golangci-lint to 1.20
Memory usage reduced around 8-10x: now it stays stable at 1GB.

I disabled some of the new linters, and one rule which is violated a
lot.

I might make sense to go back and enable `wsl` fixing all the issues
(leaving that for another PR).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-10-09 22:21:08 +03:00
Andrew Rynhard
d9287cdfb5 fix: set kubelet-preferred-address-types to prioritize InternalIP
When creating docker based clusters, we need to use `InternalIP` for
kubelet connections. The default is
`Hostname,InternalDNS,InternalIP,ExternalDNS,ExternalIP`, but
`Hostname` doesn't work in docker because we don't depend on docker for
DNS.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-09 09:38:13 -07:00
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>
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