Hussein Galal
6d3c31adf1
[Release-1.20] Add cert rotation command ( #4633 )
...
* 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 >
* go mod tidy
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:57 +02:00
Brad Davidson
2f3d398cef
Fix log/reap reexec
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-11-01 14:59:23 -07:00
Brad Davidson
5196ebe32a
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:35 -07:00
Brian Downs
9c5236189a
[Release-1.20] - Add etcd s3 timeout ( #4207 ) ( #4227 )
2021-10-18 10:45:29 -07:00
Brad Davidson
e1bd9f30d8
Don't evacuate the root cgroup when rootless
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-10-01 16:21:07 -07:00
Brad Davidson
2907fb1efe
Properly handle operation as init process
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-29 13:18:57 -07:00
Derek Nola
e9d418cdb6
Removed experimental from cluster commands ( #4034 )
...
Signed-off-by: dereknola <derek.nola@suse.com >
2021-09-16 11:07:29 -07:00
Hussein Galal
5ff22d0e7b
Reset load balancer state during restoraion ( #3879 )
...
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 18:58:57 +02:00
Hussein Galal
cd6e3ccd31
[release-1.20] - Backport K3s/RKE2 bootstrap data is encrypted with empty string if user does not supply a token ( #3516 )
...
* 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 >
* go mod vendor
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix a runtime core panic
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* update kine
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* revert the helm controller update
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fix calling delete in kine
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2021-07-13 22:58:58 +02:00
Brian Downs
5b791c1387
Backport issue 3414 release 1.20 2 ( #3623 )
...
* Add the ability to list etcd snapshots (#3303 )
* add ability to list local and s3 etcd snapshots
* Add the ability to prune etcd snapshots (#3310 )
* add prune subcommand to force rentention policy enforcement
* add etcd snapshot save subcommand
* add retention default and wire in s3 prune
2021-07-13 06:47:54 -07:00
Brian Downs
c15434c2dd
prevent snapshot save when snapshots are disabled ( #3475 ) ( #3611 )
...
* prevent snapshot save when snapshots are disabled
2021-07-09 12:09:59 -07:00
Brian Downs
96a9521dab
add log message indicating etcd snapshots are disabled
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 10:22:20 -07:00
Brian Downs
49073cd2ff
add timeouts around s3 operations
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 10:07:55 -07:00
Brian Downs
78067d4d95
update comments, remove unneeded code
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 10:07:48 -07:00
Brian Downs
605473e259
fix delete logic, update subcommand functionality
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 10:07:41 -07:00
Brian Downs
bfea9247cf
initial
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 10:07:33 -07:00
Brian Downs
a74fb99037
Update snapshot local and S3 logic and supporting code.
...
* Add the collection of the snapshots to the retry logic.
* Remove node specific entries and collected entries to maps and
update the config map.
* Add node-name flag to the etcd-snapshot command and set in ENV.
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 09:52:16 -07:00
Brian Downs
a711f6a365
export needed function to create core factory
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 09:51:57 -07:00
Brian Downs
b3e84c8862
code clean up, simplification, etc.
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 09:50:52 -07:00
Brian Downs
a846957a47
update func sig
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-29 09:50:44 -07:00
MonzElmasry
e939805a5e
change --disable-apiserver flag
...
Signed-off-by: MonzElmasry <menna.elmasry@rancher.com >
2021-05-13 00:25:07 +02:00
Brian Downs
221c9ae589
add hidden attribute to disable flags
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-04-13 16:29:51 -07:00
Brian Downs
9a572ecae0
delete nocluster file and remove build tag
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-04-13 16:29:51 -07:00
Brian Downs
3f73665131
remove hidden attribute from cluster flags and related code
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-04-13 16:29:51 -07:00
Brian Downs
1da86eaa0b
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.
Signed-off-by: Brian Downs <brian.downs@gmail.com >
(cherry picked from commit 4d1f9eda9d )
2021-03-15 16:04:04 -07:00
Chris Kim
bc400f5396
Define a Controllers and LeaderControllers on the server config ( #3053 )
...
Signed-off-by: Chris Kim <oats87g@gmail.com >
2021-03-12 07:27:42 -08:00
Hussein Galal
b0c0d372b8
[release-1.20] Add disable components flags ( #3019 )
...
* 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 >
* remove etcd member if disable etcd is passed
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* update dynamiclistener
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* change error to warn when removing self from etcd members
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Mark disable components flags as experimental
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2021-03-05 00:04:48 +02:00
Brad Davidson
07256cf7ab
Add ServiceIPRange and ServiceNodePortRange to agent config
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-02-03 10:41:51 -08:00
Yuriy
06fda7accf
Add functionality to bind custom IP address for Etcd metrics endpoint ( #2750 )
...
* Add functionality to bind custom IP address for Etcd metrics endpoint
Signed-off-by: yuriydzobak <yurii.dzobak@lotusflare.com >
2021-01-22 17:40:48 -08:00
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
2021-01-21 14:09:15 -07:00
Chris Kim
332fd73d46
Add support for both config-file and data-dir at a global level in the self-extracting wrapper for K3s ( #2594 )
...
* Add support for both config-file and data-dir at a global level in the self-extracting wrapper for K3s
Signed-off-by: Chris Kim <oats87g@gmail.com >
2020-12-16 09:27:57 -08:00
Brad Davidson
c6950d2cb0
Update Kubernetes to v1.20.0-k3s1
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2020-12-08 22:51:34 -08:00
Chin-Ya Huang
3f0f2b342e
Show go version when executes with --version.
...
Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com >
2020-12-04 12:51:15 -08:00
Brad Davidson
3b8ec74049
Update disables list when building with no_stage
...
The --disable/--no-deploy flags actually turn off some built-in
controllers, in addition to preventing manifests from getting loaded.
Make it clear which controllers can still be disabled even when the
packaged components are ommited by the no_stage build tag.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2020-11-04 13:39:45 -08:00
MonzElmasry
e8436cc76b
Make etcd use node private ip
...
Signed-off-by: MonzElmasry <menna.elmasry@rancher.com >
2020-10-28 23:45:24 +02:00
Brian Downs
ba70c41cce
Initial Logging Output Update ( #2246 )
...
This attempts to update logging statements to make them consistent
through out the code base. It also adds additional context to messages
where possible, simplifies messages, and updates level where necessary.
2020-09-21 09:56:03 -07:00
Brian Downs
4c3ec907ab
remove k8s daemon config from setup hook in favor of specific fields from the config ( #2206 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2020-09-04 09:30:36 -07:00
Darren Shepherd
64ae6affc5
Missing registering debug/config flags on server subcommand
...
Signed-off-by: Darren Shepherd <darren@rancher.com >
2020-09-03 13:19:25 -07:00
Darren Shepherd
551a1842ad
Update pkg/cli/cmds/config.go
...
Co-authored-by: Jacob Blain Christen <dweomer5@gmail.com >
2020-09-01 10:43:28 -07:00
Darren Shepherd
7657ed2e13
Update pkg/cli/server/server.go
...
Co-authored-by: Jacob Blain Christen <dweomer5@gmail.com >
2020-09-01 10:43:19 -07:00
Darren Shepherd
21d21ddd4d
Add config file support independent of CLI framework
...
Signed-off-by: Darren Shepherd <darren@rancher.com >
2020-08-29 21:44:13 -07:00
Darren Shepherd
ae5c585050
Revert "Add config file support"
...
This reverts commit e1dc3451bc .
Signed-off-by: Darren Shepherd <darren@rancher.com >
2020-08-29 21:44:07 -07:00
Brian Downs
866dc94cea
Galal hussein etcd backup restore ( #2154 )
...
* Add etcd snapshot and restore
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix error logs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* goimports
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix flag describtion
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Add disable snapshot and retention
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* use creation time for snapshot retention
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* unexport method, update var name
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* adjust snapshot flags
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update var name, string concat
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* revert previous change, create constants
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* updates
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* type assertion error checking
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* pr remediation
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* pr remediation
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* pr remediation
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* pr remediation
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* pr remediation
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* updates
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* updates
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* simplify logic, remove unneeded function
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update flags
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update flags
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* add comment
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* exit on restore completion, update flag names, move retention check
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* exit on restore completion, update flag names, move retention check
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* exit on restore completion, update flag names, move retention check
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update disable snapshots flag and field names
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* move function
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update field names
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update var and field names
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update var and field names
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update defaultSnapshotIntervalMinutes to 12 like rke
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update directory perms
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update etc-snapshot-dir usage
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update interval to 12 hours
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* fix usage typo
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* add cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* add cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* add cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* wire in cron
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update deps target to work, add build/data target for creation, and generate
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* remove dead make targets
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* error handling, cluster reset functionality
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* error handling, cluster reset functionality
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* update
Signed-off-by: Brian Downs <brian.downs@gmail.com >
* remove intermediate dapper file
Signed-off-by: Brian Downs <brian.downs@gmail.com >
Co-authored-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2020-08-28 16:57:40 -07:00
Brad Davidson
c4ac620b8b
Merge pull request #2159 from brandond/config_file_rename
...
Rename flags.conf to config.yaml
2020-08-25 21:43:48 -07:00
Brad Davidson
b4d81a9e33
Remove lingering references to dqlite
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2020-08-24 17:09:19 -07:00
Brad Davidson
43fcc5ddcb
Rename flags.conf => config.yaml
...
Related to https://github.com/rancher/rke2/issues/150
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2020-08-24 14:56:30 -07:00
Brian Downs
324bb55986
add ctx to hook, handle hook errors
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2020-08-19 16:54:58 -07:00
Brian Downs
fa2c1422b3
change name of variable
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2020-08-19 14:30:53 -07:00
Brian Downs
a4b2953017
add setup hook capabilities for rke2
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2020-08-19 13:42:45 -07:00
Brad Davidson
79c499f0e0
Fix handling of TLS configuration args
...
Also fixes an unrelated error formatting issue turned up while testing.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2020-08-18 16:44:10 -07:00