Brad Davidson
26ddaec248
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:07 -07:00
Brad Davidson
bef28b2ef0
go generate
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-03-18 23:31:19 -07:00
Brad Davidson
58b65cbeb1
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:24:23 -07:00
Brad Davidson
ff23175968
Update helm-controller
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit a93b9b6d53 )
2022-03-17 16:01:25 -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
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
e323a85116
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: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
1da571ff69
Remove unnecessary copies of etcdconfig struct
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit a1b800f0bf )
2022-03-15 18:08:33 -07:00
Brad Davidson
9d1240577f
Fix cluster bootstrap test
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
(cherry picked from commit 54bb65064e )
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
Roberto Bonafiglia
7d555489c0
Changed ipv6 config on flannel setup
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01: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
Roberto Bonafiglia
7bae0481ef
Fixed log in case of ipv6 only config
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01:00
Roberto Bonafiglia
29324439b8
Added switch case to check netMode
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01:00
Roberto Bonafiglia
2b83753b3c
Fixed in case of empty address
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01:00
Roberto Bonafiglia
1187c3573d
Updated flannel to 0.17
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:49 +01:00
Brian Downs
6bf86c5b33
fix function arg call ( #5234 )
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com >
2022-03-14 11:57:48 +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
Brian Downs
b988e34c4b
Release 1.22 fix 700 ( #5246 )
2022-03-09 16:33:07 -07:00
Brian Downs
22a7b477b3
add net util funcs ( #5245 )
2022-03-09 14:25:59 -07:00
Brian Downs
d00666d50d
fix function arg call ( #5234 ) ( #5236 )
2022-03-09 08:00:01 -07:00
Derek Nola
b3b44aec2f
Populate EtcdConfig in runtime from datastore when etcd is disabled ( #5222 ) ( #5228 )
...
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 >
Co-authored-by: Brad Davidson <brad.davidson@rancher.com >
2022-03-08 10:42:23 -08:00
Derek Nola
5b26c2eb4e
Add --json flag for k3s secrets-encrypt status ( #5127 ) ( #5198 )
...
* Add json flag for secrets-encrypt status
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-03-03 10:25:33 -08:00
Derek Nola
d07edd72f6
[Release-1.22] Backport E2E Testing Improvements ( #5124 )
...
* Fix cluster validation and add upgrade cluster test (#5020 )
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com >
Co-authored-by: Derek Nola <derek.nola@suse.com >
Signed-off-by: Derek Nola <derek.nola@suse.com >
* Migrate Ginkgo testing framework to V2, consolidate integration tests (#5097 )
* Upgrade and convert ginkgo from v1 to v2
* Move all integration tests into integration folder
* Update TESTING.md
Signed-off-by: Derek Nola <derek.nola@suse.com >
* E2E Test Improvements (#5102 )
* Fix infinite while loop on failure, reduce upgradecluster
* DRY code
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-02-28 12:10:40 -08:00
Derek Nola
e3d5310b5f
Reset to lastest release-1.22 ( #5169 )
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-02-28 10:39:17 -08:00
Brian Downs
551cdde8cb
add ability to specify etcd snapshot list output format ( #5132 ) ( #5179 )
2022-02-26 12:29:03 -07:00
Hussein Galal
8432d7f239
Upgrade to V1.22.7 k3s1 ( #5136 )
...
* Update to v1.22.7
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Upgrade treafik to 2.6.1
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Upgrade treafik to 2.6.1
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Upgrade treafik image in image-list
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix traefik manifest
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Update go.mod
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2022-02-19 00:19:48 +02:00
Manuel Buil
1b29b96e49
Fix annoying netpol log
...
Signed-off-by: Manuel Buil <mbuil@suse.com >
2022-02-10 20:13:58 +01: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
Derek Nola
be6b1bb6c1
Check for --kubeconfig flag with embedded kubectl ( #5064 ) ( #5075 )
...
* Check for kubeconfig flag
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-02-08 09:14:28 -08:00
Michal Rostecki
8798c42886
netpol: Use kube-router as a library
...
Before this change, we were copying a part of kube-router code to
pkg/agent/netpol directory with modifications, from which the biggest
one was consumption of k3s node config instead of kube-router config.
However, that approach made it hard to follow new upstream versions.
It's possible to use kube-router as a library, so it seems like a better
way to do that.
Instead of modifying kube-router network policy controller to comsume
k3s configuration, this change just converts k3s node config into
kube-router config. All the functionality of kube-router except netpol
is still disabled.
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org >
Signed-off-by: Manuel Buil <mbuil@suse.com >
2022-02-07 19:21:57 +01:00
Derek Nola
b7f065c64b
[Release-1.22] Add --server flag to k3s secrets-encrypt ( #5053 )
...
* Update gitignore
Signed-off-by: Derek Nola <derek.nola@suse.com >
* Add server flag to access nonlocal/nondefault k3s server (#5016 )
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-02-01 10:45:12 -08:00
Brad Davidson
4acbbcad01
Move containerd wait into exported function
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-25 13:09:48 -08:00
Roberto Bonafiglia
43f130b965
Merge pull request #4983 from rbrtbnfgl/ipv6-nat_release-1.22
...
[Release 1.22] Add IPv6 NAT
2022-01-19 08:46:15 +01:00
Brad Davidson
f4db804373
go generate
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-18 16:46:11 -08:00
Brad Davidson
01be2bb6fb
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 16:46:11 -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
Manuel Buil
45365943e1
Move flannel logs to logrus
...
Signed-off-by: Manuel Buil <mbuil@suse.com >
2022-01-18 14:38:03 +01:00
Roberto Bonafiglia
db4d0466e5
Added debug log for IPv6 Masquerading rule
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com >
2022-01-18 13:10:38 +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
Roberto Bonafiglia
4f7fa01730
Added iptables masquerade rules for ipv6 on flannel
...
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com >
2022-01-18 13:10:14 +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
Derek Nola
82f1ec314c
Enable logging on all subcommands ( #4921 ) ( #4931 )
...
Signed-off-by: Derek Nola <derek.nola@suse.com >
2022-01-14 09:21:02 -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
Brad Davidson
ea984d265d
Fix handling of agent-token fallback to token
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-07 09:57:18 -08:00
Brad Davidson
34ba028da5
Fix use of agent creds for secrets-encrypt and config validate
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com >
2022-01-06 13:11:25 -08:00