Commit Graph

70 Commits

Author SHA1 Message Date
Karim Naufal
9380b70bbe tweak to cluster provisioning null ressource, destroy, and moved lb waiting to master.tf 2022-02-22 00:58:08 +01:00
phaer
4ee2156a95 wait for load-balancer in null-resource...
...because we can only do that whenever the cluster is operational,
which it isn't with just one node.
2022-02-21 16:59:19 +01:00
phaer
63008004f7 wait for load-balancer ip, expose it via terraform 2022-02-21 16:59:19 +01:00
Karim Naufal
4b4bd0697a renamed patches directory to kustomize 2022-02-20 12:23:21 +01:00
Marco Nenciarini
0f9d277293
Merge branch 'master' into modules 2022-02-20 11:30:07 +01:00
Karim Naufal
e39dc064e2 making k3s start more robust 2022-02-20 02:04:37 +01:00
Marco Nenciarini
0090c1a6f1
Fist attempt to factor microOS install 2022-02-20 00:00:13 +01:00
phaer
406ba988bf use jsonencode, not template for config.ign 2022-02-19 15:07:39 +01:00
Karim Naufal
1aae4b3b09 adjust ssh check loop time from sleep 2 to 3, to reduce the number of outputs 2022-02-18 01:13:28 +01:00
Karim Naufal
cb5aa2410d adjust ssh check loop time from sleep 3 to 5, to reduce the number of outputs 2022-02-17 21:49:03 +01:00
Marco Nenciarini
74829deaa7
Fix system upgrade controller certificates 2022-02-17 21:14:25 +01:00
Karim Naufal
1f0a03b335 moved k3s-selinux install to combustion 2022-02-17 13:19:21 +01:00
Karim Naufal
9fa2fc9edc fix ip_not_available error 2022-02-16 11:06:47 +01:00
Karim Naufal
4aabee0dad fix the upgrade node label 2022-02-16 09:23:28 +01:00
Karim Naufal
bffc921ed8 k3s install method ok 2022-02-16 05:01:53 +01:00
Karim Naufal
dcf9af0e3c k3s install method ok 2022-02-16 05:01:13 +01:00
Karim Naufal
d920132694 k3s install method ok 2022-02-16 04:24:20 +01:00
Karim Naufal
fec695086a k3s-install ready for testing 2022-02-16 03:18:40 +01:00
Karim Naufal
1f0c825b23 switch image to standard microos 2022-02-16 00:13:02 +01:00
Karim Naufal
51f9718657 removed latest csi and latest ccm containers option, as it was causing problems over time 2022-02-15 22:33:22 +01:00
Karim Naufal
cbe343c72b fix typo 2022-02-12 01:49:33 +01:00
Karim Naufal
e6b12a172c fix for error messages 2022-02-12 01:45:25 +01:00
phaer
740b20966f remove duplicate systemctl start k3s-server 2022-02-12 01:09:34 +01:00
phaer
8ba33a12c8 fix post-install kustomization, keep file...
this risks exposing secrets from the deployed manifests,
but those are currently deployed beforehand so we should
be good as long as kustomization.yaml does not contain
any.
2022-02-12 00:52:13 +01:00
phaer
ca64e97563 split provisioning for better logging 2022-02-12 00:32:11 +01:00
phaer
1daa14defc fix waiting for the cluster once again 2022-02-11 23:57:18 +01:00
phaer
347ba42866 replace kustomization.yaml.tpl with yamlencode
benefit is replacing inline strings in yaml with proper files
locally while still just deploying a single file to the remote
host.
2022-02-11 23:49:54 +01:00
phaer
ddcc473ea8 (hopefully) simplify wait for cluster ready 2022-02-11 23:49:16 +01:00
phaer
48a0d0e33f fix /tmp/post_install...
...without an explicit mkdir before, it just writes the latest
file to /tmp/post_install (which is a file, not a directory)
2022-02-11 23:28:32 +01:00
phaer
d56031951e undo readyz formatting...
...running into weird issues and keep getting 403, while it worked
with the old formatting. maybe bash escaping?
2022-02-11 23:10:43 +01:00
phaer
92937f0081 cleanup first control plane provisioning...
* move yaml to subdirectory of /tmp
* reformat loop waiting for /readyz endpoint
* add logging message
* split provisioner because sensitive var.hcloud_token prohibits
  log output
