Commit Graph

2519 Commits (release-1.23)

Author SHA1 Message Date
Nikolai Shields 53f2d4e7d8
Merge pull request #5751 from galal-hussein/v1.23.8-k3s1
Update to v1.23.8-k3s1
2022-06-22 14:10:54 -05:00
galal-hussein aabc460fdf Update to v1.23.8
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2022-06-21 23:17:25 +02:00
Brad Davidson 4dda76b0a9 Bump helm-controller
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-16 13:11:22 -07:00
Darren Shepherd c9ae15c85d Introduce servicelb-namespace parameter
This parameter controls which namespace the klipper-lb pods will be create.
It defaults to kube-system so that k3s does not by default create a new
namespace. It can be changed if users wish to isolate the pods and apply
some policy to them.

Signed-off-by: Darren Shepherd <darren@acorn.io>
(cherry picked from commit e6009b1edf)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-16 11:43:17 -07:00
Darren Shepherd 927ff06328 Move all klipper-lb daemonset to common namespace for PodSecurity
The baseline PodSecurity profile will reject klipper-lb pods from running.
Since klipper-lb pods are put in the same namespace as the Service this
means users can not use PodSecurity baseline profile in combination with
the k3s servicelb.

The solution is to move all klipper-lb pods to a klipper-lb-system where
the security policy of the klipper-lb pods can be different an uniformly
managed.

Signed-off-by: Darren Shepherd <darren@acorn.io>
(cherry picked from commit f4cc1b8788)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-16 11:43:17 -07:00
Roberto Bonafiglia 0eb471de8f
Merge pull request #5721 from rbrtbnfgl/release1.23-flannelupdate
[Release 1.23] Flannel version update to 0.18.1 and added the ability to configure additional options for wireguard backend
2022-06-16 10:52:31 +02:00
Roberto Bonafiglia 01c1eda8e9 Updated flannel to 0.18.1
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
2022-06-16 10:00:32 +02:00
Sjoerd Simons d29b621107 Add ability to pass configuration options to flannel backend
Allow the flannel backend to be specified as
backend=option=val,option2=val2 to select a given backend with extra options.

In particular this adds the following options to wireguard-native
backend:
* Mode - flannel wireguard tunnel mode
* PersistentKeepaliveInterval- wireguard persistent keepalive interval

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-06-16 09:56:47 +02:00
Derek Nola 330993e1eb
Delay service readiness until after startuphooks have finished (#5649) (#5723)
* Move startup hooks wg into a runtime pointer, check before notifying systemd
* Switch default systemd notification to server
* Add 1 sec delay to allow etcd to write to disk
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-15 13:11:22 -07:00
Brad Davidson ebd43f5311 Only listen on loopback when resetting
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-15 11:26:27 -07:00
Brad Davidson b00bc5cfd3 Ensure that CONTAINERD_ variables are not shadowed by later entries
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-15 10:58:21 -07:00
Brad Davidson c9e6b056a3 Sanitize filenames for use in configmap keys
If the user points S3 backups at a bucket containing other files, those
file names may not be valid configmap keys.

For example, RKE1 generates backup files with names like
`s3-c-zrjnb-rs-6hxpk_2022-05-05T12:05:15Z.zip`; the semicolons in the
timestamp portion of the name are not allowed for use in configmap keys.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-15 10:54:36 -07:00
Brad Davidson cb5a3960c2 Disable urfave markdown/man docs generation
From https://github.com/urfave/cli/pull/1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-15 10:53:56 -07:00
Manuel Buil 2507fd8c93
Merge pull request #5682 from manuelbuil/flannelcniconf123
[Release 1.23] Add FlannelConfCNI flag
2022-06-15 10:18:51 +02:00
Manuel Buil 8bbc089a8c
Merge pull request #5680 from manuelbuil/ipvs0-remove-123
[Release 1.23] Remove kube-ipvs0 interface when cleaning up
2022-06-15 10:17:44 +02:00
Derek Nola 9f7eec9525
add support for pprof server (#5690)
Signed-off-by: igor <igor@igor.io>
Signed-off-by: Derek Nola <derek.nola@suse.com>

Co-authored-by: Igor <igorwwwwwwwwwwwwwwwwwwww@users.noreply.github.com>
2022-06-14 17:51:07 -07:00
Derek Nola bd63aeccc2
[Release-1.23] Integration and E2E test improvements (#5686)
* Integration Test: Startup (#5630)

* New startup integration test
* Add testing section to PR template
* Move helper functions to direct k8s client calls

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

* E2E Improvements and groundwork for test-pad tool (#5593)

* Add rancher install sript, taints to cp/etcd roles
* Revert back to generic/ubuntu2004, libvirt networking is unreliable on opensuse
* Added support for alpine
* Rancher deployment script
* Refactor installType into function
* Cleanup splitserver test
Signed-off-by: Derek Nola <derek.nola@suse.com>

* E2E: Dualstack test (#5617)

* E2E dualstack test
* Improve testing documentation

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-06-14 15:17:41 -07:00
Manuel Buil 3e747021a8 Add FlannelConfCNI flag
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-06-14 10:24:58 +02:00
Manuel Buil ed6b3610bf Remove kube-ipvs0 interface when cleaning up
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-06-14 10:22:04 +02:00
Brad Davidson ec61c6673a Set default egress-selector-mode to agent
... until QA flakes can be addressed.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-10 10:14:34 -07:00
Brad Davidson 7a323400e9 Remove control-plane egress context and fix agent mode.
The control-plane context handles requests outside the cluster and
should not be sent to the proxy.

In agent mode, we don't watch pods and just direct-dial any request for
a non-node address, which is the original behavior.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-10 10:14:34 -07:00
Brad Davidson 15b8fb962a Refactor egress-selector pods mode to watch pods
Watching pods appears to be the most reliable way to ensure that the
proxy routes and authorizes connections.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-08 09:35:25 -07:00
Brad Davidson 8456d98283 Bump containerd and runc
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-06-07 15:06:48 -07:00
Hussein Galal 4b2aa16ce6
Update to v1.23.7 (#5614)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2022-05-26 15:35:49 +02:00
Brad Davidson 615020eed9 Add support for configuring the EgressSelector mode
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9d7230496d)
2022-05-23 13:54:08 -07:00
Brad Davidson f7dc7b9556 Bump dynamiclistener to v0.3.3
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1ef34728c9)
2022-05-20 17:03:14 -07:00
Donnie Adams ebc397b61a Remove objects when removed from manifests (#5560)
* Remove objects when removed from manifests

If a user puts a file in /var/lib/rancher/k3s/server/manifests/ then the
objects contained therein are deployed to the cluster. If the objects
are removed from that file, they are not removed from the cluster.

This change tracks the GVKs in the files and will remove objects when
there are removed from the cluster.

Signed-off-by: Donnie Adams <donnie.adams@suse.com>
(cherry picked from commit c38a8c3b43)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-20 17:03:14 -07:00
Brad Davidson e6385b2341 Update CNI version in config file
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-11 14:39:07 -07:00
Brad Davidson e4369ce0a8 Fix typo in image scan script
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-11 14:39:07 -07:00
Brad Davidson 2f22703c9e Mark v1.23.6+k3s1 stable
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-04 11:26:28 -07:00
Manuel Buil 9ac2648f8d
Merge pull request #5535 from manuelbuil/traefik-dualStack
Add "ipFamilyPolicy: PreferDualStack" to have dual-stack ingress support
2022-05-04 18:41:43 +02:00
Manuel Buil a3b35d21e9 Add "ipFamilyPolicy: PreferDualStack" to have dual-stack ingress support
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-05-04 17:32:34 +02:00
Brad Davidson 1d4f995edd Move auto-generated resolv.conf out of /tmp to prevent accidental cleanup
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-05-03 20:33:32 -07:00
Manuel Buil a935a42031
Merge pull request #5492 from manuelbuil/check_combination_dualStack
Check if user has a correct cluster-cidr and service-cidr config
2022-05-03 20:46:19 +02:00
Manuel Buil 314e3f56dc Check if user has a correct cluster-cidr and service-cidr config
Signed-off-by: Manuel Buil <mbuil@suse.com>
2022-05-03 11:01:30 +02:00
Brad Davidson ce5b9347c9 Replace DefaultProxyDialerFn dialer injection with EgressSelector support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 17:54:36 -07:00
Brad Davidson e763fadbba Ensure that WaitForAPIServerReady always re-dials through the loadbalancer
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 14:47:30 -07:00
Brad Davidson d93b750326 Don't start embedded kubelet until after apiserver is up
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 14:47:30 -07:00
Derek Nola 3e5561daca
Add new `k3s completion` command for shell completion (#5461)
* Add shell completion CLI 
Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-04-29 12:53:34 -07:00
Brad Davidson 13ca10664f Use ListWatch helpers instead of bare List/Watch
Reduces code complexity a bit and ensures we don't  have to handle closed watch channels on our own

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 12:24:12 -07:00
Michal Rostecki 5f2a4d4209 server: Allow to enable network policies with IPv6-only
After previous changes, network policies are working on IPv6-only
installations.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2022-04-29 10:51:38 -07:00
Michal Rostecki c0045f415b agent(netpol): Explicitly enable IPv4 when necessary
Before this change, kube-router was always assuming that IPv4 is
enabled, which is not the case in IPv6-only clusters. To enable network
policies in IPv6-only, we need to explicitly let kube-router know when
to disable IPv4.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2022-04-29 10:51:38 -07:00
Brad Davidson c9badb4fd7 Bump kine to v0.9.1 for nats.io support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 10:50:14 -07:00
Brad Davidson 3d01ca1309 Make supervisor errors parsable by Kubernetes client libs
This gives nicer errors from Kubernetes components during startup, and
reduces LOC a bit by using the upstream responsewriters module instead
of writing the headers and body by hand.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 09:23:37 -07:00
Brad Davidson a69d635c9b Drop unnecessary intermediate variable
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 09:22:57 -07:00
Brad Davidson 333311c7ee Add systemd cgroup controller support
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 09:22:57 -07:00
Brad Davidson 1caae63140 Add CNI Plugins and Flannel version to build scripts
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-29 09:22:24 -07:00
Brad Davidson 418c3fa858
Fix issue with datastore corruption on cluster-reset (#5515)
* Bump etcd to v3.5.4-k3s1
* Fix issue with datastore corruption on cluster-reset
* Disable unnecessary components during cluster reset

Disable control-plane components and the tunnel setup during
cluster-reset, even when not doing a restore. This reduces the amount of
log clutter during cluster reset/restore, making any errors encountered
more obvious.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-27 13:44:15 -07:00
Brad Davidson 2a999e5c20
Bump containerd for selinux fix (#5507)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-04-25 14:22:04 -07:00
Derek Nola 3d425e5d20
Secrets Encryption: Add RetryOnConflict around updating nodes (#5495)
* Add RetryOnConflict around updating nodes

Signed-off-by: Derek Nola <derek.nola@suse.com>
2022-04-22 16:32:10 -07:00