Commit Graph

2139 Commits

Author SHA1 Message Date
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>
v1.22.8-rc2+k3s1
2022-03-23 13:23:07 -07:00
Brad Davidson
bef28b2ef0 go generate
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
v1.22.8-rc1+k3s1
2022-03-18 23:31:19 -07:00
Brad Davidson
f62f0ca6cf Bump coredns to v1.9.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-18 23:31:19 -07:00
Brad Davidson
9f7530c5b3 Update Kubernetes to v1.22.8-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-18 14:02:44 -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
e575b4f50e Disable ineffassign CI plugin for excessive false positives
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3531df3f31)
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
Brad Davidson
88c2aa7c6f Bump containerd to v1.5.10-k3s1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-15 15:02:50 -07:00
Roberto Bonafiglia
37b460db7b Merge pull request #5260 from rbrtbnfgl/backport1.22-ipv6-only
[release 1.22] ipv6 only
2022-03-15 09:15:03 +01: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
0159e9bf38 [Release-1.22] Backport new E2E tests (#5200)
* E2E secrets encryption test (#5144)
* E2E Add external DB options to ValidateCluster test (#5157)

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Wait for process to exit before returning from kill helper

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-04 10:18:02 -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
Derek Nola
de8167e67a Move testing lock from server creation to test start (#5155) (#5171)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-28 09:05:39 -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>
v1.22.7-rc1+k3s1 v1.22.7+k3s1
2022-02-19 00:19:48 +02:00
Brad Davidson
efe99dc0fa Update Wrangler to resolve issue with deleting owned resources.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-02-11 15:52:00 -08:00
Manuel Buil
84bf131cfc Merge pull request #5108 from manuelbuil/fix_annoying_netpol_log_122
[Release 1.22] Fix annoying netpol heartbeat missing log
2022-02-10 23:19:42 +01:00
Manuel Buil
1b29b96e49 Fix annoying netpol log
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-02-10 20:13:58 +01:00
Jossemar Cordero
4262c6b91a [Release-1.22] Enable smoke tests (#5100)
* tests/vagrant: refactor vagrant smoke tests (#4484)

- updated `tests/TESTING.md`
- cgroup, snapshotter, and install tests all under tests/vagrant
- cgroup and snapshotter workflows trigger for all code changes on all branches (excluding markdown docs, install script, and other vagrant tests)
- install workflow triggers for relevant script and fixture changes, only on master or pull-requests that target it
- integration and unit test workflows should not trigger for install script changes nor anything under tests/vagrant

Co-authored-by: Jacob Blain Christen <jacob@rancher.com>
Signed-off-by: Jonnatan Jossemar Cordero <jonnatan.cordero@suse.com>

* Update CentOS 8 smoke vm's with vault repositories (#5092)

Update CentOS 8 smoke vm's with vault repositories

Problem: CentOS 8 reached its EOL alongside its public mirrors, making
all the smoke test fail at provisioning time.

Solution: Point all the CentOS repositories to vault.

Signed-off-by: Jonnatan Jossemar Cordero <jonnatan.cordero@suse.com>
Signed-off-by: Jonnatan Jossemar Cordero <jonnatan.cordero@suse.com>

* Update install GH action with release-1.22 branch

Problem: The install GH workflow enforces to be run agaisnt the main
branch as instead of a release one.

Solution: Update GH workflow and k3s install version accordingly to work
once it is run agaisnt release-1.22 branch

Signed-off-by: Jonnatan Jossemar Cordero <jonnatan.cordero@suse.com>

Co-authored-by: Jacob Blain Christen <jacob@rancher.com>
2022-02-09 16:01:33 -08: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
Manuel Buil
23796ddef0 Merge pull request #5062 from manuelbuil/flannel-iptables-1.22
[Release 1.22] Update flannel version and remove the iptables rules from ipmasq flannel
2022-02-09 12:32:43 +01:00
Manuel Buil
3242c04ad1 Remove the iptables rules from ipmasq flannel
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-02-09 08:46:52 +01: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
Manuel Buil
5290d72367 Merge pull request #5087 from manuelbuil/kube-router-lib-1.22
[Release 1.22] netpol: Use kube-router as a library
2022-02-08 08:17:28 +01:00
Derek Nola
18a80320fe Fixes to Drone CI Stability (#4897) (#5090)
* Do serial only first
* Add test-post-hook for extremely flaky tests, enable parallel

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-02-07 13:35:24 -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