2022-02-11 22:47:57 +01:00
phaer
c46e912d3e use resource-level connection blocks...
this is now possible, since all our provisioners are using
the same settings. And it saves a bunch of lines
2022-02-11 16:00:19 +01:00
phaer
9dc4952665 Expose kubeconfig in outputs...
* To do so, we need to ensure that the generated kubeconfig is part of
  terraforms dependency graph. This has the additional benefit of not
  depending on local files anymore which should enable multi-user
  setups.

* This also means that we can't deploy CCM, CSI & Traefik from our local
  host, because we don't have kubeconfig.yaml locally while provisioning
  the control plane, only afterwards.

* So we just run kubectl apply on the control plane itself, after k3s is
  ready.

* To do so, we need to deploy all manifests. I've merged the patches
  into a single kustomization.yaml file, because that makes the
  deployment of those files to the control-plane server easier.

* we could also put the traefik config into the same kustomization file,
  which would save us one of the file provisioner blocks. I didn't want
  this PR to get any bigger, and will consider merging this config later
  on. kustomization.yaml is small enough that we could yamlencode() for
  it and store the patches in separate files again, not as
  inline-strings which is kind of ugly.
2022-02-11 12:45:03 +01:00
Karim Naufal
7a846f3a61 pre master 2022-02-10 03:31:20 +01:00
Karim Naufal
cd6b5e2768 pre master 2022-02-10 03:01:40 +01:00
Marco Nenciarini
573155e5b7
Fix the kured reboot command 2022-02-09 11:53:11 +01:00
Karim Naufal
b123845937 changed kured config 2022-02-09 10:17:33 +01:00
Paul Haerle
4f6812a59a
Use yaml list for disabled k3s features
Co-authored-by: Marco Nenciarini <mnencia@kcore.it>
2022-02-08 14:14:23 +01:00
phaer
af78d8fc86 terraform fmt 2022-02-08 09:12:16 +01:00
phaer
d6fe4152c9 re-add node-taints after rebase 2022-02-08 09:05:36 +01:00
phaer
960311ebd4 use yamlencode for k3s configs...
...and remove the now, hopefully unneeded workaround for
agent.conf, all values are in config.yaml now
2022-02-08 09:00:12 +01:00
Marco Nenciarini
d939600561
Avoid connection timeout errors while waiting for reboot 2022-02-07 22:58:34 +01:00
Karim Naufal
95c6b8be93 removed the ssh connection timeout messages while waiting, and also reduced the connection refused messages 2022-02-07 22:07:05 +01:00
Marco Nenciarini
7e6eb731dd
Add setting to allow_scheduling_on_control_plane 2022-02-07 16:11:41 +01:00
Karim Naufal
9803e9a920
Merge pull request #44 from phaer/fix-ssh-identity
fix ssh identity in staging
2022-02-07 15:45:42 +01:00
phaer
bc18586132 fix kubectl get nodes missing --kubeconfig
the current implementation works co-incidentally for most
setups, when terraform apply is run from the repos root,
but not when kube-hetzner is used as a terraform module
2022-02-07 13:58:21 +01:00
phaer
1a50ace0d3 remove root from ssh_args...
because scp does not take the username via -l, so we just re-add
it to the commands themselves.
2022-02-07 13:19:06 +01:00
phaer
a5914f81e6 fix ssh identity...
Newly added ssh commands were missing the flag -i to pass an
identity file. This means that those commands use different
settings then the provisioners and their connection blocks
around them.

While adding this parameter, I decided it would be cleanest
to add local.ssh_args.
2022-02-07 13:08:47 +01:00
Marco Nenciarini
cf68368eea
Reduce reboot time 2022-02-07 09:55:02 +01:00
Karim Naufal
fba212de47 added kured and fixed initial ignition disk partitioning 2022-02-07 08:46:10 +01:00