Commit Graph

2381 Commits

Author SHA1 Message Date
Vladimir Pouzanov
100e114fa3 Fix the typo in the test
CA cert will never be equal to the serving-kube-apiserver cert so it seems like a copy-paste error.

Signed-off-by: Vladimir Pouzanov <farcaller@gmail.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
d814456e90 Handle custom kubelet port in agent tunnel
The kubelet port can be overridden by users; we shouldn't assume its always 10250

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
dddd06da5c Fix occasional "TLS handshake error" in apiserver network proxy.
We should be reading from the hijacked bufio.ReaderWriter instead of
directly from the net.Conn. There is a race condition where the
underlying http handler may consume bytes from the hijacked request
stream, if it comes in the same packet as the CONNECT header. These
bytes are left in the buffered reader, which we were not using. This was
causing us to occasionally drop a few bytes from the start of the
tunneled connection's client data stream.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
95f216a5b0 Use structured logging instead of logrus for event recorders
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
0bd8674dbb Dump info on coredns when deployment rollout fails
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
12b9cd525c Add ADR for ServiceLB move to CCM
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
75303fe579 Disable cloud-node and cloud-node-lifecycle if CCM is disabled
If CCM and ServiceLB are both disabled, don't run the cloud-controller-manager at all;
this should provide the same CLI flag behavior as previous releases, and not create
problems when users disable the CCM but still want ServiceLB.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
d59b8407a7 Move servicelb into cloudprovider LoadBalancer interface
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
53fede31e2 Move DisableServiceLB/Rootless/ServiceLBNamespace into config.Control
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
806a8989e5 Implement InstancesV2 instead of Instances
... and drop legacy ClusterID support.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Brad Davidson
5d9c826133 Bump metrics-server to v0.6.1
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-10-07 16:58:35 -07:00
Derek Nola
7cbb7a98ff Remove codespell from Drone, add to GH Actions (#6004)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-10-07 16:58:35 -07:00
Manuel Buil
a108c76e9d Merge pull request #6191 from manuelbuil/flannel-external-ip1.23
[Release 1.23] Add flannel-external-ip when there is a k3s node-external-ip
2022-09-29 18:39:25 +02:00
Manuel Buil
be9c26a086 Add flannel-external-ip when there is a k3s node-external-ip
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-09-29 10:05:59 +02:00
Matt Trachier
66309a8ee5 Update to v1.23.12 (#6166)
Signed-off-by: matttrach <matttrach@gmail.com>
v1.23.12+k3s1 v1.23.12-rc1+k3s1
2022-09-22 00:12:57 -05:00
Matt Trachier
b3f1e2341c Update to v1.23.11 (#6144)
Signed-off-by: matttrach <matttrach@gmail.com>
v1.23.11-rc1+k3s1
2022-09-16 13:38:19 -05:00
Brad Davidson
48fa8a6564 Bump golang to correct version
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-09-09 16:11:13 -07:00
Brad Davidson
b3984e3924 Add validation check to confirm correct golang version for Kubernetes
Also reorder validations to perform the short checks first so that
things fail faster if there's a problem.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8f41fe1a3f)
2022-09-09 16:11:13 -07:00
Derek Nola
d251b63e0c Merge pull request #6086 from dereknola/test_bulk_123
[Release-1.23] Bulk Backport of Testing Changes
2022-09-06 09:05:06 -07:00
Brad Davidson
b3990766e4 Bump runc to v1.1.4
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-09-02 12:18:51 -07:00
Roberto Bonafiglia
821141f839 Update Flannel to v0.19.2 to fix older iptables issue
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-09-02 17:19:02 +02:00
Derek Nola
bc658e0275 Change nightly install to v1.23 channel
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:11:26 -07:00
Derek Nola
ca8f99df85 Expand startup integration test (#6030)
* add new data-dir subtest
* Added node flag subtest
* Fix to E2E tests
* Convert existing test to new server logging

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
ShylajaDevadiga
5366a314f7 Fix e2e tests (#6018)
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Akihiro Suda
1cbaf417f6 CI: update Fedora 34 -> 35 (#5996)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Derek Nola
a2d51abf59 Convert install tests to run PR build of k3s (#6003)
* Convert install tests to run PR version of k3s

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

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Derek Nola
57d8e6f805 E2E: Add support for CentOS 7 and Rocky 8 (#6015)
* Add e2e support for centos7 and rocky8

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Max
3f017c98c5 Add nightly install github action (#5998)
Signed-off-by: rancher-max <max.ross@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Derek Nola
9167cc0ce3 E2E: Local cluster testing (#5977)
* Cleanup validatecluster printout
* remove deprecated kubectl exec format
* Implement CreateLocalCluster function
* Update testing documentation

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
ShylajaDevadiga
f810de8654 Update run scripts (#5979)
Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
ShylajaDevadiga
eca4c12705 Add scripts to run e2e test using ansible (#5134)
Signed-off-by: Shylaja Devadiga <shylaja.devadiga@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Abirdcfly
7a50e7803d fix checkError in terraform/testutils (#5893)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Derek Nola
5787c65810 Convert vagrant tests to yaml based config (#5992)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-09-01 15:08:49 -07:00
Brooks Newberry
826b9498df Update to v1.23.10 (#6013)
Signed-off-by: Brooks Newberry <brooks@newberry.com>
v1.23.10-rc1+k3s1 v1.23.10+k3s1
2022-08-18 19:09:59 -07:00
Brooks Newberry
5b2d652a46 Merge pull request #6011 from brooksn/codespell-fix-release-1.23 2022-08-18 14:26:15 -07:00
Derek Nola
5c5201f724 Remove codespell from Drone, add to GH Actions (#6004)
Signed-off-by: Derek Nola <derek.nola@suse.com>
(cherry picked from commit 035c03cfaa)
2022-08-18 13:28:21 -07:00
Roberto Bonafiglia
d04af60aad Updated flannel to v0.19.1
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-08-08 09:58:17 +02:00
Roberto Bonafiglia
c366ee06de Fix comments and add check in case of IPv6 only node
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-08-04 18:47:13 +02:00
Roberto Bonafiglia
b5f2344283 Added NodeIP autodect in case of dualstack connection
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-08-04 18:47:13 +02:00
Brad Davidson
a079a653d5 Bump minio to v7.0.33
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 43508341c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Vladimir Kochnev
c94dd33012 Save agent token to /var/lib/rancher/k3s/server/agent-token
Having separate tokens for server and agent nodes is a nice feature.

However, passing server's plain `K3S_AGENT_TOKEN` value
to `k3s agent --token` without CA hash is insecure when CA is
self-signed, and k3s warns about it in the logs:

```
Cluster CA certificate is not trusted by the host CA bundle, but the token does not include a CA hash.
Use the full token from the server's node-token file to enable Cluster CA validation.
```

Okay so I need CA hash but where should I get it?

This commit attempts to fix this issue by saving agent token value to
`agent-token` file with CA hash appended.

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
(cherry picked from commit 13af0b1d88)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Brad Davidson
fab4d06ef5 Bump dynamiclistener to fix issue with cert expiration
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 049004455a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Brad Davidson
4afe65bff5 Replace getLocalhostIP with Loopback helper method
Requires tweaking existing method signature to allow specifying whether or not IPv6 addresses should be return URL-safe.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5eaa0a9422)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Brad Davidson
15100b5081 Add service-cluster-ip-range to controller-manager args
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 84fb8787f2)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Brad Davidson
89f4bce6d7 Fix server systemd detection
* Use INVOCATION_ID to detect execution under systemd, since as of a9b5a1933f NOTIFY_SOCKET is now cleared by the server code.
* Set the unit type to notify by default for both server and agent, which is what Rancher-managed installs have done for a while.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit bd5fdfce33)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Brad Davidson
74d017cda2 Raise etcd connection test timeout to 30 seconds
Addressess issue where the compact may take more than 10 seconds on slower disks. These disks probably aren't really suitable for etcd, but apparently run fine otherwise.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1674b9d640)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Dirk Müller
8f76c3630b update rootlesskit to 1.0.1
This avoids an issue with u-root 7.0.0 which has been retracted by the
author:

  $ go list -u -m all
  $ go list -m: github.com/u-root/u-root@v7.0.0+incompatible: retracted by module author: Published v7 too early (before migrating to go modules)

Signed-off-by: Dirk Müller <dirk@dmllr.de>
(cherry picked from commit 93ca992cdb)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-08-04 09:39:34 -07:00
Derek Nola
3bcd7cee81 [Release-1.23] Update etcd error to match correct url (#5949)
* Update etcd error to match correct url 
* Bump macos version used in GH actions.

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-08-03 20:10:07 -07:00
Derek Nola
313dd6e597 Fix secrets reencryption for 8K+ secrets (#5939)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-08-03 09:10:04 -07:00
Nikolai Shields
f45cf32673 Update to v1.23.9 (#5871)
Signed-off-by: Nikolai Shields <nikolai@nikolaishields.com>
v1.23.9-rc1+k3s1 v1.23.9+k3s1
2022-07-15 02:16:51 -05:00