Michal Rostecki
33d61bdb26
netpol: Add dual-stack support
...
This change allows to define two cluster CIDRs for compatibility with
Kubernetes dual-stuck, with an assumption that two CIDRs are usually
IPv4 and IPv6.
It does that by levearaging changes in out kube-router fork, with the
following downstream release:
https://github.com/k3s-io/kube-router/releases/tag/v1.3.2%2Bk3s
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com >
2022-04-15 14:23:28 -07:00
Roberto Bonafiglia
5df127ec72
Fixed client URL
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-04-05 10:19:21 +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
Brad Davidson
b0d715e03e
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:07 -07:00
Brad Davidson
11ac5a87b7
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: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
Roberto Bonafiglia
82d5f52719
Added ipv6 only support with flannel
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01:00
Olli Janatuinen
ec59241777
Add support for IPv6 only mode
...
Automatically switch to IPv6 only mode if first node-ip is IPv6 address
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com >
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:48 +01:00
Roberto Bonafiglia
f5475bf6a8
Added flannel-ipv6-masq flag to enable IPv6 nat
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com >
2022-01-18 13:10:25 +01:00
Brad Davidson
fb6c72ed13
Skip CGroup v2 evac when agent is disabled
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-14 13:25:03 -08:00
Brad Davidson
f662a7f45b
Move ClusterResetRestore handling ControlConfig setup
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-12 10:46:22 -08:00
Hussein Galal
05f1bc6e2a
[Release-1.22] Close agentReady channel only in k3s ( #4793 )
...
* 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:29:17 +02: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
Hussein Galal
058f30de03
Fix regression with cluster reset ( #4523 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2021-11-18 02:15:08 +02:00
Manuel Buil
c974abd780
Allow svclb pod to enable ipv6 forwarding
...
Signed-off-by: Manuel Buil <mbuil@suse.com >
2021-11-17 19:35:37 +01: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
Luther Monson
cb0918ae3c
[release-1.22] updating to new signals package in wrangler ( #4422 )
...
* updating to new signals package in wrangler
Signed-off-by: Luther Monson <luther.monson@gmail.com >
2021-11-08 11:52:54 -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
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
Brad Davidson
971854c15b
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:41:50 -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
Brad Davidson
a09bcba540
Properly handle operation as init process
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-09-28 11:32:16 -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
Manuel Buil
9fcd79baae
Add tests to the dual-stack PR and enable dual-stack with flannel backend
...
Signed-off-by: Manuel Buil <mbuil@suse.com >
2021-09-15 14:11:54 +02: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
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 >
2021-09-01 13:22:32 -07: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
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
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
Brian Downs
238dc2086e
prevent snapshot save when snapshots are disabled ( #3475 )
...
* prevent snapshot save when snapshots are disabled
2021-07-09 10:22:49 -07:00
Joe Kralicky
a84c75af62
Adds a command-line flag '--disable-helm-controller' that will disable
...
the server's built-in helm controller.
Problem:
Testing installation and uninstallation of the Helm Controller on k3s is
not possible if the Helm Controller is baked into the k3s server.
Solution:
The Helm Controller can optionally be disabled, which will allow users
to manage its installation manually.
Signed-off-by: Joe Kralicky <joe.kralicky@suse.com >
2021-06-25 14:54:36 -04:00
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 >
2021-06-22 22:42:34 +02:00
Brian Downs
88f95ec409
Send systemd notifications for both server and agent ( #3430 )
...
* update agent to sent systemd notify after everything starts
2021-06-15 04:20:26 -07:00
Brian Downs
2682183773
add log message indicating etcd snapshots are disabled
...
Signed-off-by: Brian Downs <brian.downs@gmail.com >
2021-06-04 09:18:16 -07:00
Brad Davidson
02a5bee62f
Add system-default-registry support and remove shared code ( #3285 )
...
* Move registries.yaml handling out to rancher/wharfie
* Add system-default-registry support
* Add CLI support for kubelet image credential providers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-05-10 15:58:41 -07:00
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 >
2021-05-05 17:40:04 +02:00
Brad Davidson
2705431d96
Add support for dual-stack Pod/Service CIDRs and node IP addresses ( #3212 )
...
* Add support for dual-stack cluster/service CIDRs and node addresses
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2021-04-21 15:56:20 -07:00
Chris Kim
69f96d6225
Define a Controllers and LeaderControllers on the server config ( #3043 )
...
Signed-off-by: Chris Kim <oats87g@gmail.com >
2021-03-11 10:39:00 -08:00
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
2021-03-06 02:29:57 -08:00
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.
2021-03-03 11:14:12 -07:00
galal-hussein
d6124981d5
remove etcd member if disable etcd is passed
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2021-03-01 23:50:50 +02:00
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 >
2021-02-12 17:35:57 +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
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