Commit Graph

234 Commits (engine-1.21)

Author SHA1 Message Date
Derek Nola ccb09f627a
Delay service readiness until after startuphooks have finished (#5736)
* Move startup hooks wg into a runtime pointer, check before notifying systemd
* Switch default systemd notification to server
* Add 1 sec delay to allow etcd to write to disk
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-16 08:22:42 -07:00
Brad Davidson 5cb2c254e5 Fix etcd-only secrets encryption rotation
Improve feedback when running secrets-encrypt commands on etcd-only nodes, and
allow etcd-only nodes to properly restart when effecting rotation.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e811689df9)
2022-03-25 14:38:22 -07:00
Brad Davidson 5580875acb Bootstrap the executor even when the agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f090bf2d5e)
2022-03-15 18:09:00 -07:00
Brad Davidson ad40da3271 Fix etcd-snapshot commands by making setup more consistent.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a7878db17f)
2022-03-15 18:09:00 -07:00
Brad Davidson 7da7a00f8f Move temporary etcd startup into etcd module
Reuse the existing etcd library code to start up the temporary etcd
server for bootstrap reconcile. This allows us to do proper
health-checking of the datastore on startup, including handling of
alarms.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e4846c92b4)
2022-03-15 18:09:00 -07:00
Brad Davidson f55f09672e Fix adding etcd-only node to existing cluster
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5014c9e0e8)
2022-03-15 18:09:00 -07:00
Brad Davidson a18c38d63d Remove unnecessary copies of runtime struct
Several types contained redundant references to ControlRuntime data. Switch to consistently accessing this via config.Runtime instead.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 2989b8b2c5)
2022-03-15 18:09:00 -07:00
Derek Nola a8e7e287fb
Add `--json` flag for `k3s secrets-encrypt status` (#5127) (#5199)
* Add json flag for secrets-encrypt status

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-03-03 10:25:36 -08:00
Brian Downs 343c7ceb6b
add ability to specify etcd snapshot list output format (#5132) (#5181) 2022-02-26 12:29:17 -07:00
Derek Nola 70304e030a
Add server flag to access nonlocal/nondefault k3s server (#5016) (#5055)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-31 15:58:05 -08:00
Brad Davidson 4b442e7bd3 Update packaged components
Update images and manifests/charts for coredns, local-path-provisioner, traefik, and pause

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-18 17:38:54 -08:00
Manuel Buil 0d76df93ac Allow svclb pod to enable ipv6 forwarding
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-01-18 17:38:54 -08:00
Brian Downs 8755fd45f6
[Engine-1.21] Adds the ability to compress etcd snapshots (#4866) (#4958) 2022-01-18 11:08:54 -07:00
Brad Davidson 8fe79bfe7a Skip CGroup v2 evac when agent is disabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-14 13:25:31 -08:00
Derek Nola 43e1f40800
Enable logging on all subcommands (#4921) (#4933)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-01-14 09:21:44 -08:00
Brad Davidson f1f4ad64f3 Move ClusterResetRestore handling ControlConfig setup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-12 10:46:33 -08:00
Brad Davidson 4decce56a3 Fix use of agent creds for secrets-encrypt and config validate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-06 14:17:03 -08:00
Hussein Galal bcd63e54dd
[Engine-1.21] Close agentReady channel only in k3s (#4795)
* Close agentReady channel only in k3s

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* codespell check

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-12-21 20:28:57 +02:00
Hussein Galal 9b67692414 Fix snapshot restoration on fresh nodes (#4737)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-13 18:14:38 -07:00
Hussein Galal 572ef9cb90
Add validation to certificate rotation (#4699)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-12-09 02:45:56 +02:00
Derek Nola e7fe71ea1e
[Engine-1.21] Secrets-encryption rotation (#4656)
* Backport secrets encrypt rotation
* Backport integration fixes for custom etcd args

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 21:55:00 -08:00
Hussein Galal 5153c527eb
[Engine-1.21] Add cert rotation command (#4634)
* Add cert rotation command (#4495)

* Add cert rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* add function to check for dynamic listener file

Signed-off-by: Brian Downs <brian.downs@gmail.com>

* Add dynamiclistener cert rotation support

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to the cert rotation

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix ci tests

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to certificate rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

Co-authored-by: Brian Downs <brian.downs@gmail.com>

* Upgrade dynamic listener

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

Co-authored-by: Brian Downs <brian.downs@gmail.com>
2021-12-06 19:44:28 +02:00
Chris Kim 4e3a074c11
[engine-1.21] etcd snapshot functionality enhancements (#4607)
* etcd snapshot functionality enhancements (#4453)

Signed-off-by: Chris Kim <oats87g@gmail.com>

* feat: add option to disable s3 over https

Signed-off-by: Chris Kim <oats87g@gmail.com>

Co-authored-by: Devin Buhl <devin.kray@gmail.com>
2021-11-29 13:30:12 -08:00
Hussein Galal 006b753a62
Fix regression with cluster reset (#4525)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-11-18 00:08:04 +02:00
Derek Nola d5a4147762
[Engine-1.21] Parser improvements, allow config values to be used with etcd-snapshot (#4477)
* Match to last After keyword for parser (#4383)
* Made parser able to skip over subcommands
* Fix to allow etcd-snapshot to use config file with flags that are only used with k3s server. (#4464)

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-11-11 22:18:10 -08:00
Chris Kim 381d086cf0
[engine-1.21] Add etcd extra args support for K3s (#4470)
* Add etcd extra args support for K3s

Signed-off-by: Chris Kim <oats87g@gmail.com>

* Add etcd custom argument integration test

Signed-off-by: Chris Kim <oats87g@gmail.com>

* Redux: Enable K3s integration test to run on existing cluster (#3905)

* Made it possible to run int tests on existing cluster

Signed-off-by: dereknola <derek.nola@suse.com>

Signed-off-by: Chris Kim <oats87g@gmail.com>

Co-authored-by: Derek Nola <derek.nola@suse.com>
2021-11-11 19:53:20 -08:00
Brian Downs 30c7723c03
[Engine-1.21] All bootstrap backport (#4451)
Add ability to reconcile bootstrap data between datastore and disk (#3398)
2021-11-10 16:20:33 -07:00
Luther Monson 67d079ec3a
[engine-1.21] updating to new signals package in wrangler (#4434)
* updating to new signals package in wrangler

Signed-off-by: Luther Monson <luther.monson@gmail.com>
2021-11-09 11:16:30 -07:00
Brad Davidson 07ee5ec761 Fix log/reap reexec
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-11-01 14:58:58 -07:00
Brad Davidson 7d0ecf3ab2 Revert "Backport bootstrap engine 1.21 (#4314)"
This reverts commits
c5a9154538
45c5d78cd7

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-27 13:46:00 -07:00
Brian Downs 45c5d78cd7
Backport bootstrap engine 1.21 (#4314) 2021-10-25 13:03:30 -07:00
Derek Nola ee64caceb8
Added configuration input to etcd-snapshot (#4280) (#4287)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-10-22 16:52:48 -07:00
Brad Davidson bfc22ca613 Refactor log and reaper exec to omit MAINPID
Using MAINPID breaks systemd's exit detection, as it stops watching the
original pid, but is unable to watch the new pid as it is not a child
of systemd itself. The best we can do is just notify when execing the child
process.

We also need to consolidate forking into a sigle place so that we don't
end up with multiple levels of child processes if both redirecting log
output and reaping child processes.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit dc18ef2e51)
2021-10-20 13:09:15 -07:00
Brad Davidson 1a8bd3156f Add containerd ready channel to delay etcd node join
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 88178ae65e)
2021-10-20 12:35:16 -07:00
Brian Downs 697f7e471a
[Engine-1.21] - Add etcd s3 timeout (#4207) (#4229) 2021-10-18 10:45:47 -07:00
Hussein Galal 0c109a58b0
Make sure there are no duplicates in etcd member list (#4025) (#4050)
* Make sure there are no duplicates in etcd member list

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix node names with hyphens

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* use full server name for etcd node name

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-10-07 22:28:42 +02:00
Derek Nola 9c7e871942
Add "etcd-" prefix to etcd-snapshot commands as aliases (#4161) (#4172)
* Add "etcd-" prefix to etcd-snapshot commands as alias

Signed-off-by: dereknola <derek.nola@suse.com>
2021-10-07 09:30:50 -07:00
Brad Davidson 27bebd11a5 Don't evacuate the root cgroup when rootless
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-01 16:19:51 -07:00
Brad Davidson a71a04d57c Properly handle operation as init process
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-09-28 11:34:00 -07:00
Derek Nola 908ac8efa2
Removed experimental from cluster commands (#4035)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-09-16 11:07:35 -07:00
Brad Davidson a6bbc65776 Add missing node name entry to apiserver SAN list
Also honor node-ip when adding the node address to the SAN list, instead
of hardcoding the autodetected IP address.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-09-01 13:23:07 -07:00
Hussein Galal e322924781
Reset load balancer state during restoraion (#3877)
* Reset load balancer state during restoraion

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Reset load balancer state during restoraion

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-08-18 01:02:30 +02:00
Jiaqi Luo 3b01157a3a
Use New Image Names (#3749)
* switch image names to the ones with the prefix mirrored
* bump rancher/mirrored-coredns-coredns to 1.8.4

Signed-off-by: Jiaqi Luo <6218999+jiaqiluo@users.noreply.github.com>
2021-08-06 16:14:58 -07:00
Hussein Galal 2069cdf4ee
Fix initial start of etcd only nodes (#3748)
* Fix initial start of etcd only nodes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-08-03 19:53:21 +02:00
Brad Davidson 869b98bc4c Sync DisableKubeProxy into control struct
Sync DisableKubeProxy from cfg into control before sending control to clients,
as it may have been modified by a startup hook.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-07-30 12:26:50 -07:00
Hussein Galal b1b5f72dc3
Notify systemd for etcd only node (#3732)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-29 23:42:19 +02:00
Derek Nola 21c8a33647
Introduction of Integration Tests (#3695)
* Commit of new etcd snapshot integration tests.
* Updated integration github action to not run on doc changes.
* Update Drone runner to only run unit tests

Signed-off-by: dereknola <derek.nola@suse.com>
2021-07-26 09:59:33 -07:00
Luther Monson 37fcb61f5e move go routines for api server ready beneath wait group
Signed-off-by: Luther Monson <luther.monson@gmail.com>
2021-07-20 17:36:34 -07:00
Luther Monson 18bc98f60c
adding startup hooks args to access to Disables and Skips (#3674)
Signed-off-by: Luther Monson <luther.monson@gmail.com>
2021-07-20 05:24:52 +02:00
Jamie Phillips aef8a6aafd
Adding support for waitgroup to the Startuphooks (#3654)
The startup hooks where executing after the deploy controller. We needed the deploy controller to wait until the startup hooks had completed.
2021-07-15 19:28:47 -07:00