Brad Davidson
7168f7282c
Move IPv4/v6 selection into helpers
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit b12cd62935 )
2022-05-20 16:39:13 -07:00
Derek Nola
0663681a3d
Replace rancher with k3s-io ( #5585 )
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-05-19 15:54:21 -07:00
Brad Davidson
8b0b50a5e8
[release-1.22] Fix issue with datastore corruption on cluster-reset ( #5517 )
...
* Bump etcd to v3.5.4-k3s1
* Fix issue with datastore corruption on cluster-reset
* Disable unnecessary components during cluster reset
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-04-27 15:11:41 -07:00
Roberto Bonafiglia
e2c3b89ee5
Added default endpoint for IPv6 ( #5510 )
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-26 09:16:36 -07:00
Brad Davidson
b7c7a23e0f
Fix issue with long-running apiserver endpoints watch ( #5479 )
...
Use ListWatch helpers to retry when the watch channel is closed.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-04-21 09:27:54 -07:00
Brad Davidson
70df1cc324
Move the apiserver addresses controller into the etcd package
...
This controller only needs to run when using managed etcd, so move it in
with the rest of the etcd stuff. This change also modifies the
controller to only watch the Kubernetes service endpoint, instead of
watching all endpoints in the entire cluster.
Fixes an error message revealed by use of a newer grpc client in
Kubernetes 1.24, which logs an error when the Put to etcd failed because
kine doesn't support the etcd Put operation. The controller shouldn't
have been running without etcd in the first place.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit f37e7565b8 )
2022-04-15 11:15:00 -07:00
Brad Davidson
50390441bb
Fix crash on early snapshot
...
Don't attempt to retrieve snapshot metadata configmap if the apiserver
isn't available. This could be triggered if the cron expression caused a
snapshot to be triggered before the apiserver is up.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit 2a429aac65 )
2022-04-15 11:15:00 -07:00
Brad Davidson
856e7efea5
Bump etcd to 3.5.3-k3s1
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-04-15 02:00:15 -07:00
Roberto Bonafiglia
29a761360b
Fixed http URL on etcd
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-05 10:22:59 +02:00
Roberto Bonafiglia
ba0270c6bc
Fixed loadbalancer in case of IPv6 addresses
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-05 10:22:34 +02:00
Roberto Bonafiglia
a8fdf93e15
Updated localhost address on IPv6 only setup
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-05 10:18:58 +02:00
Roberto Bonafiglia
44253bcfd4
Fixed etcd URL in case of IPv6 address
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-05 10:14:35 +02:00
Brad Davidson
d499e79e5c
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:05:53 -07:00
Brad Davidson
4cc9a48c1b
Defragment etcd datastore before clearing alarms
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-03-28 09:28:13 -07:00
Brad Davidson
373977563d
Close additional leaked GPRC clients
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-03-15 18:08:33 -07:00
Brad Davidson
3d3a4d08ca
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:08:33 -07:00
Brad Davidson
83d858a169
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:08:33 -07:00
Brad Davidson
66b40c8e10
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:08:33 -07:00
Brad Davidson
5cb6b1ecbc
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:08:33 -07:00
Brad Davidson
ce890d626d
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:08:33 -07:00
Derek Nola
8994e981b9
[Release-1.22] Add k3s etcd restoration integration test ( #5096 )
...
* Add k3s etcd restoration integration test (#5014 )
* Reorganizing the tests
* Fix cleanup
* Cleanup github action
Signed-off-by: Derek Nola <derek.nola@suse.com >
Co-authored-by: Hussein Galal <galal-hussein@users.noreply.github.com >
2022-02-09 14:33:03 -08:00
Brian Downs
354477adbf
Adds the ability to compress etcd snapshots ( #4866 ) ( #4960 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2022-01-18 11:08:37 -07:00
Brad Davidson
2bfe752dc1
Fix panic checking name of uninitialized etcd member
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-12-21 23:38:44 -08:00
Hussein Galal
9400af4004
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:18 -07:00
Brian Downs
d64a8da871
Resolve restore bootstrap ( #4704 ) ( #4715 )
2021-12-09 17:54:34 -07:00
Manuel Buil
3d16d94b39
Check HA network parameters
...
Signed-off-by: Manuel Buil <mbuil@suse.com >
2021-12-08 11:00:54 +01:00
Derek Nola
12581188e8
Improved cleanup for etcd unit test ( #4537 ) ( #4608 )
...
* Improved cleanup for etcd unit test
Signed-off-by: Derek Nola <derek.nola@suse.com >
2021-11-30 11:05:13 -08:00
Chris Kim
fdb335d7d8
etcd snapshot functionality enhancements ( #4453 ) ( #4605 )
...
Signed-off-by: Chris Kim <oats87g@gmail.com >
2021-11-29 13:29:51 -08:00
Chris Kim
a1f490df9c
[release-1.22] Add etcd extra args support for K3s ( #4469 )
...
* 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 >
2021-11-11 20:22:12 -08:00
Brian Downs
97f494a24d
[Release-1.22] All bootstrap backport ( #4448 )
...
Add ability to reconcile bootstrap data between datastore and disk (#3398 )
2021-11-10 16:20:20 -07:00
Brad Davidson
46eea2f10a
Revert "Add ability to reconcile bootstrap data between datastore and disk ( #3398 )"
...
This reverts commits
9a4ca5978b
c9f6fa0be0
07f844cf95
48355dce10
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-10-27 14:17:12 -07:00
Brian Downs
c9f6fa0be0
remove integration test
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-10-25 16:23:31 -07:00
Brian Downs
48355dce10
Add ability to reconcile bootstrap data between datastore and disk ( #3398 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-10-25 16:23:31 -07:00
galal-hussein
84e9b829e0
Update peer address when running cluster-reset
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2021-10-25 15:43:45 -07:00
Brad Davidson
3988edef25
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 13:05:40 -07:00
Brian Downs
7c78e1c802
[Release-1.22] - Add etcd s3 timeout ( #4207 ) ( #4230 )
2021-10-18 10:45:56 -07:00
Brian Downs
737f722315
set transport to skip verify if se skip flag passed ( #4102 ) ( #4103 )
2021-10-07 12:47:42 -07:00
Hussein Galal
7826407a2e
Make sure there are no duplicates in etcd member list ( #4025 )
...
* 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-09-18 00:51:18 +02:00
Brad Davidson
086ca8ba6a
Fix premature etcd shutdown when joining an existing cluster
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-15 10:35:07 -07:00
Chris Kim
acf9036b63
No-op when etcd member was already removed and use existing name for etcd controller ( #4014 )
...
Signed-off-by: Chris Kim <oats87g@gmail.com >
2021-09-15 08:41:30 -07:00
Chris Kim
928b8531c3
[master] Add etcd-member-management controller to K3s ( #4001 )
...
* Initial leader elected etcd member management controller
* Bump etcd to v3.5.0-k3s2
Signed-off-by: Chris Kim <oats87g@gmail.com >
2021-09-14 08:20:38 -07:00
Brad Davidson
b4d8c641c6
Add exposed metrics listener instead of replacing loopback listener
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-10 09:39:39 -07:00
Brad Davidson
29c8b238e5
Replace klog with non-exiting fork
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-10 09:36:16 -07:00
Darren Shepherd
741ba95b04
Migrate sqlite data to etcd when initializing the cluster
...
Signed-off-by: Darren Shepherd <darren@rancher.com >
2021-09-09 10:24:02 -07:00
Devin Buhl
a1ec43e0b7
feat: add option to disable s3 over https
...
Signed-off-by: Devin Buhl <devin.kray@gmail.com >
2021-09-05 12:03:49 -04:00
Brad Davidson
b8add39b07
Bump kine for metrics/tls changes
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-01 01:51:30 -07:00
Derek Nola
60297a1bbe
Creation of K3s integration test Sonobuoy plugin ( #3931 )
...
* Added test runner and build files
* Changes to int test to output junit results.
* Updated documentation, removed comments
Signed-off-by: dereknola <derek.nola@suse.com >
2021-08-30 08:27:59 -07:00
Derek Nola
114b30277f
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 >
2021-08-26 16:26:19 -07:00
Derek Nola
66dacc6ee0
Revert "Enable K3s integration test to run on existing cluster ( #3892 )" ( #3899 )
...
This reverts commit 703b5af950 .
2021-08-24 07:26:14 -07:00
Derek Nola
703b5af950
Enable K3s integration test to run on existing cluster ( #3892 )
...
* Made it possible to run int tests on existing cluster
Signed-off-by: dereknola <derek.nola@suse.com >
2021-08-23 12:12:03 -07:00