Commit Graph

818 Commits

Author SHA1 Message Date
Brad Davidson
f1c323c268 Skip setting up client tls when etcd server does not have tls enabled
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-30 01:06:28 -07:00
Brad Davidson
90ce62ceaa Defragment etcd datastore before clearing alarms
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-28 09:28:24 -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
ee772c1074 Ensure that apiserver ready channel checks re-dial every time
Closing idle connections isn't guaranteed to close out a pooled connection to a
loadbalancer endpoint that has been removed. Instead, ensure that requests used
to wait for the apiserver to become ready aren't reused.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-23 13:23:29 -07:00
Brad Davidson
87c4a13554 Defer ensuring node passwords on etcd-only nodes during initial cluster bootstrap
This allows secondary etcd nodes to bootstrap the kubelet before an
apiserver joins the cluster. Rancher waits for all the etcd nodes to
come up before adding the control-plane nodes, so this needs to be
handled properly.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 38706eeec0)
2022-03-18 13:44:06 -07:00
Brad Davidson
f8fa57de06 Update helm-controller
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a93b9b6d53)
2022-03-17 16:01:41 -07:00
Brad Davidson
5ba59d98c8 Close additional leaked GPRC clients
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-15 18:09:00 -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
cbf8cadb92 Ignore cluster membership errors when reconciling from temp etcd
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9a48086524)
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
8d13e68cc5 Add function to clear local alarms on etcd startup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 555087b9b8)
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
ee4c209df9 Remove unnecessary copies of etcdconfig struct
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a1b800f0bf)
2022-03-15 18:09:00 -07:00
Brad Davidson
58fe28b500 Fix cluster bootstrap test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 54bb65064e)
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
Brian Downs
86559341a4 remove unused code (#5247) 2022-03-09 16:33:16 -07:00
Brian Downs
d0be109e7c add net util funcs (#5244) 2022-03-09 14:26:04 -07:00
Brian Downs
749d157d87 fix function arg call (#5234) (#5235) 2022-03-09 08:00:06 -07:00
Derek Nola
6211a979a9 [Engine-1.21] Populate EtcdConfig in runtime from datastore when etcd is disabled (#5230)
* Populate EtcdConfig in runtime from datastore when etcd is disabled (#5222)

Fixes issue with secrets-encrypt rotate not having any etcd endpoints
available on nodes without a local etcd server.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Revert naming to old Kine

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

Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-08 12:07:18 -08: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
Derek Nola
b2222d0f0e Create encryption hash file if it doesn't exist (#5170)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-28 09:05:51 -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
d3189ad239 Move containerd wait into exported function
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-25 13:10:00 -08:00
Brad Davidson
290fb7484c go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-18 17:38:54 -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
Brad Davidson
53b10471c4 Bump klipper-lb image for arm fix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-18 17:38:54 -08:00
Manuel Buil
4f1fd7b30f Dual-stack support LB controller
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
0a1f013f68 Fix handling of agent-token fallback to token
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-07 10:15:17 -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
Luther Monson
3970bc001a [engine-1.21] Remove the Vendor Directory (#4825)
* code to remove vendor dir

Signed-off-by: Luther Monson <luther.monson@gmail.com>
2021-12-27 14:32:00 -07:00
Brad Davidson
b38ef3a6aa Close etcd clients to avoid leaking GRPC connections
If you don't explicitly close the etcd client when you're done with it,
the GRPC connection hangs around in the background. Normally this is
harmelss, but in the case of the temporary etcd we start up on 2399 to
reconcile bootstrap data, the client will start logging errors
afterwards when the server goes away.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8ad7d141e8)
2021-12-22 12:41:36 -08:00
Brad Davidson
cf3e02acea Fix panic checking name of uninitialized etcd member
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-12-21 23:39:03 -08:00
Brian Downs
5b0c1661f1 Update bootstrap logic to output all changed files on disk (#4800) (#4810)
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-21 16:22:23 -07: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
Manuel Buil
5d673f4cdd Remove Disables, Skips and DisableKubeProxy from the comparing configs
Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-12-17 18:24:24 +01:00
Derek Nola
962113d4a0 [Engine-1.21] Fix cold boot and reconcilation on secondary servers (#4754)
* Fix cold boot restarts on secondary servers

Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-15 16:12:07 -08: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
Brian Downs
bc84ded38c Resolve Bootstrap Migration Edge Case (#4730)
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-13 13:09:28 -07:00
Brian Downs
50b358048b Resolve restore bootstrap (#4704) (#4717) 2021-12-09 17:54:43 -07:00
Brad Davidson
c7e4790aa6 Update wharfie usage in windows code path
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-12-09 13:25:16 -08: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
Brad Davidson
1d9e78ae9c Bump wharfie to v0.5.1 and use shared decompression code
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 7d3447ceff)
2021-12-08 13:33:23 -08:00
Alexey Medvedchikov
bee0e661b1 Include node-external-ip in serving-kubelet.crt SANs (#4620)
* Include node-external-ip in serving-kubelet.crt SANs

Signed-off-by: Alexey Medvedchikov <alexeymedvedchikov@improbable.io>
(cherry picked from commit 8f389ab030)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-12-08 10:49:24 -08:00