18 Commits

Author SHA1 Message Date
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
Spencer Smith
2f4ccfda9a fix: respect dns domain from machine config
BREAKING CHANGE: This PR fixes a bug where we were only passing `cluster.local` to the
kubelet configuration. It will also pull in a new version of the
bootkube fork to ensure that custom domains got propogated down to the
API Server certs, as well as the CoreDNS configuration for a cluster.

Existing users should be aware that, if they were previously trying to
use this option in machine configs, that an upgrade will may break
their cluster. It will update a kubelet flag with the new domain, but
CoreDNS and API Server certs will not change since bootkube has already
run. One option may be to change these values manually inside the
Kubernetes cluster. However, it may prove easier to rebuild the cluster
if necessary.

Additionally, this PR also exposes a flag to `osctl config generate`
to allow tweaking this domain value as well.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-03-20 12:28:17 -04:00
Andrey Smirnov
34cec9bbfb feat: make admin kubeconfig cert lifetime configurable
Fixes #1906

This provides lifetime as duration relative to kubeconfig generation
time (the moment `osctl kubeconfig` was called).

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-03-01 16:01:27 +03:00
Andrey Smirnov
bbe2c53d29 feat: generate kubeconfig on the fly on request
This extracts admin kubeconfig generation out of bootkube, now based on
Talos x509 library. On each API request for `kubeconfig`, config is
generated on the fly and sent back on the wire.

This fixes two issues:

* any master node can now generate `kubeconfig` (worker nodes can do
that too, but that should probably change in the future)
* after upgrade-and-wipe the disk scenario, `osctl kubeconfig` still
works

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-02-28 21:00:52 +03:00
Spencer Smith
aabd46e651 fix: re-enable control plane flags
This PR aims to fix the ability to pass extra flags to control plane
components. This will close #1523

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-01-23 14:28:02 -05:00
Spencer Smith
1368bfa451 chore: update bootkube config to include cluster name
This PR will add the new cluster name field to our bootkube options.
This allows for the generated kubeconfig to include the context-name for
the default context.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-01-21 16:56:57 -05:00
Spencer Smith
67e50f6f50 feat: allow for bootkube images to be customized
This PR allows for pod checkpointer and coredns images to be customized
for bootkube. We can already customize the hyperkube image and all other
images used by bootkube are CNI-related and can be customized with the
"custom" CNI setup.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-01-21 11:17:28 -08:00
Spencer Smith
4b81907bd3 feat: allow additional manifests to be provided to bootkube
This PR will add an `additionalManifests` field to the config data that
allows users to specify a list of URLs that they'd like to fetch
manifests from. These manifests will then be added to the bootkube asset
directory and applied during the bootkube service.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2020-01-15 08:48:41 -08:00
Andrew Rynhard
dce12c2c3c fix: use specified kubelet and etcd images
In our config we allow users to override the etcd and kubelet images,
but we don't actually make use of the fields. This ensures that user
specified images are honored.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-12-18 09:38:52 -08:00
Spencer Smith
92b5bd9b2b feat: allow ability to specify custom CNIs
This PR will allow users to specify one or many URLs for CNI so that
they can bypass bootkube deploying flannel and bring their own. Will
close #1593

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-12-06 15:27:36 -05:00
Andrew Rynhard
e1fc9017d2 feat: allow extra arguments to be passed to etcd
This allows for an arbitrary set of args to be passed to etcd. Due to
the fact the we do the discovery of the current cluster state, we
blacklist initial-cluster. Additionally, we black list args that would
makes sense to modify, like the path to the certs.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-11-14 05:53:00 -08:00
Andrey Smirnov
d3d011c8d2 chore: replace /* */ comments with // comments in license header
This fixes issues with `// +build` directives not being recognized in
source files.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-10-25 14:15:17 -07:00
Spencer Smith
d0111fe617 feat: allow specifcation of full url for endpoint
This PR moves to using the full URL for endpoint instead of trying to
hardcode 6443 in various places like we were doing.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
2019-10-16 13:45:05 -04:00
Andrew Rynhard
63c7ea4987 refactor: use control plane endpoint instead of master IPs
Since we no longer have the static IP requirement, we can update all
references to the "master IPs" to use the control plane endpoint.

This adds support for creating more than one node using the qemu-boot.sh
script.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-10-14 21:52:43 -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
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
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