Chris Kim
fdb335d7d8
etcd snapshot functionality enhancements ( #4453 ) ( #4605 )
...
Signed-off-by: Chris Kim <oats87g@gmail.com>
3 years ago
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>
3 years ago
Brian Downs
97f494a24d
[Release-1.22] All bootstrap backport ( #4448 )
...
Add ability to reconcile bootstrap data between datastore and disk (#3398 )
3 years ago
Derek Nola
586ed948dd
Improve error message when using a "K10" prefixed token ( #4180 ) ( #4430 )
...
* Add new error message with a K10 prefixed secret token
Signed-off-by: dereknola <derek.nola@suse.com>
3 years ago
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>
3 years ago
Brian Downs
9a4ca5978b
reset buffer after use ( #4279 ) ( #4329 )
3 years ago
Brian Downs
07f844cf95
Copy old bootstrap buffer data for use during migration ( #4215 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
3 years ago
Brian Downs
48355dce10
Add ability to reconcile bootstrap data between datastore and disk ( #3398 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
3 years ago
Hussein Galal
6193b1af97
Display cluster tls error only in debug mode ( #4200 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Brad Davidson
29c8b238e5
Replace klog with non-exiting fork
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
cf12a13175
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>
3 years ago
Brad Davidson
b8add39b07
Bump kine for metrics/tls changes
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
dc14f370c4
Update wrangler to v0.8.5
...
Required to support apiextensions.v1 as v1beta1 has been deleted. Also
update helm-controller and dynamiclistener to track wrangler versions.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
galal-hussein
20a48734c2
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
7ebcc4b134
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
b4401296ec
replace error with warn in delete
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
2f82bfcf67
fix warning msg
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
b377839148
migrate old token key format
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
997ed7b9b4
simplifying the code
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
ad17292fa8
migrate empty string key properly
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
a65e5b6466
Fix multiple bootstrap keys found
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Hussein Galal
a939decf01
fix a runtime core panic ( #3627 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Brian Downs
238dc2086e
prevent snapshot save when snapshots are disabled ( #3475 )
...
* prevent snapshot save when snapshots are disabled
3 years ago
Brad Davidson
cbfe673c43
Fix spelling to satisfy codespell check
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
246b378a27
Bump kine to resolve race condition and unrevisioned delete
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Hussein Galal
136dddca11
Fix storing bootstrap data with empty token string ( #3422 )
...
* Fix storing bootstrap data with empty token string
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* delete node password secret after restoration
fixes to bootstrap key
vendor update
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix comment
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix typo
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* typos
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* Removing dynamic listener file after restoration
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* go mod tidy
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Brad Davidson
f6cec4e75d
Add kubernetes.default.svc to serving certs
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Brian Downs
afd506a595
fix possible race where bootstrap data might not save
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
4 years ago
Hussein Galal
948295e8e8
Fix cluster restoration in rke2 ( #3295 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Hussein Galal
f410fc7d1e
Invoke cluster reset function when only reset flag is passed ( #3276 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Brian Downs
c5ad71ce0b
Collect and Store etcd Snapshots and Metadata ( #3239 )
...
* Add the ability to store local etcd snapshots and etcd snapshots stored in an S3 compatible object store in a ConfigMap.
4 years ago
Brian Downs
4a49b9e40b
delete nocluster file and remove build tag
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
4 years ago
Brian Downs
400a632666
put etcd bootstrap save call in goroutine and update comment
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
4 years ago
Hussein Galal
73df65d93a
remove etcd data dir when etcd is disabled ( #3059 )
...
* remove etcd data dir when etcd is disabled
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix comment
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* use debug instead of info logs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Brian Downs
7c99f8645d
Have Bootstrap Data Stored in etcd at Completed Start ( #3038 )
...
* have state stored in etcd at completed start and remove unneeded code
4 years ago
Brad Davidson
c0d129003b
Handle loadbalancer port in TIME_WAIT
...
If the port wanted by the client load balancer is in TIME_WAIT, startup
will fail. Set SO_REUSEPORT so that it can be listened on again
immediately.
The configurable Listen call wants a context, so plumb that through as
well.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Brad Davidson
7cdfaad6ce
Always use static ports for client load-balancers ( #3026 )
...
* Always use static ports for the load-balancers
This fixes an issue where RKE2 kube-proxy daemonset pods were failing to
communicate with the apiserver when RKE2 was restarted because the
load-balancer used a different port every time it started up.
This also changes the apiserver load-balancer port to be 1 below the
supervisor port instead of 1 above it. This makes the apiserver port
consistent at 6443 across servers and agents on RKE2.
Additional fixes below were required to successfully test and use this change
on etcd-only nodes.
* Actually add lb-server-port flag to CLI
* Fix nil pointer when starting server with --disable-etcd but no --server
* Don't try to use full URI as initial load-balancer endpoint
* Fix etcd load-balancer pool updates
* Update dynamiclistener to fix cert updates on etcd-only nodes
* Handle recursive initial server URL in load balancer
* Don't run the deploy controller on etcd-only nodes
4 years ago
Brian Downs
4d1f9eda9d
Etcd Snapshot/Restore to/from S3 Compatible Backends ( #2902 )
...
* Add functionality for etcd snapshot/restore to and from S3 compatible backends.
* Update etcd restore functionality to extract and write certificates and configs from snapshot.
4 years ago
galal-hussein
ef999f0b4f
change error to warn when removing self from etcd members
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
galal-hussein
d6124981d5
remove etcd member if disable etcd is passed
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Hussein Galal
5749f66aa3
Add disable flags for control components ( #2900 )
...
* Add disable flags to control components
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* golint
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes to disable flags
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* Add comments to functions
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* Fix joining problem
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* golint
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix ticker
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix role labels
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Brian Downs
13229019f8
Add ability to perform an etcd on-demand snapshot via cli ( #2819 )
...
* add ability to perform an etcd on-demand snapshot via cli
4 years ago
JenTing Hsiao
57041f0239
Add codespell CI test and fix codespell error ( #2740 )
...
* Add codespell CI test
* Fix codespell error
4 years ago
Jacob Blain Christen
36230daa86
[migration k3s-io] update kine dependency ( #2568 )
...
rancher/kine ➡️ k3s-io/kine
Part of https://github.com/rancher/k3s/issues/2189
Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
4 years ago
Brad Davidson
de18528412
Make etcd voting members responsible for managing learners ( #2399 )
...
* Set etcd timeouts using values from k8s instead of etcdctl
Fix for one of the warnings from #2303
* Use etcd zap logger instead of deprecated capsnlog
Fix for one of the warnings from #2303
* Remove member self-promotion code paths
* Add learner promotion tracking code
* Fix RaftAppliedIndex progress check
* Remove ErrGRPCKeyNotFound check
This is not used by v3 API - it just returns a response with 0 KVs.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Brad Davidson
c3c983198f
Add temporary fix for issue with interrupted etcd promote
...
This is a minimal fix for https://github.com/rancher/rke2/issues/392
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Hussein Galal
373449ec0a
Allow for multiple etcd snapshot restoration ( #2307 )
...
* add reset tmp file
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* go imports
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix multiple lines string
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix typo
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* use resetFile function
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Brad Davidson
8262e23169
Revert removal of EndpointName hooks ( #2319 )
...
* Revert "Remove dead EndpointName code"
This reverts commit 8025da5a8d
.
* Fix docstrings based on proper understanding of use
4 years ago
Brad Davidson
45dd4afe50
Simplify token parsing
...
Improves readability, reduces round-trips to the join server to validate certs.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Brad Davidson
9074da7405
Fix misc nits and missing/unused imports
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago